Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Memory & knowledge

Three pages form the context layer of the Space: Memory (/space/memory), the Knowledge Base (/space/knowledge, RAG) and Artifacts (/space/artifacts). This page documents all three and the APIs behind them.

New to the AI side? Read AI concepts from scratch first — especially Embeddings, Chunking and RAG, which power the knowledge base.

Memory gives agents automatic cross-session, cross-channel recall. It is a two-layer system designed for total transparency: you can see, export and delete everything that was remembered.

  • Every agent run appends memory entries — one per user/assistant/system/tool message, tagged with role, content, timestamp and optional agentId / metadata.
  • Entries are served by GET /api/memory and written through the same API; the panel supports filtering by agent (?agentId=) and full-text filtering.
  • The stats header shows totalEntries, agentsIndexed and estimatedTokens — the estimated token footprint of what would be injected into context.
  1. System layer — the structured store agents actually query at runtime (the entries above).
  2. Human-readable export — one-click exports to JSON (synthhires-memory-<date>.json) or Markdown (synthhires-memory-<date>.md, with per-entry role headers, agent ids and content), so the memory is auditable by humans, not just machine-readable.
  • Search / filter entries by keyword or agent.
  • Delete a single entry (action: "delete") or clear everything / one agent (action: "clear").
  • Refresh to re-pull.

Transparency is a deliberate product decision: the promise is that anything the platform remembers about you is visible in this panel and removable — no hidden profiling.

Memory and the knowledge base solve the same underlying problem in different ways: the model’s context window is finite and it has no memory after training. Anything you want it to “recall” must be re-supplied in the prompt. These two tools decide what gets re-supplied and how it’s found:

  • Memory is automatic recall of what happened. Each agent run appends entries (role, content, timestamp) so what was said can be re-injected later. It’s a ledger of events, retrieved mostly by exact/full-text matching and injected when relevant. It’s not “the model remembering” — it’s the platform keeping the receipts and replaying them into context.
  • The knowledge base is deliberate, semantic retrieval (RAG). When you upload documents, they’re chunked (split into coherent pieces), each chunk is embedded (turned into a vector of its meaning), and a question is answered by finding the chunk whose vector is nearest in meaning (semantic search). This is Retrieval-Augmented Generation: ground the model in sourced, up-to-date context instead of letting it answer from training alone, which also reduces hallucination and cuts context cost by sending only the relevant snippets.

For the full mechanics of embeddings, chunking and RAG, see AI concepts from scratch.

The knowledge base is a semantic retrieval store: you deliberately upload documents that agents can query as grounding context (Retrieval-Augmented Generation).

Source Details
Files PDF, DOCX, TXT, MD, CSV, JSON — up to 10 MB per file, multiple files per drop
URLs Any public URL, fetched and ingested server-side
YouTube Video URLs — transcript extracted and ingested
  1. Upload/URL submit → the document enters processing state.
  2. Text is extracted and split into chunks (chunkDocument in src/lib/rag/vector.ts).
  3. Each chunk is embedded and chunks are indexed via POST /api/rag (action: "ingest_text" / "ingest_url").
  4. Status flips to ready with the chunk count, or error on failure.
  • POST /api/rag with action: "search" runs a semantic query over the indexed chunks.
  • Results return the matching chunk content, source documentId / documentName, ready to be injected as context (“Use in context”).
  • The index panel shows every document with type icon (file / URL / YouTube), chunk count, size and status; documents can be deleted individually.

The knowledge base is the place for deliberate, curated context — company docs, product specs, API references — as opposed to memory, which is automatic recall of what happened.

The artifacts gallery indexes everything generated by AI — reports, code, images, documents — by type and origin session.

  • Indexed by type and origin session: you don’t need to remember which conversation produced a file.
  • Searchable: full-text search across the artifact store.
  • Rendered in chat: when the assistant produces an artifact (e.g. an HTML preview), it renders in the side panel (artifacts-panel.tsx) and is also persisted to the gallery.

Artifacts bridge chat and the content library: transient in-conversation output becomes a permanent, findable asset.