Skip to main content

agenttrafficlab

Zero-dependency Python client for Agent Traffic Lab, an execution infrastructure layer for supported external agent tasks. ATL handles eligible provider selection, execution, bounded fallback, result verification, and durable Outcome when supply is available.

Install

pip install agenttrafficlab
from agenttrafficlab import run

result = run("search latest critical CVE")
print(result["result"])
print(result["execution_status"])

For the default tenant, run() now calls ATL's canonical atl_complete_task MCP tool directly. The caller sends the natural-language task once; ATL chooses an eligible provider/tool, executes it, applies bounded fallback when needed, verifies the result, and records the durable Outcome automatically. There is no client-side decide -> execute round trip and no separate feedback callback.

When capability is omitted, the SDK leaves capability inference to ATL. Pass it only when the caller already knows the required capability.

result = run("extract the fields from this page")
result = run("custom task", capability="extract")

You can also call the default path explicitly:

from agenttrafficlab import complete_task

result = complete_task("translate Hello into Spanish")

The returned object is ATL's structured task result and retains advanced decision and execution evidence for callers that need it.

Optional: recover a failed primary call

If an external provider fails, an agent host can explicitly opt into a bounded rescue. This is for user-authorized read-only or idempotent work only, not purchases, writes or other non-repeat-safe actions. A failure does not mean the original tool had no side effects.

from agenttrafficlab import run_with_rescue

def primary():
    return existing_provider_summary()  # your own existing function

result = run_with_rescue(
    "Summarize this supplied support ticket: Unable to sign in after a reset.",
    primary,
    capability="summarize",
    recoverable=(TimeoutError, ConnectionError),
)
print(result["source"], result["result"])

If the primary succeeds, no ATL request occurs. Only the specified exception classes trigger rescue; unrelated failures propagate. An optional accept_primary=lambda result: ... can reject an invalid primary output and trigger rescue. ATL receives only the task supplied by the caller, not the exception or stack. Rescue occurs at most once and succeeds only when ok=true, execution_status=EXECUTED, and result_validation.passed=true; otherwise the helper raises ATLClientError. Host permissions, provider eligibility and billing boundaries still apply.

For normal tasks without any failure, continue using complete_task() or run() directly when ATL's routing, validation and Outcome add value. The host decides whether to delegate; ATL cannot force calls from unrelated agents.

Advanced: Decision only

from agenttrafficlab import decide

result = decide("search latest critical CVE")
print(result["recommended_provider"]["provider_id"])

Use decide() only when your own system specifically needs routing/Decision evidence without immediate ATL-owned completion. execute_decision() remains available for explicit Decision-bound execution. If you pass a non-default tenant_scope to run(), the client preserves that advanced Decision-bound path for backward compatibility.

When execution happens outside ATL, report the real result if you want it included as Outcome evidence. Normal run() / complete_task() usage records Outcome automatically.

Provider selection remains ATL-owned; callers do not choose a provider directly.

Public surfaces:

  • MCP / default complete-task path: https://mcp.agenttrafficlab.com/mcp
  • Decision API: https://mcp.agenttrafficlab.com/intent-entrance/decision
  • Execution API: https://mcp.agenttrafficlab.com/intent-entrance/execute
  • Live demo: https://mcp.agenttrafficlab.com/try

Python 3.9+; no runtime dependencies.

Metadata

Release files for agenttrafficlab 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agenttrafficlab 0.1.6
File Size Uploaded Provenance Actions
agenttrafficlab-0.1.6.tar.gz 7.1 kB With provenance Details for agenttrafficlab-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agenttrafficlab 0.1.6
File Interpreter ABI Platform Actions
agenttrafficlab-0.1.6-py3-none-any.whl Python 3 none any Details for agenttrafficlab-0.1.6-py3-none-any.whl

Total release size: 15.5 kB

Release files / agenttrafficlab-0.1.6.tar.gz

Download URL agenttrafficlab-0.1.6.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b9767d71892cb9b6b58b390ae027bc67c5d78fa7dc47022f9621614aabbd4896
BLAKE2b-256 checksum
How to use checksums
231cfe98c37d9990bd0a2099ff5926fc2382c7ef1c9595eac47ce405bab4bf8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / agenttrafficlab-0.1.6-py3-none-any.whl

Download URL agenttrafficlab-0.1.6-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd3933f659e88804fd500109fa94771b13f458904c81166413afe4e8147064b2
BLAKE2b-256 checksum
How to use checksums
c6b3d76b70faf586fb6bef9a6cc677bd09c85bc78ed4a790211a618526400cc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Security for agenttrafficlab 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agenttrafficlab-0.1.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page