Downcity
ServicesBuilt-in Services

memory Built-in Service

Explain the built-in memory service as the owner of memory runtime state, retrieval, writes, and service-level memory rules

memory Built-in Service

memory is the built-in service for durable memory retrieval and writes.

It covers:

  • runtime memory state
  • indexing lifecycle
  • search
  • direct reads
  • explicit stores
  • flush from session history into memory

What it owns

From the current implementation, memory owns:

  • runtimeState
  • memory runtime start and stop
  • memory-specific action surfaces such as status, search, get, store, and flush
  • service-level system guidance for when memory should be used

Why this is a service instead of a tool

memory is more than a helper function.

It needs durable state and stable runtime semantics around:

  • whether memory is enabled
  • how indexing and retrieval stay available
  • how the prompt should instruct memory usage

That makes it a domain service.

Why SDK users should care

memory is a strong example of a service that combines:

  • runtime state
  • prompt behavior
  • retrieval actions
  • write actions

If you want to design your own service that owns durable domain knowledge instead of ephemeral call-time output, this is one of the best built-in references.