Agent Memory SDK
Store and recall semantic, episodic, and procedural memory through agent-oriented APIs, including links and explainability.
Store, connect, and retrieve context in one embedded engine — without a mandatory cloud service, LLM call, or API key.
pip install velesdbSigned approval · PR #42
supported_by · hop 1
Alice approved the launch
why() · nodes, links, and hop depthThree databases → one binary
A conventional agent stack spreads memory across specialized systems. VelesDB keeps semantic, relational, and structured context in one embedded engine.
Semantic memory
pgvector
Relationships and episodes
Neo4j
Facts and metadata
PostgreSQL
Semantic memory
Native vector search
Relationships and episodes
Native knowledge graph
Facts and metadata
Column and metadata store
Retrieval should be inspectable. VelesDB returns the recalled fact and the typed-link subgraph it can reach, including each node’s hop depth.
memory = MemoryService("./agent.db")
evidence = memory.remember("The signed approval is in PR #42")
memory.remember(
"Alice approved the launch",
links=[(evidence, "supported_by")],
)
answer = memory.recall("Who approved launch?")
trail = memory.why("Why was the launch approved?")
# Evidence nodes and typed links
print(trail["nodes"], trail["edges"])An agent-oriented API, one query surface, and an engine that runs close to your data.
Store and recall semantic, episodic, and procedural memory through agent-oriented APIs, including links and explainability.
Filter structured data, search embeddings, and traverse relationships in one readable query language.
Embed in Rust, Python, TypeScript, Tauri, mobile, or WASM deployments with no mandatory cloud service.
Three outcomes, one engine
From a local prototype to a governed deployment, keep the same explainable memory layer.
Connect facts, episodes, and constraints, then inspect the evidence trail behind every recall.
Embed the same retrieval layer in desktop, mobile, server, or browser applications.
Keep control of the data and add Premium operations when the deployment requires them.
Context Token Compiler + agent skill
After retrieving the right memory, VelesDB compiles logs, documents, and conversations into a deterministic token budget. No LLM or cloud call is used, and every transformation remains auditable and reversible.
Real cl100k token count on the committed 12-turn agent-session benchmark.
0.5 ms mean and 0.7 ms maximum in the published local benchmark.
The same deterministic compiler across all four documented environments.
The bundled velesdb-context-optimizer skill tells the agent when to compile, preserve, or externalize context.
const out = await mem.compileContext({
query: "state of the canary deploy",
token_budget: 4000,
fragments: [
{ content: ciLogs, kind: "log" },
{ content: safetyRule, metadata: { verbatim: true } },
],
});
out.content; // context within budget
out.decisions; // rule, reason, risk per fragment
out.retrievalHandles; // recoverable ctx://source/...82.5% is a project-published measurement on a committed 12-turn fixture, not a universal or billed-token guarantee. Stateless latency is hardware-specific; persisted compilation includes local storage and is slower.
This comparison covers architecture directly evidenced by the VelesDB repositories, without making unverifiable claims about third-party products.
| Memory property | VelesDB | 3-DB stack |
|---|---|---|
| Persistence | One local engine | Separate vector, graph, and SQL stores |
| Query surface | VelesQL + memory APIs | Multiple APIs and query languages |
| Explainable recall | why() evidence trail | Application integration required |
| Vector + graph + columns | One binary | Three specialized systems |
| Offline operation | No mandatory cloud service | Depends on each selected system |
Project benchmark improvement with VelesDB memory.
Project benchmark improvement on temporal questions.
Best reported gain in the reproducible benchmark suite.
Benchmark claims are project-published results; workloads, models, hardware, and methodology matter. Reproduction instructions and raw results are linked from the VelesDB repository.
Choose your runtime and start a first local memory. No cloud account required.
cargo add velesdb-corevelesdb-server --data-dir ./my_datacurl -X POST localhost:8080/collections \
-H 'Content-Type: application/json' \
-d '{"name":"agent_memory","dimension":768,"metric":"cosine"}'curl -X POST localhost:8080/query \
-H 'Content-Type: application/json' \
-d '{"query":"SELECT * FROM agent_memory WHERE vector NEAR $v LIMIT 10","params":{"v":[0.1,0.2]}}'VelesDB Premium v0.7.0
Add governed memory operations, forensic reconstruction, erasure controls, and resilient self-hosted deployment to the VelesDB core.
Policies, audit trails, tenancy, and controls for regulated agent systems.
Reconstruct the memory state and evidence available at decision time.
Forget or admin-purge memory content while retaining an auditable skeleton.
Direct answers about local agent memory, explainability, deployment, and licensing.
VelesDB is an explainable, local-first memory engine for AI agents. It unifies vector search, a knowledge graph, structured columns, text retrieval, and agent-oriented memory APIs in one embedded Rust engine.
VelesDB is designed to run inside your infrastructure without mandatory model calls, API keys, or a hosted memory service. Its why() API exposes the evidence trail behind recalled memories. Mem0 and Zep address agent memory with different hosted and orchestration models.
Yes. VelesDB Core can run locally in server, desktop, mobile, and browser or WASM environments. Memory data and retrieval can stay on the device or inside an air-gapped network.
No AI call is required by the storage engine. Applications may choose to generate embeddings or enrich memories with their own models, including local models, but VelesDB itself does not require a cloud model or API key per write.
why() returns the best-matching memory plus the reachable typed-link subgraph: memory nodes with hop depths and the edges connecting them.
VelesDB provides evidence trails, audit data, and Premium forensic replay capabilities that can support technical logging and traceability controls. Using VelesDB alone does not make a complete system compliant; governance, risk management, and operating procedures still matter.
VelesDB Premium adds enterprise governance, forensic replay, two-level erasure workflows, high availability, and self-hosted or air-gapped operational capabilities. Pricing is provided on request.
VelesDB Core is source-available under the VelesDB Core License 1.0 and can be used at no license cost within its terms. VelesDB Premium is commercially licensed.
Start with the local-first Core engine today, then add enterprise governance when your deployment requires it.