Skip to main content

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.pyChronosClient owns one async psycopg_pool connection pool; open once per process and share it across concurrent agent calls.
  • tracking.pycreate_plan / log_action / log_outcome, the three core write verbs, each a single INSERT ... RETURNING *.
  • models.py — Pydantic v2 models (Plan, Action, Outcome, Memory) mirroring the SQL schema in db/migrations/001_init_chronos_schema.sql.

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

chronos_mem-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chronos_mem-0.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

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

Hashes for chronos_mem-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a082138dcdb0bbe35b36b5d7ca2d49cca6fb7511b4d0c17e40f655bd0fa3d939
MD5 19c0cdabc17154b7e978ee97fcb9acbe
BLAKE2b-256 e10923dcdc22e89a851be21621a0b090226a75db8ac73dacc06307d4c7beefe8

See more details on using hashes here.

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

Hashes for chronos_mem-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b964504d18a80d7e234f5fe2b4ad90c1ff6e8ea391ace4885b30130f458bd5f0
MD5 dcd6444041670c718d1c4126fc871a85
BLAKE2b-256 aafa688e365f1e02f9b21f635b2b9ab08fc6a81cb33222d8ede0a09e5e5466b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page