maximem-synap-camel-ai
Synap memory integration for CAMEL-AI — plug
Synap in as a native AgentMemory so your ChatAgent gains persistent long-term
memory, plus explicit tools and short-term context.
pip install maximem-synap-camel-ai camel-ai
Surfaces
| Surface | CAMEL extension point | Purpose |
|---|---|---|
SynapAgentMemory |
AgentMemory → ChatAgent(memory=...) |
Recall + persistence layered over CAMEL's own conversation history |
create_synap_tools |
FunctionTool |
Explicit search_memory / store_memory the model can call |
synap_st_system_message |
ChatAgent(system_message=...) |
Fold Synap short-term context into the system prompt |
Native memory
SynapAgentMemory subclasses CAMEL's ChatHistoryMemory and augments it rather
than replacing it — CAMEL's get_context() is the sole source of the model's input,
so the memory must return the real conversation (system + user + assistant). On top
of that live history it:
- recalls Synap's long-term memories and prepends them as a system context block (using the latest user turn as the query);
- persists each completed turn's accumulated transcript to Synap for server-side extraction, under a stable document id.
from camel.agents import ChatAgent
from camel.models import ModelFactory
from maximem_synap import MaximemSynapSDK
from synap_camel_ai import SynapAgentMemory
sdk = MaximemSynapSDK(api_key="sk-...")
memory = SynapAgentMemory(sdk, user_id="alice", customer_id="acme")
agent = ChatAgent(
system_message="You are a concise, friendly support agent.",
model=ModelFactory.create(model_platform="openai", model_type="gpt-4o"),
memory=memory, # constructor only — not agent.memory = ...
)
print(agent.step("Remind me what plan I'm on and my open ticket.").msgs[0].content)
Attach the memory via the constructor (ChatAgent(memory=...)), not
agent.memory = ... afterward.
Explicit tools
from synap_camel_ai import create_synap_tools
agent = ChatAgent(
system_message="You are a helpful assistant.",
tools=create_synap_tools(sdk, user_id="alice", customer_id="acme"),
)
Short-term context
from synap_camel_ai import SynapAgentMemory, synap_st_system_message
agent = ChatAgent(
system_message=synap_st_system_message(
sdk, conversation_id="conv_abc",
system_message="You are a support agent.",
),
memory=SynapAgentMemory(sdk, user_id="alice"),
)
Error policy
- Reads (
search_memory, memory recall) degrade — a Synap blip returns no recall and the turn continues. - The persistence write inside the agent loop is best-effort by default
(
on_error="fallback") so a transient outage never discards a model response; seton_error="raise"for strict environments. - The explicit
store_memorytool raisesSynapIntegrationErroron failure.
Requires Python 3.11+ and camel-ai>=0.2.90.
Release files for maximem-synap-camel-ai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| maximem_synap_camel_ai-0.1.0.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maximem_synap_camel_ai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / maximem_synap_camel_ai-0.1.0.tar.gz
| Download URL | maximem_synap_camel_ai-0.1.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e0e116575dbd5b4b3026bb626b823a6e1e1bf6cabfb1fa4f3e2f355b35afd33
|
|
BLAKE2b-256 checksum How to use checksums |
360410a81b464152d79953d05af7fe80566ae94db6484316fc1de8bac7dc68d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / maximem_synap_camel_ai-0.1.0-py3-none-any.whl
| Download URL | maximem_synap_camel_ai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c06af1d7d68f4c9baba683255888c1a24909cffaf1f853aa85d54f6aabcd7ab7
|
|
BLAKE2b-256 checksum How to use checksums |
e1a2e47ec36fed90aa8ddbc4fd0e3d11418e676ac45baa4ac1598a3ad1d10c1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|