Skip to main content

TestNeo Agent SDK

Official Python SDK to emit agent_run_summary.v1 and ingest into TestNeo.

Verification (PASS / WARN / BLOCK) stays on the server. This package never implements the gate.

Your agent / framework
      → TestNeo SDK (or thin adapter)
      → agent_run_summary.v1
      → POST ingest
      → TestNeo Verify / Eval

Install

pip install testneo-agent-sdk
# optional: pip install "testneo-agent-sdk[langgraph]"

10-minute generic path

# Production (default in SDK if unset)
export TESTNEO_BASE_URL=https://app.testneo.ai
# Local / self-hosted instead:
# export TESTNEO_BASE_URL=http://127.0.0.1:8001

export TESTNEO_API_KEY=...          # app.testneo.ai → Settings → API Keys
export TESTNEO_PROJECT_ID=15        # your project id
from testneo_agent import TestNeo, refund_policy_v2

sdk = TestNeo.from_env()

with sdk.run(goal="Refund order 430") as run:
    run.authorization("READ_WRITE")
    cid = run.tool_called("search_policy_kb", operation="READ", target="policy_refund_v2")
    run.retrieval(
        doc_id="policy_refund_v2",
        snippet="Full refunds only within 30 days of purchase.",
        score=0.88,
        emit_action=False,
    )
    run.tool_completed(call_id=cid, result_summary="matched policy_refund_v2")
    run.confirmation(True)
    run.set_gate_contract(refund_policy_v2(order_id=430))
    run.set_claim("Full refund within 30 days per policy v2.")
# __exit__ builds summary + ingests (TESTNEO_AUTO_INGEST=true by default)

Then open Agent Verification → Verify and select the ingested run.

Framework adapters (P0)

Thin translators only — no HTTP, no gate logic.

Adapter Import
Generic from testneo_agent.adapters import GenericAdapter
LangGraph / LangChain from testneo_agent.adapters import LangGraphAdapter
CrewAI from testneo_agent.adapters import CrewAIAdapter
AutoGen / AG2 from testneo_agent.adapters import AutoGenAdapter
from testneo_agent import TestNeo
from testneo_agent.adapters import LangGraphAdapter

sdk = TestNeo.from_env()
with sdk.run(goal="...", source="langgraph", auto_ingest=True) as run:
    adapter = LangGraphAdapter()
    adapter.bind(run)
    for ev in graph_stream_events:  # your native events
        adapter.on_native_event(ev)
    adapter.finish(final_message)

Architecture

See docs/architecture/TESTNEO_AGENT_SDK_ADAPTERS_PLAN.md.

Layer Responsibility
TestNeoRun Public instrumentation API
Adapters Native events → internal events
Aggregator Internal events → agent_run_summary.v1
Client Ingest (+ optional post-agent-gate)

Config

Env Purpose
TESTNEO_BASE_URL API host — https://app.testneo.ai (prod) or self-hosted / http://127.0.0.1:8001 (local)
TESTNEO_API_KEY Bearer token
TESTNEO_PROJECT_ID Project id
TESTNEO_AUTO_INGEST default true
TESTNEO_AUTO_VERIFY default false (ingest ≠ gate)
TESTNEO_SDK_STRICT raise on SDK errors
TESTNEO_SDK_DEBUG debug logs (secrets masked)

Tests

cd packages/testneo-agent-sdk
pip install -e ".[dev]"
pytest -q

Non-goals

  • Do not modify the verification engine from this package
  • Do not hand-build agent_run_summary.v1 in the happy path
  • Adapters must not import the HTTP client

Metadata

Release files for testneo-agent-sdk 0.1.1

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

Source distribution (sdist)

Source distribution for testneo-agent-sdk 0.1.1
File Size Uploaded Provenance Actions
testneo_agent_sdk-0.1.1.tar.gz 26.6 kB Without provenance Details for testneo_agent_sdk-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for testneo-agent-sdk 0.1.1
File Interpreter ABI Platform Actions
testneo_agent_sdk-0.1.1-py3-none-any.whl Python 3 none any Details for testneo_agent_sdk-0.1.1-py3-none-any.whl

Total release size: 58.1 kB

Release files / testneo_agent_sdk-0.1.1.tar.gz

Download URL testneo_agent_sdk-0.1.1.tar.gz
Size 26.6 kB
Tags Source
SHA-256 checksum
How to use checksums
57358c6423faac408a0e4e94c2615f5f85f881c9c80fe6719b035420c088f10e
BLAKE2b-256 checksum
How to use checksums
23e7045595bcf159db6e801194a5c6e46185a19c4f44ef71acea8777d001a663
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / testneo_agent_sdk-0.1.1-py3-none-any.whl

Download URL testneo_agent_sdk-0.1.1-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ed347e54d9edc2ba952838b0db09cb5084d320fdd1b161773289a7752af5183
BLAKE2b-256 checksum
How to use checksums
abb8890724e2570cb683ed8580b2b9a5009ce8a6a27f5831d76d1e1f5fde4bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for testneo-agent-sdk 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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