examples/20_integrations/
tier shows the adapters from this section wired into real agent frameworks. Where
the per-adapter reference pages document the contract, these scripts show the
shape: a working graph, session, or crew you can copy and run. They complement
the broader example tiers (basics → core APIs →
workloads).
Each demo runs on the zero-infra embedded backend (
pip install "khora[sqlite-lance]" + OPENAI_API_KEY) and accepts --config examples/khora.standard.yaml to switch to PostgreSQL + Neo4j. You’ll also need
the framework itself installed (langgraph, openai-agents, or crewai).LangGraph · KhoraStore
account_tree
01_langgraph.py
Long-term memory that survives the graph lifecycle · engine:
vectorcypherStateGraph (recall → respond) backed by KhoraStore. Before each
reply the agent semantically searches prior turns; after it, it persists the new
turn. The point: memory belongs to the store, not the graph. Drop the graph,
rebuild it with the same store, and the history is still there.
KhoraStore implements LangGraph’s BaseStore (asearch / aput)
over a khora namespace scoped to user_id, with VectorCypher handling entity and
recency-aware recall. See the
LangGraph reference for the full contract.
OpenAI Agents SDK · KhoraSession
resume
02_openai_agents.py
Resume a conversation days later
KhoraSession instances share one
namespace under different session_id values (“Monday” and “Tuesday”). Memory
written in one session is recallable from the other, because the namespace is the
isolation boundary, the session is not.
session_id (any string) is mapped onto khora’s via UUID5,
so ids round-trip cleanly. Use the namespace as the per-user boundary and
forget_session to scope retention when a conversation ends. See the
OpenAI Agents reference for khora_recall_tool
and KhoraMemoryHooks.
CrewAI · KhoraMemory
groups
03_crewai_multi_agent.py
Shared vs. private memory across a crew · engine:
vectorcypherKhoraMemory instance.
KhoraMemory binds (kb, namespace, user_id) and plugs into CrewAI’s
unified Memory. Same namespace + different user_id → shared storage,
writes distinguished by user. Different namespaces → full isolation. See the
CrewAI reference.
Other adapters
Google ADK (KhoraMemoryService) and
LlamaIndex ship adapters with their own reference
pages but don’t have a tier-20 walkthrough yet. Every adapter also has a per-framework
smoke test under
examples/integrations/<framework>/
that exercises the contract against a deterministic mock LLM.