Memory & RAG
The 60db CLI exposes the full Memory/RAG layer for scripting and automation. Every billable command surfaces the wallet balance and charge in the output footer so you can watch spend in real time.All memory commands are pay-as-you-go. See the pricing reference for rates. When the wallet runs out, commands return
INSUFFICIENT_CREDITS with a structured shortfall — top up via the Dashboard billing page to continue.Commands
| Command | Billed | Purpose |
|---|---|---|
60db memory:ingest | ✓ | Store a single memory |
60db memory:upload | ✓✓ | Extract + ingest a document (PDF, DOCX, XLSX, images…) |
60db memory:search | ✓ | Hybrid semantic search |
60db memory:context | ✓ | Assemble LLM-ready context |
60db memory:collections | — | List collections |
60db memory:create-collection | — | Create team/knowledge/hive collection |
60db memory:usage | — | Monthly spend breakdown |
60db memory:status | — | Poll a memory’s ingestion status |
60db memory:delete | — | Soft-delete a memory (24h undo) |
Ingest a memory
Store a single fact, preference, or text snippet:-t, --text <text>— Memory content (required, max 100,000 chars)--title <title>— Optional display title-c, --collection <id>— Target collection (defaults to personal)--type <type>—user|knowledge|hive(default:user)--no-infer— Skip LLM-based fact extraction (default: infer is on)
Upload a document
Upload a file — PDF, DOCX, XLSX, PPTX, EML, MSG, HTML, TXT, Markdown, CSV, PNG, JPG, TIFF, and 70+ other formats — with built-in OCR for scanned content:-f, --file <path>— Absolute or relative path to the document (required)-c, --collection <id>— Target collection--type <type>—user|knowledge|hive(default:knowledge)--title <title>— Display title (defaults to filename)--chunk-size <n>— Max characters per chunk, 200-8000 (default: 1500)--chunk-overlap <n>— Character overlap between chunks (default: 200)
- Extract fee: $0.003 per MB
- Ingest fee: $0.0001 per 1,000 extracted characters
Tuning tips
| Document type | --chunk-size | --chunk-overlap |
|---|---|---|
| Technical docs / API refs | 1500 | 200 (default) |
| Long-form prose / books | 2500 | 300 |
| FAQs / short snippets | 800 | 100 |
| Spreadsheet exports | 3000 | 0 |
| Scanned PDFs (OCR) | 2000 | 250 |
Search memories
Hybrid semantic + keyword recall with optional cross-encoder reranking:-q, --query <text>— Search query (required, max 2,000 chars)-c, --collection <id>— Collection to search--mode <mode>—fast(~100-200ms) orthinking(wider candidate pool + cross-encoder rerank, ~200-400ms)--limit <n>— Max results (1-50, default: 10)--alpha <n>— 0 (keyword only) to 1 (semantic only), default 0.8--recency-bias <n>— Weight for newer memories (0-1, default: 0)--graph— Include knowledge-graph relationships
--rerank-top-k <n>— Max candidates the cross-encoder reranks--rerank-timeout <ms>— Hard timeout for rerank call--min-rerank-score <n>— Drop results below this rerank score (0-1)--fetch-multiplier <n>— In thinking mode, fetch N x limit candidates
Example — tune by query type
Assemble LLM context
Purpose-built for RAG — returns a pre-formatted string ready to prepend to an LLM system message:-q, --query <text>— Query driving retrieval (required)--session-id <id>— Chat session ID for hierarchical context--top-k <n>— Max memories to pull (default: 10)--max-context-length <n>— Max assembled tokens (default: 4000)--graph— Include graph relationships--no-timeline— Exclude recent events
Manage collections
List collections
Create a collection
Admin/owner only. Personal collections are auto-created per user — you don’t create those manually.-i, --id <id>— Collection ID (required, lowercase alphanumeric + underscores)-l, --label <label>— Human-readable label (required)-k, --kind <kind>—team|knowledge|hive(default:team)--no-shared— Don’t share with workspace members
Monitor spend
--period <period>—current_month(default) |last_30_days|all_time
Poll a memory’s status
Memories are processed asynchronously. Use this to watch a specific ID:pending → processing → ready (or failed). Unbilled.
Delete a memory
Agent-friendly JSON output
All memory commands respect the global--json flag for machine-readable output:
billing: {charged, balance, txId} object on billable commands.
Handling insufficient credits
When the wallet balance is below the operation cost, commands return a402-style error with structured details:
--json output surfaces the same details as: