You're viewing a demo portfolio

Join the waitlist
PRSM

validate_agent_trajectory

Active

Tool of IA-QA — 130+ QA & Dev Tools for AI Agents

declared in 1.0.0

Run declarative assertions on an agent trace (OpenAI tool-call messages, LangChain run trees, or plain text logs). No LLM call — deterministic. Assertion types: order (tool A before B), must_call, must_not_call, max_calls, min_calls, no_error, recovery (agent continues after error). Returns per-assertion PASS/FAIL, parsed steps, and an overall verdict. Use this to gate CI/CD on agent behavior correctness.

Parameters schema

{
  "type": "object",
  "required": [
    "trace",
    "assertions"
  ],
  "properties": {
    "trace": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "array",
          "items": {}
        }
      ],
      "description": "Agent execution trace as JSON (OpenAI messages array, LangChain run tree) or plain text log (Thought/Action/Observation format)."
    },
    "format": {
      "enum": [
        "auto",
        "openai",
        "langchain"
      ],
      "type": "string",
      "description": "Trace format. auto (default) detects automatically."
    },
    "assertions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Optional assertion identifier."
          },
          "max": {
            "type": "number",
            "description": "[max_calls] Maximum number of allowed calls."
          },
          "min": {
            "type": "number",
            "description": "[min_calls] Minimum number of required calls."
          },
          "tool": {
            "type": "string",
            "description": "Tool name to check (for must_call, must_not_call, max_calls, min_calls)."
          },
          "type": {
            "enum": [
              "order",
              "must_call",
              "must_not_call",
              "max_calls",
              "min_calls",
              "no_error",
              "recovery"
            ],
            "type": "string",
            "description": "Assertion type."
          },
          "after": {
            "type": "string",
            "description": "[order] Tool that must be called after."
          },
          "before": {
            "type": "string",
            "description": "[order] Tool that must be called first."
          }
        }
      },
      "maxItems": 30,
      "description": "List of assertions to validate against the trace."
    }
  }
}

What this tool wraps· 0 endpoints

min confidence0.700.50

No endpoints wrapped at confidence ≥ 0.70.

Parent server

IA-QA — 130+ QA & Dev Tools for AI Agents

https://github.com/jcjamet/ia-qa

1/7 registries
View full server →
validate_agent_trajectory — IA-QA — 130+ QA & Dev Tools for AI Agents — PRSM MCP