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 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.v1in the happy path - Adapters must not import the HTTP client
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file testneo_agent_sdk-0.1.1.tar.gz.
File metadata
- Download URL: testneo_agent_sdk-0.1.1.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57358c6423faac408a0e4e94c2615f5f85f881c9c80fe6719b035420c088f10e
|
|
| MD5 |
6695ff515360db02ceab06c5b35c8c9c
|
|
| BLAKE2b-256 |
23e7045595bcf159db6e801194a5c6e46185a19c4f44ef71acea8777d001a663
|
File details
Details for the file testneo_agent_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: testneo_agent_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ed347e54d9edc2ba952838b0db09cb5084d320fdd1b161773289a7752af5183
|
|
| MD5 |
0f790062bf09197bc5c2c6c014f221da
|
|
| BLAKE2b-256 |
abb8890724e2570cb683ed8580b2b9a5009ce8a6a27f5831d76d1e1f5fde4bbc
|