Knowledge Base
Ask your own documents anything — or give them to an AI agent. Circuitry's knowledge base feature lets you load PDFs, Markdown, notes, manuals, FAQs, regulations, code, and anything else textual into a searchable store, then either query it directly through a chat interface or wire it into an agent so your workflow's AI is grounded in your own material.
It's two products in one:
- A personal research assistant. Drop in your docs, chat with them, get cited answers. Pin good answers back into the store as notes. No setup, no cloud config — works in the browser on any device.
- A knowledge layer for AI agents. The same store you built for yourself becomes the source of truth for any agent in any workflow. Wire it up once; the agent's answers stay grounded in your material.
Quick start
- In the workflow editor, drag a Store node (database-cylinder icon with three connected nodes) onto the canvas.
- Double-click the node to expand it, then click Edit in the header. A document-management tab opens.
- Drop files into the left column — PDF, Markdown, text, source code, anything textual.
- Use the chat in the middle to ask your docs anything. Each answer cites which document it came from.
That's the personal-research-assistant mode. To plug the same store into a real workflow, drag a wire from the Store node to an Agent node.
Asking your own docs
The middle column of the store editor is a chat that knows only about the documents you've loaded. Every question gets:
- A retrieval pass — your question is embedded, the top-matching chunks are pulled from the store.
- An LLM call — the chunks are passed to the model with a prompt to answer using them.
- Citation chips below each answer — they name the source doc each fact came from.
Useful patterns:
- Verify coverage before you wire up an agent. If the store editor can't answer your question, an agent using the store can't either.
- Refine answers and pin them back. Each AI reply has a Save to store as note button. The Q+A becomes a new chunk in the store — over time you build up a curated layer on top of the raw source docs.
- Test different docs. Drop in a new manual, ask a few questions, decide if it's worth keeping in the indexed set.
Closed-book vs Open-book testing
In the chat's header, toggle between Closed and Open to control how the model handles questions the docs don't cover:
- Closed-book: the model answers from your docs only. If the answer isn't there, it says "I don't have that information." This tells you when the store has a coverage gap.
- Open-book: the model uses your docs as extra context but fills gaps from general knowledge. This simulates the "real" agent behavior when you want hybrid answering.
Running the same question through both modes is how you decide whether to add more docs (the closed answer is wrong) or accept the hybrid (the open answer is fine).
Filling a store with content
Five ways to add documents — all converge on the same chunk-and-index pipeline:
- Drag from your OS — Finder, Files, the desktop, anywhere.
- Drag from Circuitry's local files panel — pull anything from your project folder without saving it to disk first.
- Drag from a cloud storage browser — files you're already viewing in an FTP/SFTP/cloud connection drop straight in. The store editor fetches the bytes for you.
- Paste (Cmd/Ctrl-V) — copied files paste in directly; copied text becomes a synthesised note (
pasted-YYYY-MM-DD....md) so you can quickly capture clipboard snippets without saving a file first. - Click "Add files" — classic file picker.
Supported content:
- PDF — text extracted automatically, chunked, indexed.
- Markdown / Text — added as-is.
- Code, JSON, YAML, CSV — treated as text, often surprisingly useful for "what does this file do?" questions.
Each doc is broken into chunks of roughly half a page each. Chunk count appears next to the doc name once indexing finishes. First-time ingest with the Browser runtime downloads the on-device embedder (about 25MB, one-time).
Renaming the store anywhere — the canvas, the editor, the picker — propagates everywhere. There's one source of truth for the store's name.
Wiring a store into a workflow
Three ways to use a store from an agent, picked by intent. They compose: one agent can use one store via tool, another via template variable.
Tool mode — "let the AI decide"
Wire a Store node directly to an Agent's input. The agent's system prompt automatically gets:
- An awareness block: "You have access to the Product FAQ store. Search it with the
search_product_faqtool when relevant." - The matching tool registered so the AI can call it on demand.
The AI picks per question whether to query. Best for chatbots over multiple topics where some questions need retrieval and others don't.
Requires a tool-capable AI (Claude, GPT-4, Apple Foundation Models, etc.). Smaller / local models without tool calling won't use this path.
Template variable mode — "always retrieve"
Write {{store:my-store-name|q={{input}}|k=5}} in any text field (most often, the agent's prompt). At run time it's replaced with the top-5 retrieval results. The AI always sees the chunks regardless of what it would otherwise decide.
This is the most deterministic and inspectable path. Looking at an agent's prompt tells you exactly when retrieval happens.
The Prompt Wizard authors this form for you when you describe what you want in plain English. See Agents for the wizard surface.
Pipeline mode — "chunks as data"
Chat → Vector Store → Agent. The store runs as a regular pipeline step; its chunks output flows into the agent as input data. Any LLM gets the context — no tool-calling required.
Insert intermediate nodes to rewrite the query: Chat → Code (extract keywords) → Vector Store → Agent.
Workflow-local, global, and project stores
Stores have a scope that controls who can see them.
- Workflow-local (default) — visible only to its origin workflow. Perfect for one-off use cases.
- Global — visible to any of your workflows. Promote a store via the editor's Settings panel. Useful for company-wide knowledge (a handbook, a regulation set, customer history) that many workflows reference.
Pick a store from another workflow via the store picker dropdown on the Vector Store node header — it lists workflow-local stores at the top and your globals below. Selecting a global makes the new node a second view of the same store: same docs, but with that node's own retrieval settings.
Cross-device sync: stores you build while signed in mirror to cloud storage automatically. Open the same project on another machine and the store appears without re-ingesting. Stores created while signed out stay local until you sign in and edit them — then they sync.
Picking an embedder
The runtime in the store's settings controls where embedding happens. Once a store is indexed, querying must use the same runtime — Circuitry shows a clear Re-embed required prompt if you switch.
| Runtime | Where it runs | When to pick |
|---|---|---|
| Auto | Best available for the current device | Default |
| Browser | In the browser via WASM | Offline-friendly, no key needed |
| OpenAI | OpenAI's cloud API | Highest quality; required for webhook-triggered runs |
| EServer / Local-EServer | Your local Python server | Faster than browser when an EServer is connected |
| Apple Intelligence | On-device on iOS/iPadOS | Fully private, when the bridge is available |
Per-node tuning
Two nodes referencing the same store can have different retrieval settings — open the right config panel (gear button on the node) to set:
- Top-K — chunks per query (default 5; 0 disables retrieval entirely).
- Max tokens injected — hard cap on retrieved-content size (default 4000).
- Query template — override the default query expression.
- Output format — with-titles / flat / json.
One node returns 3 chunks for a summariser; another returns 10 from the same store for a detailed-researcher agent.
Where to go next
- Agents — How to wire stores into agents and let the AI use them.
- Vector Store Node Reference — Field-by-field reference for the node.
- Template Variables — The full
{{...}}syntax used in store references.