Skip to main content
Agent Framework has a first-class extension point for context: ContextProvider. Anona implements it, so memory is injected before every agent.run() call and the turn is stored after, with no vector database and no LLM key of your own.
This installs agent-framework-core, the lean package this adapter actually imports, not the full agent-framework meta package, which additionally pulls in every vendor integration the framework ships (Azure, Anthropic, Bedrock, Redis, and more). If your project already depends on agent-framework for a real chat client, you already have everything this adapter needs.

Setup

That’s the whole integration. context_providers=[...] is all the wiring this needs. agent.run(...) calls this adapter automatically, before and after every run, including runs where the model calls a tool one or more times before answering.

What actually happens on a turn

  • Before the model runs, the adapter searches Anona for the current turn’s question and appends the result to the agent’s instructions. It is appended, never a replacement: your own instructions= text always reaches the model, with Anona’s block added after it.
  • After the model responds, the adapter stores the turn: your question and the model’s final answer.
  • Both happen exactly once per agent.run() call, no matter how many times the model calls a tool along the way. A tool-calling turn still produces exactly one memory search and one stored memory, not one per model step.

Scoping

Memories written under one user_id are only ever returned to that user, so a single space can back every customer of your app. Set user_id/agent_id/ session_id when you construct MemoryBridge, because Agent Framework’s own session object doesn’t carry a stable per-user identity to forward automatically, so scope here is fixed once, at construction time.
If you don’t pass your own session= into agent.run(...), Agent Framework creates a new session (and a new random session ID) on every call. That’s fine: this adapter doesn’t depend on session persistence for memory to work across turns; Anona already keeps continuity through your space_id/user_id scope, independent of whatever the framework does with sessions.

Turning off writes

Keeps recall, skips storing new turns.

Failure behaviour

If Anona is unreachable, the provider contributes no instructions and the agent runs normally. Failures are logged, never raised.