Docs

Guides · Integrations

Capture every agent boundary

AgentLeak consumes one framework-neutral trace. Use the unified recorder for live execution, an adapter for your runtime, or emit the JSON contract directly.

Choose an integration

New Python integrationStart with agentleak.watch().
Supported frameworkPass the supplied callback or ingest the framework result.
Polyglot serviceEmit the Trace JSON contract or OpenTelemetry events.
Existing execution logNormalize it offline and run the CLI.

Generic recorder

import agentleak

with agentleak.watch("support-bot") as run:
    chain.invoke(inputs, config={"callbacks": [run.callback]})
    # Or record any boundary directly:
    run.tool_call({"customer_id": "canary-42"}, target="crm")
    run.final_output("Request completed")

print(run.report.risk_index, run.report.verdict)

The context manager analyzes on exit. Direct channel methods let you instrument proprietary runtimes without importing an orchestration framework.

Framework adapters

LangChain / LangGraph

Callback capture for tools, model output and agent actions.

CrewAI

Step and task callbacks normalized into one trace.

OpenAI Agents / Swarm

Messages and handoffs mapped to inter-agent evidence.

AutoGen / Semantic Kernel

Conversation and group-agent history ingestion.

LlamaIndex / Pydantic AI

Response sources and typed message history adapters.

Google ADK / smolagents

Event and step ingestion without runtime coupling.

Computer-use agents

Shell, browser, code and generated-file boundaries.

Open every copy-ready adapter example

OpenTelemetry

Translate spans into AgentLeak channels while preserving trace order, source, target and content. Keep raw production payloads out of telemetry when a synthetic or masked value proves the same policy.

agentleak run --trace exported-trace.json --config agentleak.yaml
# Validate first when building a custom exporter
agentleak validate agentleak.yaml --trace exported-trace.json

Coverage checks

  • InputsRecord user-controlled content as the non-disclosure baseline.
  • SourcesCapture tool responses, private memory and retrieved context.
  • ExitsCapture tool calls, agent handoffs, logs, files and final output.
  • OrderingPreserve stable run IDs and event sequence for reproducible leak paths.