TestNeo
TestNeo Docs Integrate
How to integrate

Ingest Agent Run Summary

Emit agent_run_summary.v1 from your agent, POST it to TestNeo, then open Agent Verification for Claimed → Observed → Verified and PASS / WARN / BLOCK.

Recommended: testneo-agent-sdk builds the summary and can auto-ingest. The gate stays on the server. Product overview: AI Agent Verification.
← SDK quickstart

This page covers SDK, REST, MCP, n8n, and the mock refund probe.

Other paths

SurfaceWhenEffort
Python SDKDefault for CrewAI / LangGraph / custom~15 min
REST / curlSmoke / Postman / non-Python~5 min
MCPCursor / VS Code — testneo_ingest_agent_run_summary~10 min
n8nOps / Slack on BLOCK~20 min
GitHub ActionsCI fail on BLOCK~30 min

Sample scripts (optional): API repo examples/agent-run-ingest-sample/ — Python, Node, and a tiny mock refund API.

Minimum fields for a useful gate

FieldWhy
agent_run_id, goal, outcomeIdentity of the run
agent_claimClaimed layer
actions[] / touched.toolsObserved tools / handoffs
retrieved[]RAG evidence (short snippets)
touched.apiProduct HTTP (Lane A)
gate_contractexpected_facts, expected_retrieval, memory_policy

Keep payloads thin: tools, short retrieval, memory keys, final claim, API observations, errors. Do not send full prompts, embeddings, or token dumps.

Example body

{
  "agent_run_id": "run-2026-07-30-001",
  "goal": "Refund order 430 for the authenticated customer",
  "outcome": "success",
  "agent_claim": "Full refund completed within 30 days per policy.",
  "authorization": "READ_WRITE",
  "confirmation_obtained": true,
  "actions": [
    {
      "sequence": 1,
      "tool": "create_refund",
      "operation": "WRITE",
      "result": "SUCCESS",
      "arguments": { "order_id": 430, "amount": 49.0, "refund_id": 12 },
      "result_summary": "refund_id=12"
    }
  ],
  "touched": {
    "urls": ["https://staging.your-app.example/"],
    "tools": ["create_refund"]
  }
}

Push the run (REST)

POST {BASE}/api/web/v1/projects/{project_id}/unified-contexts/ingest/agent-run
Authorization: Bearer tn_…
Content-Type: application/json

{ "summary": { … }, "upsert": true, "auto_verify": false }

Save the context_id from the response — you need it for verification.

Run verification

POST {BASE}/api/web/v1/projects/{project_id}/agent-verification/post-agent-gate
Authorization: Bearer tn_…

{
  "context_id": 51,
  "probe_base_url": "https://staging.your-app.example",
  "generate_tests": false
}

Set generate_tests: false for research / content crews. Use API generation only when HTTP was observed (Lane A).

Or skip the API: open Agent Verification in the app, pick the run, set a staging URL if needed, and click Run verification.

Quickstart — see a verified outcome (Lane A)

  1. Create a project + API key at app.testneo.ai
  2. Copy examples/agent-run-ingest-sample/ from the TestNeo API repo
  3. Terminal 1: python3 mock_refund_api.py (listens on http://127.0.0.1:8099)
  4. Terminal 2:
export TESTNEO_BASE_URL=https://app.testneo.ai
export TESTNEO_API_KEY=tn_…
export TESTNEO_PROJECT_ID=15
export PROBE_BASE_URL=http://127.0.0.1:8099
export TESTNEO_RUN_GATE=1
python3 push_agent_run.py

You should see the refund outcome marked VERIFIED.

Without a staging / probe URL, write outcomes stay unverified and the gate rises to WARN — on purpose, so you never get a silent PASS.

curl smoke

curl -sS -X POST \
  "$TESTNEO_BASE_URL/api/web/v1/projects/$TESTNEO_PROJECT_ID/unified-contexts/ingest/agent-run" \
  -H "Authorization: Bearer $TESTNEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d @agent_run_summary.example.json

Then open Agent Verification and Run verification (set Staging base URL for prove-after-write).

MCP (IDE)

  1. Configure the TestNeo MCP server with your API key
  2. Call testneo_ingest_agent_run_summary
  3. Run the post-agent gate with the returned context id (optional staging URL)

Details: MCP documentation

Checklist

  • Prefer SDK for CrewAI / LangGraph / custom agents
  • Unique run id per agent run
  • Ordered actions / tools (not only the final chat message)
  • RAG/memory fields when those matter; ids needed to prove writes (Lane A)
  • Confirmation flag correct for destructive tools
  • Staging URL when you need prove-after-write
  • Secrets never committed

Troubleshooting

SymptomFix
401Check API key / Bearer token
Writes unverified / WARNSet staging URL; include ids the check needs
Outcome contradictedApp state does not match the claim — fix agent or staging data
Policy / retrieval BLOCKWrong or missing docs in the run — usually expected

Product walkthrough — two lanes, UI how-to, FAQ.

Agent Verification →

Questions: support@testneo.ai · Updated Aug 2026