PostgreSQL-backed structured memory and causal debugging engine for autonomous AI agents.
Project description
chronos-mem (Python SDK)
Async, typed client for the chronos-mem agent memory engine.
import asyncio
from chronos_mem import ChronosClient
async def main():
async with ChronosClient(dsn="postgresql://chronos:chronos@localhost:5432/chronos_mem") as db:
plan = await db.create_plan(agent_id="agent-1", goal="Book a vacation to Tokyo")
action = await db.log_action(
plan_id=plan.id,
tool_name="flights.search",
payload={"from": "SFO", "to": "HND"},
)
await db.log_outcome(
action_id=action.id,
status="success",
result={"cheapest_usd": 812},
)
asyncio.run(main())
Install (dev)
pip install -e ".[dev]"
The DSN can also be supplied via the CHRONOS_DSN environment variable instead
of the dsn= argument.
Design
client.py—ChronosClientowns one asyncpsycopg_poolconnection pool; open once per process and share it across concurrent agent calls.tracking.py—create_plan/log_action/log_outcome, the three core write verbs, each a singleINSERT ... RETURNING *.models.py— Pydantic v2 models (Plan,Action,Outcome,Memory) mirroring the SQL schema indb/migrations/001_init_chronos_schema.sql.
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
chronos_mem-0.1.0.tar.gz
(16.9 kB
view details)
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 chronos_mem-0.1.0.tar.gz.
File metadata
- Download URL: chronos_mem-0.1.0.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a082138dcdb0bbe35b36b5d7ca2d49cca6fb7511b4d0c17e40f655bd0fa3d939
|
|
| MD5 |
19c0cdabc17154b7e978ee97fcb9acbe
|
|
| BLAKE2b-256 |
e10923dcdc22e89a851be21621a0b090226a75db8ac73dacc06307d4c7beefe8
|
File details
Details for the file chronos_mem-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chronos_mem-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b964504d18a80d7e234f5fe2b4ad90c1ff6e8ea391ace4885b30130f458bd5f0
|
|
| MD5 |
dcd6444041670c718d1c4126fc871a85
|
|
| BLAKE2b-256 |
aafa688e365f1e02f9b21f635b2b9ab08fc6a81cb33222d8ede0a09e5e5466b7
|