Argon adapters for AI agent frameworks: sandboxed, versioned MongoDB for LangGraph and Mem0
Project description
argon-agents
Argon adapters for AI agent frameworks: sandboxed, versioned MongoDB for LangGraph and Mem0.
Argon versions MongoDB the way Git versions code — branch, time-travel, diff, merge, undo. This package gives agent frameworks the two things plain MongoDB can't:
- A disposable copy of state to work against. Fork a sandbox with a TTL, point the agent at an ordinary connection string, and production data is never at risk.
- An adopt-or-reject story for what the agent did. Diff the sandbox, merge it back (with conflict strategies), undo any range, or just let the TTL reclaim it.
Install
pip install argon-agents # client + Mem0 factory
pip install "argon-agents[langgraph]" # + the LangGraph checkpointer
Requires a running Argon API server
(cd api && go run .) backed by a MongoDB replica set.
The client
from argon_agents import ArgonClient
argon = ArgonClient("http://localhost:8080")
argon.create_project("support-bot")
sandbox = argon.create_sandbox("support-bot", ttl_minutes=60)
db = sandbox.pymongo_database() # plain pymongo, isolated copy
db.tickets.insert_one({"_id": "t1", "status": "resolved"})
print(sandbox.diff()) # what the agent changed
sandbox.merge() # adopt it — or sandbox.discard()
LangGraph
from argon_agents import ArgonClient, ArgonCheckpointSaver
argon = ArgonClient()
saver = ArgonCheckpointSaver.from_sandbox(argon, "support-bot", ttl_minutes=60)
graph = builder.compile(checkpointer=saver) # any LangGraph graph
graph.invoke(input, {"configurable": {"thread_id": "user-42"}})
saver.merge() # keep the run's checkpoints
# saver.discard() # or reject them
# saver.fork(argon) # or branch the entire memory state and try both
ArgonCheckpointSaver is the official langgraph-checkpoint-mongodb
saver — same wire format, same semantics — running on an Argon branch.
LangGraph's checkpoint ids give step-level rewind within a thread; Argon
adds branch-level fork/merge/undo/audit across the whole store.
Mem0
Mem0 speaks MongoDB natively; Argon supplies the versioned sandbox:
from argon_agents import ArgonClient, sandboxed_mem0_config
from mem0 import Memory
argon = ArgonClient()
config, sandbox = sandboxed_mem0_config(argon, "support-bot")
memory = Memory.from_config({"vector_store": config})
# ... let the agent read/write memories ...
sandbox.merge() # adopt the new memories, or discard(), or let the TTL run
Reproducible evals: dataset pins
A pin is a named, immutable reference to a branch state that survives garbage collection and resets forever. Pin the eval dataset once; fork a fresh sandbox from the pin for every run; every run starts identical:
argon.create_pin("my-project", "eval-v1", note="golden dataset")
run = argon.sandbox_from_pin("my-project", "eval-v1", ttl_minutes=30)
# ... run the eval against run.connection_string ...
run.discard() # the pin itself is untouched — fork again anytime
Tests
pip install -e ".[dev]"
pytest # skips itself unless an Argon stack is reachable
CI builds the engine from argon-lab/argon@master, starts a replica-set
MongoDB and the API server, and runs the full suite.
Project details
Release history Release notifications | RSS feed
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 argon_agents-0.1.0.tar.gz.
File metadata
- Download URL: argon_agents-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
266016598e2bef6595b2e972dd53695f1822102eca6944a599a250fd39f80bfb
|
|
| MD5 |
14d8918837f3eb1b44ed47899f0b4c12
|
|
| BLAKE2b-256 |
de3a7217d4de702c23f1f0911ee0a9b027b3c3dd55c7da21d19bbf0c7d64ee7d
|
File details
Details for the file argon_agents-0.1.0-py3-none-any.whl.
File metadata
- Download URL: argon_agents-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8146c73db091e34c17352dbfb2f3294dcd5fa03e065498ee3390e28b1cb492ac
|
|
| MD5 |
74c45d22847cd1a468d13927b7464dd9
|
|
| BLAKE2b-256 |
f4fb9bdbb45c2a1dc7616ad643bc6ab39518ca1d9a9e9f3d01d4a8779e59846a
|