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.2.1.tar.gz (62.3 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.2.1-py3-none-any.whl (65.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for trace_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 40c3c503938a877de36b2119c8fb78a7e98f6d3de5902cbf4c2cf3e0c17e5093
MD5 01c1b1c4dcdf510426c9b0d95af00645
BLAKE2b-256 bd7dde5f08068e446bcff50e462d2374aa92b9c75a82635d3b23a7ce15b955a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trace_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 65.2 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 efbfaa70e0e41fa75188a38808a5f8cc3e8f44e815201821e4c6bd98eb4f3996
MD5 74ae7be0133b1a126c47b21f63fa488d
BLAKE2b-256 19939a9e344d448da368c8ec39a7d043abf66dd849a46612fce79f6afa2a84fa

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