Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trace_sdk-0.1.2.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

trace_sdk-0.1.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file trace_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: trace_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 10.7 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

Hashes for trace_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 afab1430eeab9ebdd3d8df359c519b4873207c9c73cb2c708dc084fe6797a21b
MD5 310b7a63c13c4d4663cf0a4359523d40
BLAKE2b-256 af2366b8f0e861768752f3c685f9f9a3d978245097e570397804a344471c7a94

See more details on using hashes here.

File details

Details for the file trace_sdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: trace_sdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 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

Hashes for trace_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9283088419201a620508c12719835406f5fd14a89a7132a746a1dd7e0fd2b392
MD5 86e12a78c6499b061bce74c4c1cbe930
BLAKE2b-256 53848eb951528df06e27fecf00667f2156d5e2e7e1b7be722c32a05debfa5f47

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