Autogen integration for Zep
Project description
Zep AutoGen Integration
A dedicated integration package that enables Zep to work seamlessly with Microsoft AutoGen agents, providing persistent conversation memory and intelligent context retrieval.
Installation
pip install zep-autogen
Quick Start
import asyncio
from zep_cloud.client import AsyncZep
from zep_autogen import ZepMemory
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.openai import OpenAIChatCompletionClient
async def main():
# Initialize Zep client
zep_client = AsyncZep(api_key="your-zep-api-key")
# Create Zep memory for your agent
memory = ZepMemory(
client=zep_client,
user_id="user_123",
thread_id="conversation_456"
)
# Create AutoGen agent with Zep memory
agent = AssistantAgent(
name="MemoryAwareAssistant",
model_client=OpenAIChatCompletionClient(model="gpt-4.1-mini"),
memory=[memory] # Add Zep memory to the agent
)
# Your agent now has persistent memory across conversations!
response = await agent.run(task="What's my name again?")
print(response.messages[-1].content)
asyncio.run(main())
Features
- Persistent Memory: Conversations persist across agent sessions
- Intelligent Retrieval: Zep's memory automatically provides relevant context
- AutoGen Compatible: Seamlessly integrates with AutoGen's memory interface
- Async Support: Full async/await support for modern applications
- Type Safety: Fully typed with comprehensive type hints
Configuration
Environment Variables
# Required: Your Zep Cloud API key
export ZEP_API_KEY="your-zep-api-key"
ZepMemory Parameters
client(AsyncZep): Your Zep client instanceuser_id(str): Unique identifier for the userthread_id(str, optional): Thread/conversation identifiermemory_type(str, optional): Type of memory to use (default: "perpetual")max_tokens(int, optional): Maximum tokens to retrieve (default: 4000)
Examples
Basic Usage
See examples/autogen_basic.py for a complete working example.
Multi-Agent with Shared Memory
# Multiple agents can share the same memory context
shared_memory = ZepMemory(
client=zep_client,
user_id="team_project",
thread_id="brainstorm_session"
)
researcher = AssistantAgent(
name="Researcher",
model_client=model_client,
memory=[shared_memory]
)
writer = AssistantAgent(
name="Writer",
model_client=model_client,
memory=[shared_memory]
)
Requirements
- Python 3.10+
zep-cloud>=2.15.0autogen-agentchat>=0.6.1autogen-core>=0.6.1
License
MIT License - see LICENSE for details.
Support
Contributing
Contributions are welcome! Please see our Contributing Guide for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zep_autogen-0.1.1.tar.gz.
File metadata
- Download URL: zep_autogen-0.1.1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c41a379e6c97a62685a690e9e147f2d5739e9a1142a8fe801eb7639a2ee49346
|
|
| MD5 |
570ed65b326b3f8d2a75ec09586afb81
|
|
| BLAKE2b-256 |
959c8ce57bd092dad875b14022daaa32de54733b35aeb13ae34a25c62271bb14
|
Provenance
The following attestation bundles were made for zep_autogen-0.1.1.tar.gz:
Publisher:
release-integrations.yml on getzep/zep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zep_autogen-0.1.1.tar.gz -
Subject digest:
c41a379e6c97a62685a690e9e147f2d5739e9a1142a8fe801eb7639a2ee49346 - Sigstore transparency entry: 313813350
- Sigstore integration time:
-
Permalink:
getzep/zep@52fe1f5be59adaa564c7fb0446a688822f3a9f51 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/getzep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-integrations.yml@52fe1f5be59adaa564c7fb0446a688822f3a9f51 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file zep_autogen-0.1.1-py3-none-any.whl.
File metadata
- Download URL: zep_autogen-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d8e6f179d5b67e54727e895509cf07c4be97cabbc0958ff03d468978aa8b923
|
|
| MD5 |
6d204859f20154e91c316b35ede8e331
|
|
| BLAKE2b-256 |
47e4764af283f2ac00ad8a4d9357f9230fb62b1cbba178a0946ceb24b0488a21
|
Provenance
The following attestation bundles were made for zep_autogen-0.1.1-py3-none-any.whl:
Publisher:
release-integrations.yml on getzep/zep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zep_autogen-0.1.1-py3-none-any.whl -
Subject digest:
1d8e6f179d5b67e54727e895509cf07c4be97cabbc0958ff03d468978aa8b923 - Sigstore transparency entry: 313813368
- Sigstore integration time:
-
Permalink:
getzep/zep@52fe1f5be59adaa564c7fb0446a688822f3a9f51 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/getzep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-integrations.yml@52fe1f5be59adaa564c7fb0446a688822f3a9f51 -
Trigger Event:
workflow_dispatch
-
Statement type: