Downcity
CommandsService

city memory

Memory service actions (status/index/search/get/store/flush)

city memory

Memory service command group.

Hierarchy note: city memory is a service action command, not a top-level command. Top-level entry is city service.

Usage

city memory <subcommand> [options]

Subcommands

  • status
  • index
  • search <query>
  • get <memoryPath> [--from <line>] [--lines <count>]
  • store --content <text> [--target <longterm|daily|working>] [--context-id <contextId>]
  • flush --context-id <contextId> [--max-messages <count>]

Examples

city memory status
city memory index --force
city memory search "release decision"
city memory get .ship/memory/MEMORY.md --from 10 --lines 20
city memory store --target longterm --content "User prefers concise release notes."
city memory flush --context-id telegram-chat-123 --max-messages 40

Notes

  • Memory is enabled by default (zero config). Disable only when needed: context.memory.enabled=false.
  • Start agent runtime first:
city agent start

Example Output (Based on Current Implementation)

The examples below are aligned with current command implementations in package/src (including default output mode and field structure). Placeholder values are used for environment-specific fields.

$ city memory search "release decision"
{
  "success": true,
  "data": {
    "success": true,
    "hits": []
  }
}
$ city memory flush --context-id <contextId> --max-messages 40
{
  "success": true,
  "data": {
    "success": true
  }
}

Table of Contents