3-Tier Memory Architecture
3-Tier Memory Architecture
Section titled “3-Tier Memory Architecture”Dewee implements progressive memory retrieval (internal/memory/):
- Working Memory (L0): Active conversation buffer loaded directly in turn context.
- Episodic Memory (L1): Vectorized session summaries stored in PostgreSQL with pgvector embeddings, retrieved via semantic similarity.
- Semantic Memory (L2): Knowledge Graph entities and relations extracted across long-running sessions.
CLI Commands
Section titled “CLI Commands”# Search agent memorydewee memory search --agent <agent-id> --query "deployment architecture"
# Re-index all memory documentsdewee memory index-all --agent <agent-id>Memory facts
Section titled “Memory facts”Memory facts are short, typed statements an agent keeps about a person or a thing, for example “the user’s employer is Acme”. Each fact has a subject, a predicate (with an optional qualifier for multi-valued slots), a value, and the time window it is valid for. The agent uses current facts when it answers. Both the PostgreSQL and the SQLite edition keep facts.
Provenance
Section titled “Provenance”Every fact records where it came from: the conversation summary, channel message, or memory document it was learned from, or the operator who stated it. Each fact also has a verification level (stated, confirmed or inferred) and a confidence. When a newer value replaces an older one, the old fact is kept as history, so you can always see what the agent believed and when.
Review and resolve
Section titled “Review and resolve”When a new value conflicts with a fact the agent already trusts more, the new value is stored as disputed instead of replacing it. Disputed facts wait for an operator:
- Accept makes the disputed value current. The old value becomes history.
- Reject discards the disputed value and keeps the current one.
You can review facts in the dashboard (Memory page, Facts tab) and in the customer app (Memory page, Facts tab, for workspace memory managers). Both let you filter by user, subject, predicate, status and a point in time, and open a fact to see its sources and history.
Delete and forget
Section titled “Delete and forget”- Delete removes one wrong fact from use. The record stays, marked deleted, for audit.
- Forget permanently erases every fact about one user, or about one subject. Use it for erasure requests. It is available from the API and the CLI.
Deleting a reviewed channel-memory item also erases the facts learned from it.
# Review: list disputed facts, then inspect one with its sources and historydewee memory facts list --agent <agent> --status disputeddewee memory facts get --agent <agent> <fact-id>
# Resolve a dispute, or delete a wrong factdewee memory facts resolve --agent <agent> <fact-id> --action acceptdewee memory facts delete --agent <agent> <fact-id> --yes
# State a fact as the operatordewee memory facts assert --agent <agent> --user <user-id> --subject user --predicate employer --value Acme
# Erase everything known about one userdewee memory facts forget --agent <agent> --user <user-id> --yesEvery command accepts --json. delete and forget require --yes.