Memory and Knowledge
These are what make an agent useful on day 30, not just day one. Knowledge is what it can look up. Memory is what it remembers.
The distinction matters:
- Knowledge = reference material you provide. Static. Shared or per-agent.
- Memory = facts the agent learns from conversations. Grows over time.
Part 1 — Knowledge
What knowledge is for
Knowledge sources are documents the agent searches when answering. Use them for anything the agent should quote back to you:
- FTA circulars and Cabinet Decisions
- Your firm's internal policies
- Client-specific tax positions
- Templates and checklists
- Ministry of Finance clarifications
Adding a knowledge source
Step 1 — Open the agent's knowledge card
- Go to Agents, open your agent.
- Find the Knowledge Sources card.
Want every agent to see the same documents? Upload them once under Assets instead. Tenant-wide assets are automatically visible to all agents in your organization. See
Tenant Assets.
Step 2 — Add a source
Click Add source. You can add:
| Source type | Use |
|---|---|
| Text | Paste a circular or policy directly |
| URL | Point at a public document |
| File upload | PDF, DOCX, XLSX, TXT, MD |
Step 3 — Give it metadata
- Title — how the agent will refer to it in citations
- Category — group related documents (VAT, CT, ESR, MOHRE)
- Tags — comma-separated keywords for filtering
Metadata is not cosmetic. The agent uses the title and category when it cites a source, so Federal Decree-Law 8 of 2017 — VAT reads better than doc1.pdf.
Step 4 — Wait for indexing
When you save, IVY OS automatically:
- Extracts the text from the document.
- Splits it into chunks of roughly 1,000 characters with overlap.
- Generates a 1,536-dimension embedding for each chunk.
- Stores the chunks with a
readystatus.
You will see the chunk count and token count update. A ready badge means it is searchable. An error badge means indexing failed — delete and re-upload.
How the agent searches knowledge
When answering, the agent runs a vector search over your chunks: your question is embedded, then the closest chunks are retrieved. This means:
- Exact wording does not matter. "deadline" finds "due date".
- Specific numbers are harder. Searching for "AED 375,000" works only if
that exact figure appears in a chunk.
- Long documents work better than short ones, because chunking has context
to work with.
Training sources (per-agent RAG)
The Training section is a second knowledge area, separate from Knowledge:
- Knowledge Sources — the agent's general reference library
- Training Sources — material specific to this agent's job
Use Training for role-specific material. For example, give the HR agent the MOHRE employment contract templates, and give the tax agent the FTA filing checklists.
Part 2 — Memory
What memory is for
Memory is how the agent remembers things across sessions:
- Your preferences ("always show me the CT, not the VAT")
- Project context ("we're filing for ACME Trading FZE")
- Decisions already made ("we decided to treat this as zero-rated")
- Facts about you ("I am the finance lead at ACME")
Without memory, every conversation starts from zero.
How the agent learns
There are three ways a memory gets written:
1. The agent decides to remember
During a conversation, the agent may call its memory tool on its own. This happens when it hears something durable — a stated preference, a fact about your business, a decision.
You will see it in the activity log as a memory write.
2. You ask it to remember
Say: "Remember that all my clients are mainland companies, not free zone."
3. Automatic extraction
Open a conversation, find the Extract memories action, and click it. The agent reads the conversation and writes the facts worth keeping.
Reading and editing memory
- Go to Agents, open your agent.
- Find the Memory card.
- You see every memory the agent holds, newest first.
For each memory you can:
- Edit the text to correct it
- Delete it to make the agent forget
Correction is better than deletion when the fact is still true. If the agent learned "TRN is 100234567800003" and the real one is 100234567800004, edit it. The agent will use the corrected value immediately.
The Memory Studio
The Memory Studio gives you a fuller view — search, graphs, digests, and export. Go to Memory in the sidebar or open /memory-studio.
It has four tabs.
Tab 1 — Hybrid Search
Search across all memories using both keyword matching and semantic meaning.
- This agent — search only this agent's memories
- Whole tenant — search memories from every agent in your organization
Each result shows a score. A high score means a strong match on both keyword and meaning. Use this when you know roughly what you're looking for but not the exact wording.
Tab 2 — Digests
A digest is a summary the agent wrote from several related memories. Digests help when the same topic comes up repeatedly — the agent reads one digest instead of twenty raw memories.
Click Consolidate now to have the agent group recent memories by topic and write a digest for each group. This is manual, not scheduled.
Digests look like this:
Topic: UAE Tax Regulations Overview The UAE tax framework is governed by several key regulations. VAT was established under Federal Decree-Law No. 8 of 2017 with a 5% standard rate. Corporate tax is levied at 9% on taxable profits exceeding AED 375,000...
If a digest is wrong or out of date, delete it and re-run consolidation.
Tab 3 — Graph
A visual map of how memories link to each other. Each node is a memory, sized by importance, coloured by category. Lines are wikilinks — references an agent wrote from one memory to another.
The graph is a diagnostic tool. Use it to spot:
- Memories that contradict each other
- Memories the agent keeps revisiting
- Orphaned facts that nothing else references
Tab 4 — Export
Download every memory as a .tar.gz containing plain Markdown files. One file per day, with YAML frontmatter and the memory text.
Use this to:
- Back up your agent's memory outside IVY OS
- Edit memories in any text editor before restoring
- Move memory between organizations
Connecting memories with wikilinks
An agent can link one memory to another by writing [[memory-id]] in the text. The Memory Studio parses these into a graph.
To use it yourself:
- In the Memory card, edit a memory.
- Add a reference like: `See [[3f01e936-9aaa-4ea8-8c00-2622ef85e60c]] for the
original filing requirement.`
- The link appears in the Graph tab.
Connecting to external agents
The MCP interface lets other tools read and write your memory. For example, a developer using Claude Code in their terminal can query your agent's memory without switching to IVY OS.
The tool manifest is at /api/v1/memory/mcp.json and lists four tools:
| Tool | What it does |
|---|---|
search_memory |
Hybrid search across memories |
write_memory |
Store a new memory |
list_digests |
Read consolidated digests |
get_memory_graph |
Fetch the link graph |
This requires an API key with memory scope. See API Keys.
Best practices
Do:
- Write memories as complete sentences. "TRN for ACME Trading is 100234567800003"
beats "ACME TRN".
- Review memory monthly. Delete anything stale.
- Use the tenant scope when you want the whole team's agents to share context.
- Export regularly.
Don't:
- Don't use memory as a document store. That's what Knowledge and Assets are for.
- Don't save secrets — passwords, API keys, tokens. Memory is included in every
prompt sent to the LLM.
- Don't let memories contradict each other. If you find a conflict, resolve it.
- Don't expect memory to work for numbers. Embeddings handle concepts better than
figures.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Agent doesn't remember last session | No memories were written | Ask it to remember, or use extract-memories |
| Hybrid search returns nothing | Scope set to This agent | Try Whole tenant |
| Digests are empty | Fewer than 2 memories per category | Add more memories, then consolidate |
| Graph shows no edges | No wikilinks written | Add [[id]] references manually |
| Export produces an empty archive | No memories for that agent | Check the Memory card first |
| Agent cites a fact you deleted | Conversation summary still holds it | Start a new conversation |