Skip to main content

TestNeo Agent SDK — emit agent_run_summary.v1 and ingest into TestNeo (framework adapters optional).

Project description

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 -e "packages/testneo-agent-sdk[dev]"
# optional extras later: [langgraph]

10-minute generic path

export TESTNEO_BASE_URL=http://127.0.0.1:8001
export TESTNEO_API_KEY=...
export TESTNEO_PROJECT_ID=15
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 (e.g. http://127.0.0.1:8001)
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

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

testneo_agent_sdk-0.1.0.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

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

testneo_agent_sdk-0.1.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file testneo_agent_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: testneo_agent_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for testneo_agent_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dab47c84868cbbcd9a1b2fdff2a9368fec867bca0a09a8e6b542d819288179ea
MD5 c396f8ac1cea983b386b335d036377cf
BLAKE2b-256 1672a242d7d56b79a020e7b47ce3f9b61ab5448a12335e7ea369864313696c07

See more details on using hashes here.

File details

Details for the file testneo_agent_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for testneo_agent_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f054ab3d26501ac72c17e74d6bc71e580177107ad5a4a9598edac576f2af95fe
MD5 e0ed197e349d76c5e01db0a0be2a8bae
BLAKE2b-256 01e84ace285770d43d240ac373bdfee7751d8b64bd0e1eacee635ce70b0513e4

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