Key-value operations
The store works without any configuration — it’s available by default.Put an item
Values must be JSON objects (dicts). Primitive values like strings or numbers are not accepted.
The snippets below assume you are inside an
async def function with an initialized client — see the example above.Get an item
Delete an item
Search items
Namespaces
Namespaces organize your data hierarchically. They work like directory paths:List namespaces
Namespace scoping
All store operations are automatically scoped to the authenticated user’s namespace under["users", <user_id>]. This means:
- An empty namespace defaults to
["users", <user_id>] - A namespace already under your user prefix (e.g.
["users", "alice", "docs"]) passes through unchanged - Any other namespace (e.g.
["configs"]) is automatically prefixed to["users", <user_id>, "configs"]
Configurable scoping
Beyond the default per-user scope, you can define configurable scopes: a map of namespace prefix → list of User attributes understore.scopes in aegra.json. A namespace starting with a configured prefix is isolated under [prefix, *<user attribute values>], where the values come from the authenticated user populated by your auth handler.
Every user whose attribute values match lands in the same scope, so data is shared exactly as widely as those attributes. Mapping an attribute many users share (like org_id) is the common way to share a pool across a group — for example, a knowledge base or agent skills that every member can read and contribute to.
For example, to share data across an organization, map "orgs" to a list containing the user’s org_id in aegra.json:
"orgs" → org_id example):
- A fully-qualified namespace
["orgs", <org_id>, ...]passes through unchanged. The<org_id>is visible inget/search/list_namespacesresponses, which echo the scoped namespace. - Any namespace not fully qualified with your own
org_id(including a foreign org id) is buried under["orgs", <org_id>, ...], so members can never reach another organization’s data. - A request using the
"orgs"prefix when the user has noorg_idreturns 403 Forbidden.
Partitioning by multiple attributes
A scope can list more than one attribute. The namespace is then partitioned by every listed attribute, in order. Reach for this when no single attribute is enough on its own — for example, isolating data per organization and per region, where each org/region pair is its own partition:["regional", ...] is isolated under ["regional", <org_id>, <region>, ...]. All listed attributes are required — a user missing any of them gets 403 Forbidden, exactly as with a single-attribute scope.
You can map any prefix to any attributes your auth handler sets (team_id, tenant_id, region, …), and configure several scopes at once. The "users" prefix is reserved for per-user isolation and cannot be remapped.
Semantic search
When you configure vector embeddings, the store gains semantic search capabilities. Items are automatically embedded when stored and can be queried by meaning.Configuration
Add thestore section to your aegra.json:
Semantic query
Using the store in graphs
Your agents can access the store within graph nodes via LangGraph’s built-in store injection. Items stored via the API are available to the graph, and vice versa.store parameter automatically when the graph is compiled with a store backend (which Aegra provides).