Skip to main content

summitsdk

Instrument multi-agent AI pipelines and capture every agent-to-agent interaction as a structured trace. Works transparently alongside your existing Anthropic or OpenAI client -- no changes to your agents or pipeline logic required.

Installation

pip install summitsdk

Requires Python 3.8+. OpenAI support is optional:

pip install summitsdk[openai]

Quickstart

Anthropic

from anthropic import Anthropic
from summitsdk.tracer import Tracer
from summitsdk.exporters.local import LocalExporter

exporter = LocalExporter(output_dir="traces/")
tracer = Tracer(exporter=exporter)

client = Anthropic()
wrapped = tracer.wrap_anthropic(
    client,
    from_agent="planner",
    to_agent="worker",
    task_id="task-001",
    round_trip=1
)

response = wrapped.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "your prompt"}]
)
# trace written to traces/

OpenAI

from openai import OpenAI
from summitsdk.tracer import Tracer
from summitsdk.exporters.local import LocalExporter

exporter = LocalExporter(output_dir="traces/")
tracer = Tracer(exporter=exporter)

client = OpenAI()
wrapped = tracer.wrap_openai(
    client,
    from_agent="planner",
    to_agent="worker",
    task_id="task-001",
    round_trip=1
)

response = wrapped.chat.completions.create(
    model="gpt-4o-mini",
    max_tokens=1024,
    messages=[{"role": "user", "content": "your prompt"}]
)
# trace written to traces/

How it works

wrap_anthropic() and wrap_openai() return a proxy client. Every subsequent API call through the proxy is intercepted after the response returns, a trace is recorded, and the original response is passed back unchanged. Your agents never know the wrapper is there.

Each call to wrap_* accepts four required arguments (plus one optional):

Argument Type Description
from_agent str Name of the sending agent
to_agent str Name of the receiving agent
task_id str Identifier for the current task
round_trip int Interaction number within the task
system_instruction str, optional The agent's system prompt — captured on each trace so Summit's online improvement can rewrite and redeliver it

Trace schema

Each interaction produces a JSON file:

{
  "trace_id": "550e8400-e29b-41d4-a716-446655440000",
  "task_id": "task-001",
  "from_agent": "planner",
  "to_agent": "worker",
  "content": "response text",
  "model": "claude-sonnet-4-20250514",
  "input_tokens": 412,
  "output_tokens": 156,
  "round_trip": 1,
  "framework": "anthropic",
  "timestamp": "2026-06-10T14:07:00Z"
}

Traces are written to the output_dir specified in LocalExporter. Filenames are generated from task_id, agent names, round trip number, and a short UUID fragment to avoid collisions.

Error handling

Trace recording failures log a warning to stderr and never raise an exception or interrupt the underlying API call. If a trace cannot be written, your pipeline continues unaffected.

[summitsdk] Warning: trace recording failed
for planner->worker: PermissionError: ...

Streaming is not supported. Calling messages.stream() through a wrapped client raises NotImplementedError with a clear message.

Compatibility

summitsdk wraps the raw Anthropic and OpenAI Python clients directly. It works with any framework or orchestration layer built on top of these clients including LangGraph, CrewAI, AutoGen, and custom implementations.

Summit

summitsdk is the instrumentation layer for Summit.

Summit ingests the traces produced by this SDK, scores every agent handoff across a set of collaboration dimensions using a reward model, and automatically rewrites agent system prompts to fix the patterns that score lowest. The reward model compounds in accuracy as more pipelines are observed.

License

MIT

Download files

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

Source Distribution

summitsdk-0.3.5.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

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

summitsdk-0.3.5-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file summitsdk-0.3.5.tar.gz.

File metadata

  • Download URL: summitsdk-0.3.5.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for summitsdk-0.3.5.tar.gz
Algorithm Hash digest
SHA256 2f0403602bc727e94697b6a2fa55b4d55e4dd3adce344d535e3feb8903257610
MD5 7a05150c9027c905ea66d032d745b0af
BLAKE2b-256 c5e177dc6206f2652d7b9ca58434f95e0f39d7d3b4e27a7c7d3f2fb9d3bd9042

See more details on using hashes here.

Provenance

The following attestation bundles were made for summitsdk-0.3.5.tar.gz:

Publisher: release.yml on shaz-hussain12/summit-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file summitsdk-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: summitsdk-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for summitsdk-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 288b6f77b6d8ed1d0ce0813ad81479ba5dd20d5e30885685a3b4cf3f890342de
MD5 3182ad76244ec2d3cfd206f2a6759b5c
BLAKE2b-256 138f8f15c7ce5df7b35edb8b0c5e6d014ac136f2231ff61f55c9e2d1251ab78b

See more details on using hashes here.

Provenance

The following attestation bundles were made for summitsdk-0.3.5-py3-none-any.whl:

Publisher: release.yml on shaz-hussain12/summit-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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