CortexDB Docs
Docs for CortexDB 0.12.8, the version running on CortexDB Cloud (api.cortexdb.ai).
Integrations

AutoGen

Wrap a Microsoft AutoGen agent with CortexDB long-term memory.

AutoGen-style agents get persistent, cross-session memory through a CortexDB-backed wrapper. Note that cortexdbai[autogen] installs AG2 (the community fork that keeps the autogen import name), and the wrapper is the same code as the AG2 page; Microsoft AutoGen 0.4+ (autogen-agentchat) is not covered.

Install

pip install cortexdbai[autogen]

Memory-backed agent

from cortexdb import Cortex
from cortexdb.integrations.autogen import CortexDBAgent

client = Cortex(api_url="https://api-v1.cortexdb.ai", actor="agent:assistant",
                bearer=os.environ["CORTEX_TOKEN"])

agent = CortexDBAgent(
    name="assistant",
    cortex_client=client,
    scope="org:acme/agent:assistant",
    llm_config={"model": "gpt-4o"},
)

The wrapper recalls before replying and captures the turn afterward. For the community fork, see AG2.

See also

On this page