Python SDK for capturing and shipping AI agent traces to a Chronicle server
Project description
chronicle-sdk
Python SDK for Chronicle — the Chrome DevTools for AI agents.
Instrument your agent code with ChronicleTracer to capture tool calls, LLM
calls, agent messages, memory updates, errors, and retries. Events are
buffered and flushed to a local Chronicle server over HTTP in batches; if the
server isn't running, unsent events are written to
chronicle_runs/{run_id}.json so nothing is lost.
Install
pip install -e .
Usage
from chronicle import ChronicleTracer
with ChronicleTracer() as tracer:
tracer.record_event("tool_call", data={"tool_name": "search", "arguments": {"query": "weather in nyc"}})
tracer.record_event("llm_call", data={"model": "gpt-4o", "prompt": "What's the weather?"})
tracer.record_event("agent_message", data={"role": "assistant", "content": "It's sunny."})
LangGraph / LangChain
from chronicle import ChronicleTracer, LangGraphAdapter
tracer = ChronicleTracer()
adapter = LangGraphAdapter(tracer)
graph.invoke(input, config={"callbacks": [adapter]})
Development
pip install -e ".[dev]"
pytest
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 chronicle_agent_sdk-0.8.0.tar.gz.
File metadata
- Download URL: chronicle_agent_sdk-0.8.0.tar.gz
- Upload date:
- Size: 164.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98a212bd574b9b8df6a8e18414222c29ebaa4bd5c7a90ad899fe9fe916ac0068
|
|
| MD5 |
09c54a679abcedcb7df0221ed0e35664
|
|
| BLAKE2b-256 |
be543241303e6883abf4c16177a6b7498d39f632332e1b85096a56689b98294c
|
File details
Details for the file chronicle_agent_sdk-0.8.0-py3-none-any.whl.
File metadata
- Download URL: chronicle_agent_sdk-0.8.0-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52454efe233a0cc1c6cd3387c7e9b8e5ca1d4eb0d761aaf0e8faaa04d5c226d8
|
|
| MD5 |
b36f78594b097fc925305a20e0a17f7f
|
|
| BLAKE2b-256 |
52901342d9c7e8529e954b75cc6f391508806157cce5df8c42a6c22c62b6a9dc
|