Local version control for AI agent behavior.
Project description
Trace
Trace is local version control for AI agent behavior. It captures structured agent runs, compares behavior across runs, and restores the configuration that produced a trusted run.
import trace_sdk as trace
@trace.track(agent="planner", config={"model": "mock-v1"})
def run_agent(request):
tools = trace.wrap_tools({"lookup": lookup})
result = tools["lookup"](request)
trace.decision("lookup_done", status=result["status"])
return result
Commands
trace log
trace show <id>
trace diff <id_a> <id_b>
trace diff <id_a> <id_b> --json
trace revert <id>
trace revert <id> --agent budget_agent
trace serve
trace clear
Runs are stored in .trace/runs/. Config restored by trace revert is stored in .trace/config.json.
Development
uv sync --extra dev
uv run pytest
uv run python examples/demo_agent.py --variant stable
uv run python examples/demo_agent.py --variant drift
uv run trace log
TraceHub lives in tracehub/. Build it with npm install && npm run build; trace serve serves the built assets from tracehub/dist.
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 trace_sdk-0.3.5.tar.gz.
File metadata
- Download URL: trace_sdk-0.3.5.tar.gz
- Upload date:
- Size: 66.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b863c24e9dfbbde96a6822d614675bf6a81baf546bafd642fc91fae4dbb8d4b
|
|
| MD5 |
71a381060a183874229535dc1bc12304
|
|
| BLAKE2b-256 |
eaa328270e2be058c9ef13e191a4af33bc5233dd3c34abaf7254de83e3376d05
|
File details
Details for the file trace_sdk-0.3.5-py3-none-any.whl.
File metadata
- Download URL: trace_sdk-0.3.5-py3-none-any.whl
- Upload date:
- Size: 69.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ffb5895f92bd29a96392768e3b481eee09fbd6836334035d85474f37dc7aa86
|
|
| MD5 |
ef9ab4f289cebd0192a29e2f86805941
|
|
| BLAKE2b-256 |
41d2815e2481c7a4ed9c8f01563861c455662640532dd430e6bc57183d466c26
|