v3

latestOpenAPI 3.1.0Proprietary2026-08-07266348629.6 KB
Agents

Test Run Agent

Run an agent against a single sample record without deploying to Flink.

Synchronous, hard-capped at 15s wall-clock. Calls the LLM provider directly + dispatches MCP and HTTP tools live; transform tools and memory are intentionally not exercised (the Flink runtime owns them). Per-tenant rate limit: shares the validate-llm bucket (30 req/min/tenant) -> 429.

Provider failures (timeouts, schema errors, unsupported provider) land as a structured error object on the envelope (HTTP still 200) so the FE can render the partial timeline alongside the error context. Only the input-token cap raises (422) - at that point we can't even start the run.

post/agents/test-run

Request body

sampleRecordobject required

One Kafka-shaped record to feed the agent

agentIdstring nullable

Resolves an empty / masked apiKey against the stored agent's encrypted blob. Post-cutover the wizard sends apiKey: '' for every existing-agent test-run; this lets the BE swap in the stored key for legacy inline-key agents that were saved before the Connection cutover (no llmConnectionId to resolve via).

savedConnectionIdstring nullable

Mirror of the ValidateLlmRequest.savedConnectionId path.

skipToolsboolean

When true, every MCP / HTTP tool dispatch returns a canned {skipped: true} payload to the LLM. Use to iterate on prompt shape without burning real tool calls.

Response

Successful Response

{"stackTrail":"components:schemas:TestRunResponse:properties:finalOutput","oasType":"schema","type":"unknown","title":"Finaloutput"}
stoppedReason'completed' | 'max_iterations' | 'error' | 'timeout' required
iterationsUsedinteger required
tokensIninteger required
tokensOutinteger required
durationMsinteger required
approximationsstring[]

Free-form list of caveats, e.g. 'memory_excluded', 'transforms_skipped'.

systemPromptstring nullable

Composed system prompt the LLM actually received - base template + auto-injected schema fields + tool descriptions + customInstructions. Identical to what Flink sends at deploy time (built by the same build_system_prompt). Null when the run errored before reaching the LLM (e.g. llm_resolution_error).

userMessagestring nullable

First user message dispatched to the LLM, after the prompts.user template wraps the (input-fields-filtered) sample record. Lets the test pane show the exact pair of strings the LLM saw on iteration 1. Null when the run errored before message construction.