Memory and state
In AEL, the Agent Engineering Language, state and long-term memory will be scoped per tenant, agent, session or subject, with retention and deletion rules. Retrieval (RAG) will cover the whole lifecycle of your own documents. Every store will be keyed by a trusted tenant identity, never by what a prompt or an input says.
Status
Planned for AEL Beta 0.0.1. AEL is not available yet.
State and memory will be different
| Kind | What it is | Used for |
|---|---|---|
| Run state | The facts a run needs to continue, with a version number. | Checkpoints, resuming, one owner at a time. |
| Working context | What the current model call sees. | Building one model request, within its size limit. |
| Records | What happened in earlier runs. | History you choose to keep. |
| Long-term memory | Knowledge kept to inform later decisions. | Recall across runs and sessions. |
| Stored data | Files and media a run produced or received. | References with an expiry and access checks. |
Run state will be authoritative; memory will not. A run will never resume from something it merely recalled: it will resume from its checkpoint.
One handler per state
Each agent's state will belong to one of three domains, which you choose:
- Instance: one state for the agent instance, shared by all its runs.
- Session: one state per session, such as a conversation.
- Request: a fresh state for each request.
Within one domain, one handler will run at a time and changes will be applied in turn. Different sessions and requests will run at the same time, within the program's limits.
Scopes
Every piece of memory will have a scope:
| Scope | Visible to |
|---|---|
| Tenant | The whole tenant. |
| Agent | One agent, across its sessions. |
| Session | One conversation or session. |
| Subject | Everything about one subject, such as a customer, within the tenant. |
- A scope will be bound from the trusted identity of the run, and checked on every read, write, search and subscription.
- Sharing a scope will need an explicit grant. Being in the same team of agents, or using the same prompt, will share nothing.
- Each scope will have its own storage limit, and reading from memory will draw on the run's budget.
Retention and deletion
- Each scope will have retention rules: how long entries live and when they expire.
- Deleting an entry will remove it from its indexes and caches too.
- A deleted entry will never be brought back by recovering an older copy.
- Every entry will record where it came from, when, and which version of the agent wrote it.
Shared memory
Agents in a team will be able to share a memory space, such as a common board of findings, only with explicit grants. Writes will be conditional on the version they read, so two agents cannot silently overwrite each other: a conflict will go to a rule you write, which merges the two or rejects one.
Memory will be data
What an agent recalls will be data, like any other input. It will never become a credential, a permission or an instruction. A memory entry that says "this user is an administrator" will grant nothing.
Knowledge and retrieval
Retrieval (RAG) will cover the whole lifecycle: ingest, chunk, embed, index, update and delete, then retrieve with ranking and provenance. You will be able to bring your own knowledge connectors.
- Retrieval will be off, run before a model call, or be a tool the model calls, as you choose.
- You will choose the store, filters, the number of results, the size limit of the retrieved context, freshness rules and what happens when a source is unavailable.
- Reading and writing knowledge will be separate permissions, and every source will be filtered by tenant and access rules.
- Retrieved text will be evidence, marked with its source and version. It will never overwrite the system prompt.
- Heavy work such as ingesting and indexing will run on servers, not on small boards.
Retrieval over your documents shows retrieval over your own documents from end to end.
Your own stores
AEL will come with one reference store for memory and knowledge, and a contract for your own. You will write your own connectors for knowledge sources and stores in AEL; they will keep the same scopes, limits and access checks.
Tenant identity
Agents will be multi-tenant from the start: a trusted tenant identity will flow through every call, store, log and reply.
- The tenant will be set where a request enters, by authentication or by the deployment, never by prompt content.
- A field named "tenant" in a request's data will be ordinary data. It will not be able to change the run's tenant.
- Sharing data between tenants will need an explicit bridge that you configure, listing what may cross.