curl --request POST \
--url https://api.streamkap.com/agents/test-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"name": "<string>",
"input": {
"topicPattern": "<string>",
"inputSerialization": "JsonConfluent",
"fields": [
"<string>"
],
"createTableSQL": "<string>",
"filterSQL": "<string>"
},
"output": {
"topic": "<string>",
"deadLetterTopic": "<string>",
"outputSerialization": "JsonConfluent",
"schema": {}
},
"llm": {
"model": "<string>",
"apiKey": "",
"llmConnectionId": "<string>",
"baseUrl": "<string>",
"temperature": 1,
"maxTokens": 50000,
"timeout": 300,
"thinkingBudgetTokens": 32000,
"ollamaThink": true,
"maxRetries": 10,
"region": "<string>",
"strict": true,
"store": true,
"instructions": "<string>",
"additionalKwargs": {},
"apiVersion": "<string>",
"azureEndpoint": "<string>"
},
"prompts": {
"system": "",
"customInstructions": "",
"user": "<record>{input_json}</record>"
},
"description": "<string>",
"enabled": true,
"agentType": "workflow",
"mcpServer": {
"projectKeyId": "<string>",
"serverUrl": "<string>",
"headers": {}
},
"tools": [
{
"name": "<string>",
"description": "",
"config": {},
"parameters": [
{
"name": "<string>",
"type": "string",
"description": ""
}
]
}
],
"memory": {
"keyField": "<string>",
"shortTerm": {
"enabled": false,
"ttlMs": 3600000,
"maxEntries": 20
},
"longTerm": {
"enabled": false,
"vectorStoreConnectionId": "<string>",
"namespace": "<string>",
"destinationId": "<string>"
}
},
"knowledgeBases": [
{
"id": "<string>",
"name": ""
}
],
"processing": {
"parallelism": 1,
"checkpointIntervalMin": 5,
"maxIterations": 10,
"maxTokensPerHour": 0
}
},
"sampleRecord": {},
"agentId": "<string>",
"savedConnectionId": "<string>",
"skipTools": false
}
'import requests
url = "https://api.streamkap.com/agents/test-run"
payload = {
"config": {
"name": "<string>",
"input": {
"topicPattern": "<string>",
"inputSerialization": "JsonConfluent",
"fields": ["<string>"],
"createTableSQL": "<string>",
"filterSQL": "<string>"
},
"output": {
"topic": "<string>",
"deadLetterTopic": "<string>",
"outputSerialization": "JsonConfluent",
"schema": {}
},
"llm": {
"model": "<string>",
"apiKey": "",
"llmConnectionId": "<string>",
"baseUrl": "<string>",
"temperature": 1,
"maxTokens": 50000,
"timeout": 300,
"thinkingBudgetTokens": 32000,
"ollamaThink": True,
"maxRetries": 10,
"region": "<string>",
"strict": True,
"store": True,
"instructions": "<string>",
"additionalKwargs": {},
"apiVersion": "<string>",
"azureEndpoint": "<string>"
},
"prompts": {
"system": "",
"customInstructions": "",
"user": "<record>{input_json}</record>"
},
"description": "<string>",
"enabled": True,
"agentType": "workflow",
"mcpServer": {
"projectKeyId": "<string>",
"serverUrl": "<string>",
"headers": {}
},
"tools": [
{
"name": "<string>",
"description": "",
"config": {},
"parameters": [
{
"name": "<string>",
"type": "string",
"description": ""
}
]
}
],
"memory": {
"keyField": "<string>",
"shortTerm": {
"enabled": False,
"ttlMs": 3600000,
"maxEntries": 20
},
"longTerm": {
"enabled": False,
"vectorStoreConnectionId": "<string>",
"namespace": "<string>",
"destinationId": "<string>"
}
},
"knowledgeBases": [
{
"id": "<string>",
"name": ""
}
],
"processing": {
"parallelism": 1,
"checkpointIntervalMin": 5,
"maxIterations": 10,
"maxTokensPerHour": 0
}
},
"sampleRecord": {},
"agentId": "<string>",
"savedConnectionId": "<string>",
"skipTools": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
name: '<string>',
input: {
topicPattern: '<string>',
inputSerialization: 'JsonConfluent',
fields: ['<string>'],
createTableSQL: '<string>',
filterSQL: '<string>'
},
output: {
topic: '<string>',
deadLetterTopic: '<string>',
outputSerialization: 'JsonConfluent',
schema: {}
},
llm: {
model: '<string>',
apiKey: '',
llmConnectionId: '<string>',
baseUrl: '<string>',
temperature: 1,
maxTokens: 50000,
timeout: 300,
thinkingBudgetTokens: 32000,
ollamaThink: true,
maxRetries: 10,
region: '<string>',
strict: true,
store: true,
instructions: '<string>',
additionalKwargs: {},
apiVersion: '<string>',
azureEndpoint: '<string>'
},
prompts: {system: '', customInstructions: '', user: '<record>{input_json}</record>'},
description: '<string>',
enabled: true,
agentType: 'workflow',
mcpServer: {projectKeyId: '<string>', serverUrl: '<string>', headers: {}},
tools: [
{
name: '<string>',
description: '',
config: {},
parameters: [{name: '<string>', type: 'string', description: ''}]
}
],
memory: {
keyField: '<string>',
shortTerm: {enabled: false, ttlMs: 3600000, maxEntries: 20},
longTerm: {
enabled: false,
vectorStoreConnectionId: '<string>',
namespace: '<string>',
destinationId: '<string>'
}
},
knowledgeBases: [{id: '<string>', name: ''}],
processing: {
parallelism: 1,
checkpointIntervalMin: 5,
maxIterations: 10,
maxTokensPerHour: 0
}
},
sampleRecord: {},
agentId: '<string>',
savedConnectionId: '<string>',
skipTools: false
})
};
fetch('https://api.streamkap.com/agents/test-run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.streamkap.com/agents/test-run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'name' => '<string>',
'input' => [
'topicPattern' => '<string>',
'inputSerialization' => 'JsonConfluent',
'fields' => [
'<string>'
],
'createTableSQL' => '<string>',
'filterSQL' => '<string>'
],
'output' => [
'topic' => '<string>',
'deadLetterTopic' => '<string>',
'outputSerialization' => 'JsonConfluent',
'schema' => [
]
],
'llm' => [
'model' => '<string>',
'apiKey' => '',
'llmConnectionId' => '<string>',
'baseUrl' => '<string>',
'temperature' => 1,
'maxTokens' => 50000,
'timeout' => 300,
'thinkingBudgetTokens' => 32000,
'ollamaThink' => true,
'maxRetries' => 10,
'region' => '<string>',
'strict' => true,
'store' => true,
'instructions' => '<string>',
'additionalKwargs' => [
],
'apiVersion' => '<string>',
'azureEndpoint' => '<string>'
],
'prompts' => [
'system' => '',
'customInstructions' => '',
'user' => '<record>{input_json}</record>'
],
'description' => '<string>',
'enabled' => true,
'agentType' => 'workflow',
'mcpServer' => [
'projectKeyId' => '<string>',
'serverUrl' => '<string>',
'headers' => [
]
],
'tools' => [
[
'name' => '<string>',
'description' => '',
'config' => [
],
'parameters' => [
[
'name' => '<string>',
'type' => 'string',
'description' => ''
]
]
]
],
'memory' => [
'keyField' => '<string>',
'shortTerm' => [
'enabled' => false,
'ttlMs' => 3600000,
'maxEntries' => 20
],
'longTerm' => [
'enabled' => false,
'vectorStoreConnectionId' => '<string>',
'namespace' => '<string>',
'destinationId' => '<string>'
]
],
'knowledgeBases' => [
[
'id' => '<string>',
'name' => ''
]
],
'processing' => [
'parallelism' => 1,
'checkpointIntervalMin' => 5,
'maxIterations' => 10,
'maxTokensPerHour' => 0
]
],
'sampleRecord' => [
],
'agentId' => '<string>',
'savedConnectionId' => '<string>',
'skipTools' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.streamkap.com/agents/test-run"
payload := strings.NewReader("{\n \"config\": {\n \"name\": \"<string>\",\n \"input\": {\n \"topicPattern\": \"<string>\",\n \"inputSerialization\": \"JsonConfluent\",\n \"fields\": [\n \"<string>\"\n ],\n \"createTableSQL\": \"<string>\",\n \"filterSQL\": \"<string>\"\n },\n \"output\": {\n \"topic\": \"<string>\",\n \"deadLetterTopic\": \"<string>\",\n \"outputSerialization\": \"JsonConfluent\",\n \"schema\": {}\n },\n \"llm\": {\n \"model\": \"<string>\",\n \"apiKey\": \"\",\n \"llmConnectionId\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"temperature\": 1,\n \"maxTokens\": 50000,\n \"timeout\": 300,\n \"thinkingBudgetTokens\": 32000,\n \"ollamaThink\": true,\n \"maxRetries\": 10,\n \"region\": \"<string>\",\n \"strict\": true,\n \"store\": true,\n \"instructions\": \"<string>\",\n \"additionalKwargs\": {},\n \"apiVersion\": \"<string>\",\n \"azureEndpoint\": \"<string>\"\n },\n \"prompts\": {\n \"system\": \"\",\n \"customInstructions\": \"\",\n \"user\": \"<record>{input_json}</record>\"\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"agentType\": \"workflow\",\n \"mcpServer\": {\n \"projectKeyId\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": {}\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"string\",\n \"description\": \"\"\n }\n ]\n }\n ],\n \"memory\": {\n \"keyField\": \"<string>\",\n \"shortTerm\": {\n \"enabled\": false,\n \"ttlMs\": 3600000,\n \"maxEntries\": 20\n },\n \"longTerm\": {\n \"enabled\": false,\n \"vectorStoreConnectionId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"destinationId\": \"<string>\"\n }\n },\n \"knowledgeBases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"\"\n }\n ],\n \"processing\": {\n \"parallelism\": 1,\n \"checkpointIntervalMin\": 5,\n \"maxIterations\": 10,\n \"maxTokensPerHour\": 0\n }\n },\n \"sampleRecord\": {},\n \"agentId\": \"<string>\",\n \"savedConnectionId\": \"<string>\",\n \"skipTools\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.streamkap.com/agents/test-run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"name\": \"<string>\",\n \"input\": {\n \"topicPattern\": \"<string>\",\n \"inputSerialization\": \"JsonConfluent\",\n \"fields\": [\n \"<string>\"\n ],\n \"createTableSQL\": \"<string>\",\n \"filterSQL\": \"<string>\"\n },\n \"output\": {\n \"topic\": \"<string>\",\n \"deadLetterTopic\": \"<string>\",\n \"outputSerialization\": \"JsonConfluent\",\n \"schema\": {}\n },\n \"llm\": {\n \"model\": \"<string>\",\n \"apiKey\": \"\",\n \"llmConnectionId\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"temperature\": 1,\n \"maxTokens\": 50000,\n \"timeout\": 300,\n \"thinkingBudgetTokens\": 32000,\n \"ollamaThink\": true,\n \"maxRetries\": 10,\n \"region\": \"<string>\",\n \"strict\": true,\n \"store\": true,\n \"instructions\": \"<string>\",\n \"additionalKwargs\": {},\n \"apiVersion\": \"<string>\",\n \"azureEndpoint\": \"<string>\"\n },\n \"prompts\": {\n \"system\": \"\",\n \"customInstructions\": \"\",\n \"user\": \"<record>{input_json}</record>\"\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"agentType\": \"workflow\",\n \"mcpServer\": {\n \"projectKeyId\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": {}\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"string\",\n \"description\": \"\"\n }\n ]\n }\n ],\n \"memory\": {\n \"keyField\": \"<string>\",\n \"shortTerm\": {\n \"enabled\": false,\n \"ttlMs\": 3600000,\n \"maxEntries\": 20\n },\n \"longTerm\": {\n \"enabled\": false,\n \"vectorStoreConnectionId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"destinationId\": \"<string>\"\n }\n },\n \"knowledgeBases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"\"\n }\n ],\n \"processing\": {\n \"parallelism\": 1,\n \"checkpointIntervalMin\": 5,\n \"maxIterations\": 10,\n \"maxTokensPerHour\": 0\n }\n },\n \"sampleRecord\": {},\n \"agentId\": \"<string>\",\n \"savedConnectionId\": \"<string>\",\n \"skipTools\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/agents/test-run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"name\": \"<string>\",\n \"input\": {\n \"topicPattern\": \"<string>\",\n \"inputSerialization\": \"JsonConfluent\",\n \"fields\": [\n \"<string>\"\n ],\n \"createTableSQL\": \"<string>\",\n \"filterSQL\": \"<string>\"\n },\n \"output\": {\n \"topic\": \"<string>\",\n \"deadLetterTopic\": \"<string>\",\n \"outputSerialization\": \"JsonConfluent\",\n \"schema\": {}\n },\n \"llm\": {\n \"model\": \"<string>\",\n \"apiKey\": \"\",\n \"llmConnectionId\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"temperature\": 1,\n \"maxTokens\": 50000,\n \"timeout\": 300,\n \"thinkingBudgetTokens\": 32000,\n \"ollamaThink\": true,\n \"maxRetries\": 10,\n \"region\": \"<string>\",\n \"strict\": true,\n \"store\": true,\n \"instructions\": \"<string>\",\n \"additionalKwargs\": {},\n \"apiVersion\": \"<string>\",\n \"azureEndpoint\": \"<string>\"\n },\n \"prompts\": {\n \"system\": \"\",\n \"customInstructions\": \"\",\n \"user\": \"<record>{input_json}</record>\"\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"agentType\": \"workflow\",\n \"mcpServer\": {\n \"projectKeyId\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": {}\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"string\",\n \"description\": \"\"\n }\n ]\n }\n ],\n \"memory\": {\n \"keyField\": \"<string>\",\n \"shortTerm\": {\n \"enabled\": false,\n \"ttlMs\": 3600000,\n \"maxEntries\": 20\n },\n \"longTerm\": {\n \"enabled\": false,\n \"vectorStoreConnectionId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"destinationId\": \"<string>\"\n }\n },\n \"knowledgeBases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"\"\n }\n ],\n \"processing\": {\n \"parallelism\": 1,\n \"checkpointIntervalMin\": 5,\n \"maxIterations\": 10,\n \"maxTokensPerHour\": 0\n }\n },\n \"sampleRecord\": {},\n \"agentId\": \"<string>\",\n \"savedConnectionId\": \"<string>\",\n \"skipTools\": false\n}"
response = http.request(request)
puts response.read_body{
"steps": [
{
"model": "<string>",
"tokensIn": 123,
"tokensOut": 123,
"stopReason": "<string>",
"text": "<string>",
"toolCalls": [
{}
],
"toolName": "<string>",
"toolType": "<string>",
"request": {},
"result": {},
"skipped": true,
"skippedReason": "<string>",
"durationMs": 123,
"error": "<string>"
}
],
"iterationsUsed": 123,
"tokensIn": 123,
"tokensOut": 123,
"durationMs": 123,
"finalOutput": "<unknown>",
"approximations": [
"<string>"
],
"suggestions": [
{
"message": "<string>"
}
],
"warnings": [
{
"message": "<string>"
}
],
"outputSchemaCheck": {
"ok": true,
"missing": [
"<string>"
],
"extra": [
"<string>"
],
"typeMismatches": [
{
"field": "<string>",
"expected": "<string>",
"actual": "<string>"
}
]
},
"systemPrompt": "<string>",
"userMessage": "<string>",
"error": {
"kind": "<string>",
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}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.
curl --request POST \
--url https://api.streamkap.com/agents/test-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"name": "<string>",
"input": {
"topicPattern": "<string>",
"inputSerialization": "JsonConfluent",
"fields": [
"<string>"
],
"createTableSQL": "<string>",
"filterSQL": "<string>"
},
"output": {
"topic": "<string>",
"deadLetterTopic": "<string>",
"outputSerialization": "JsonConfluent",
"schema": {}
},
"llm": {
"model": "<string>",
"apiKey": "",
"llmConnectionId": "<string>",
"baseUrl": "<string>",
"temperature": 1,
"maxTokens": 50000,
"timeout": 300,
"thinkingBudgetTokens": 32000,
"ollamaThink": true,
"maxRetries": 10,
"region": "<string>",
"strict": true,
"store": true,
"instructions": "<string>",
"additionalKwargs": {},
"apiVersion": "<string>",
"azureEndpoint": "<string>"
},
"prompts": {
"system": "",
"customInstructions": "",
"user": "<record>{input_json}</record>"
},
"description": "<string>",
"enabled": true,
"agentType": "workflow",
"mcpServer": {
"projectKeyId": "<string>",
"serverUrl": "<string>",
"headers": {}
},
"tools": [
{
"name": "<string>",
"description": "",
"config": {},
"parameters": [
{
"name": "<string>",
"type": "string",
"description": ""
}
]
}
],
"memory": {
"keyField": "<string>",
"shortTerm": {
"enabled": false,
"ttlMs": 3600000,
"maxEntries": 20
},
"longTerm": {
"enabled": false,
"vectorStoreConnectionId": "<string>",
"namespace": "<string>",
"destinationId": "<string>"
}
},
"knowledgeBases": [
{
"id": "<string>",
"name": ""
}
],
"processing": {
"parallelism": 1,
"checkpointIntervalMin": 5,
"maxIterations": 10,
"maxTokensPerHour": 0
}
},
"sampleRecord": {},
"agentId": "<string>",
"savedConnectionId": "<string>",
"skipTools": false
}
'import requests
url = "https://api.streamkap.com/agents/test-run"
payload = {
"config": {
"name": "<string>",
"input": {
"topicPattern": "<string>",
"inputSerialization": "JsonConfluent",
"fields": ["<string>"],
"createTableSQL": "<string>",
"filterSQL": "<string>"
},
"output": {
"topic": "<string>",
"deadLetterTopic": "<string>",
"outputSerialization": "JsonConfluent",
"schema": {}
},
"llm": {
"model": "<string>",
"apiKey": "",
"llmConnectionId": "<string>",
"baseUrl": "<string>",
"temperature": 1,
"maxTokens": 50000,
"timeout": 300,
"thinkingBudgetTokens": 32000,
"ollamaThink": True,
"maxRetries": 10,
"region": "<string>",
"strict": True,
"store": True,
"instructions": "<string>",
"additionalKwargs": {},
"apiVersion": "<string>",
"azureEndpoint": "<string>"
},
"prompts": {
"system": "",
"customInstructions": "",
"user": "<record>{input_json}</record>"
},
"description": "<string>",
"enabled": True,
"agentType": "workflow",
"mcpServer": {
"projectKeyId": "<string>",
"serverUrl": "<string>",
"headers": {}
},
"tools": [
{
"name": "<string>",
"description": "",
"config": {},
"parameters": [
{
"name": "<string>",
"type": "string",
"description": ""
}
]
}
],
"memory": {
"keyField": "<string>",
"shortTerm": {
"enabled": False,
"ttlMs": 3600000,
"maxEntries": 20
},
"longTerm": {
"enabled": False,
"vectorStoreConnectionId": "<string>",
"namespace": "<string>",
"destinationId": "<string>"
}
},
"knowledgeBases": [
{
"id": "<string>",
"name": ""
}
],
"processing": {
"parallelism": 1,
"checkpointIntervalMin": 5,
"maxIterations": 10,
"maxTokensPerHour": 0
}
},
"sampleRecord": {},
"agentId": "<string>",
"savedConnectionId": "<string>",
"skipTools": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {
name: '<string>',
input: {
topicPattern: '<string>',
inputSerialization: 'JsonConfluent',
fields: ['<string>'],
createTableSQL: '<string>',
filterSQL: '<string>'
},
output: {
topic: '<string>',
deadLetterTopic: '<string>',
outputSerialization: 'JsonConfluent',
schema: {}
},
llm: {
model: '<string>',
apiKey: '',
llmConnectionId: '<string>',
baseUrl: '<string>',
temperature: 1,
maxTokens: 50000,
timeout: 300,
thinkingBudgetTokens: 32000,
ollamaThink: true,
maxRetries: 10,
region: '<string>',
strict: true,
store: true,
instructions: '<string>',
additionalKwargs: {},
apiVersion: '<string>',
azureEndpoint: '<string>'
},
prompts: {system: '', customInstructions: '', user: '<record>{input_json}</record>'},
description: '<string>',
enabled: true,
agentType: 'workflow',
mcpServer: {projectKeyId: '<string>', serverUrl: '<string>', headers: {}},
tools: [
{
name: '<string>',
description: '',
config: {},
parameters: [{name: '<string>', type: 'string', description: ''}]
}
],
memory: {
keyField: '<string>',
shortTerm: {enabled: false, ttlMs: 3600000, maxEntries: 20},
longTerm: {
enabled: false,
vectorStoreConnectionId: '<string>',
namespace: '<string>',
destinationId: '<string>'
}
},
knowledgeBases: [{id: '<string>', name: ''}],
processing: {
parallelism: 1,
checkpointIntervalMin: 5,
maxIterations: 10,
maxTokensPerHour: 0
}
},
sampleRecord: {},
agentId: '<string>',
savedConnectionId: '<string>',
skipTools: false
})
};
fetch('https://api.streamkap.com/agents/test-run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.streamkap.com/agents/test-run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'name' => '<string>',
'input' => [
'topicPattern' => '<string>',
'inputSerialization' => 'JsonConfluent',
'fields' => [
'<string>'
],
'createTableSQL' => '<string>',
'filterSQL' => '<string>'
],
'output' => [
'topic' => '<string>',
'deadLetterTopic' => '<string>',
'outputSerialization' => 'JsonConfluent',
'schema' => [
]
],
'llm' => [
'model' => '<string>',
'apiKey' => '',
'llmConnectionId' => '<string>',
'baseUrl' => '<string>',
'temperature' => 1,
'maxTokens' => 50000,
'timeout' => 300,
'thinkingBudgetTokens' => 32000,
'ollamaThink' => true,
'maxRetries' => 10,
'region' => '<string>',
'strict' => true,
'store' => true,
'instructions' => '<string>',
'additionalKwargs' => [
],
'apiVersion' => '<string>',
'azureEndpoint' => '<string>'
],
'prompts' => [
'system' => '',
'customInstructions' => '',
'user' => '<record>{input_json}</record>'
],
'description' => '<string>',
'enabled' => true,
'agentType' => 'workflow',
'mcpServer' => [
'projectKeyId' => '<string>',
'serverUrl' => '<string>',
'headers' => [
]
],
'tools' => [
[
'name' => '<string>',
'description' => '',
'config' => [
],
'parameters' => [
[
'name' => '<string>',
'type' => 'string',
'description' => ''
]
]
]
],
'memory' => [
'keyField' => '<string>',
'shortTerm' => [
'enabled' => false,
'ttlMs' => 3600000,
'maxEntries' => 20
],
'longTerm' => [
'enabled' => false,
'vectorStoreConnectionId' => '<string>',
'namespace' => '<string>',
'destinationId' => '<string>'
]
],
'knowledgeBases' => [
[
'id' => '<string>',
'name' => ''
]
],
'processing' => [
'parallelism' => 1,
'checkpointIntervalMin' => 5,
'maxIterations' => 10,
'maxTokensPerHour' => 0
]
],
'sampleRecord' => [
],
'agentId' => '<string>',
'savedConnectionId' => '<string>',
'skipTools' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.streamkap.com/agents/test-run"
payload := strings.NewReader("{\n \"config\": {\n \"name\": \"<string>\",\n \"input\": {\n \"topicPattern\": \"<string>\",\n \"inputSerialization\": \"JsonConfluent\",\n \"fields\": [\n \"<string>\"\n ],\n \"createTableSQL\": \"<string>\",\n \"filterSQL\": \"<string>\"\n },\n \"output\": {\n \"topic\": \"<string>\",\n \"deadLetterTopic\": \"<string>\",\n \"outputSerialization\": \"JsonConfluent\",\n \"schema\": {}\n },\n \"llm\": {\n \"model\": \"<string>\",\n \"apiKey\": \"\",\n \"llmConnectionId\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"temperature\": 1,\n \"maxTokens\": 50000,\n \"timeout\": 300,\n \"thinkingBudgetTokens\": 32000,\n \"ollamaThink\": true,\n \"maxRetries\": 10,\n \"region\": \"<string>\",\n \"strict\": true,\n \"store\": true,\n \"instructions\": \"<string>\",\n \"additionalKwargs\": {},\n \"apiVersion\": \"<string>\",\n \"azureEndpoint\": \"<string>\"\n },\n \"prompts\": {\n \"system\": \"\",\n \"customInstructions\": \"\",\n \"user\": \"<record>{input_json}</record>\"\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"agentType\": \"workflow\",\n \"mcpServer\": {\n \"projectKeyId\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": {}\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"string\",\n \"description\": \"\"\n }\n ]\n }\n ],\n \"memory\": {\n \"keyField\": \"<string>\",\n \"shortTerm\": {\n \"enabled\": false,\n \"ttlMs\": 3600000,\n \"maxEntries\": 20\n },\n \"longTerm\": {\n \"enabled\": false,\n \"vectorStoreConnectionId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"destinationId\": \"<string>\"\n }\n },\n \"knowledgeBases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"\"\n }\n ],\n \"processing\": {\n \"parallelism\": 1,\n \"checkpointIntervalMin\": 5,\n \"maxIterations\": 10,\n \"maxTokensPerHour\": 0\n }\n },\n \"sampleRecord\": {},\n \"agentId\": \"<string>\",\n \"savedConnectionId\": \"<string>\",\n \"skipTools\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.streamkap.com/agents/test-run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"name\": \"<string>\",\n \"input\": {\n \"topicPattern\": \"<string>\",\n \"inputSerialization\": \"JsonConfluent\",\n \"fields\": [\n \"<string>\"\n ],\n \"createTableSQL\": \"<string>\",\n \"filterSQL\": \"<string>\"\n },\n \"output\": {\n \"topic\": \"<string>\",\n \"deadLetterTopic\": \"<string>\",\n \"outputSerialization\": \"JsonConfluent\",\n \"schema\": {}\n },\n \"llm\": {\n \"model\": \"<string>\",\n \"apiKey\": \"\",\n \"llmConnectionId\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"temperature\": 1,\n \"maxTokens\": 50000,\n \"timeout\": 300,\n \"thinkingBudgetTokens\": 32000,\n \"ollamaThink\": true,\n \"maxRetries\": 10,\n \"region\": \"<string>\",\n \"strict\": true,\n \"store\": true,\n \"instructions\": \"<string>\",\n \"additionalKwargs\": {},\n \"apiVersion\": \"<string>\",\n \"azureEndpoint\": \"<string>\"\n },\n \"prompts\": {\n \"system\": \"\",\n \"customInstructions\": \"\",\n \"user\": \"<record>{input_json}</record>\"\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"agentType\": \"workflow\",\n \"mcpServer\": {\n \"projectKeyId\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": {}\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"string\",\n \"description\": \"\"\n }\n ]\n }\n ],\n \"memory\": {\n \"keyField\": \"<string>\",\n \"shortTerm\": {\n \"enabled\": false,\n \"ttlMs\": 3600000,\n \"maxEntries\": 20\n },\n \"longTerm\": {\n \"enabled\": false,\n \"vectorStoreConnectionId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"destinationId\": \"<string>\"\n }\n },\n \"knowledgeBases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"\"\n }\n ],\n \"processing\": {\n \"parallelism\": 1,\n \"checkpointIntervalMin\": 5,\n \"maxIterations\": 10,\n \"maxTokensPerHour\": 0\n }\n },\n \"sampleRecord\": {},\n \"agentId\": \"<string>\",\n \"savedConnectionId\": \"<string>\",\n \"skipTools\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/agents/test-run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"name\": \"<string>\",\n \"input\": {\n \"topicPattern\": \"<string>\",\n \"inputSerialization\": \"JsonConfluent\",\n \"fields\": [\n \"<string>\"\n ],\n \"createTableSQL\": \"<string>\",\n \"filterSQL\": \"<string>\"\n },\n \"output\": {\n \"topic\": \"<string>\",\n \"deadLetterTopic\": \"<string>\",\n \"outputSerialization\": \"JsonConfluent\",\n \"schema\": {}\n },\n \"llm\": {\n \"model\": \"<string>\",\n \"apiKey\": \"\",\n \"llmConnectionId\": \"<string>\",\n \"baseUrl\": \"<string>\",\n \"temperature\": 1,\n \"maxTokens\": 50000,\n \"timeout\": 300,\n \"thinkingBudgetTokens\": 32000,\n \"ollamaThink\": true,\n \"maxRetries\": 10,\n \"region\": \"<string>\",\n \"strict\": true,\n \"store\": true,\n \"instructions\": \"<string>\",\n \"additionalKwargs\": {},\n \"apiVersion\": \"<string>\",\n \"azureEndpoint\": \"<string>\"\n },\n \"prompts\": {\n \"system\": \"\",\n \"customInstructions\": \"\",\n \"user\": \"<record>{input_json}</record>\"\n },\n \"description\": \"<string>\",\n \"enabled\": true,\n \"agentType\": \"workflow\",\n \"mcpServer\": {\n \"projectKeyId\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"headers\": {}\n },\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"description\": \"\",\n \"config\": {},\n \"parameters\": [\n {\n \"name\": \"<string>\",\n \"type\": \"string\",\n \"description\": \"\"\n }\n ]\n }\n ],\n \"memory\": {\n \"keyField\": \"<string>\",\n \"shortTerm\": {\n \"enabled\": false,\n \"ttlMs\": 3600000,\n \"maxEntries\": 20\n },\n \"longTerm\": {\n \"enabled\": false,\n \"vectorStoreConnectionId\": \"<string>\",\n \"namespace\": \"<string>\",\n \"destinationId\": \"<string>\"\n }\n },\n \"knowledgeBases\": [\n {\n \"id\": \"<string>\",\n \"name\": \"\"\n }\n ],\n \"processing\": {\n \"parallelism\": 1,\n \"checkpointIntervalMin\": 5,\n \"maxIterations\": 10,\n \"maxTokensPerHour\": 0\n }\n },\n \"sampleRecord\": {},\n \"agentId\": \"<string>\",\n \"savedConnectionId\": \"<string>\",\n \"skipTools\": false\n}"
response = http.request(request)
puts response.read_body{
"steps": [
{
"model": "<string>",
"tokensIn": 123,
"tokensOut": 123,
"stopReason": "<string>",
"text": "<string>",
"toolCalls": [
{}
],
"toolName": "<string>",
"toolType": "<string>",
"request": {},
"result": {},
"skipped": true,
"skippedReason": "<string>",
"durationMs": 123,
"error": "<string>"
}
],
"iterationsUsed": 123,
"tokensIn": 123,
"tokensOut": 123,
"durationMs": 123,
"finalOutput": "<unknown>",
"approximations": [
"<string>"
],
"suggestions": [
{
"message": "<string>"
}
],
"warnings": [
{
"message": "<string>"
}
],
"outputSchemaCheck": {
"ok": true,
"missing": [
"<string>"
],
"extra": [
"<string>"
],
"typeMismatches": [
{
"field": "<string>",
"expected": "<string>",
"actual": "<string>"
}
]
},
"systemPrompt": "<string>",
"userMessage": "<string>",
"error": {
"kind": "<string>",
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request body for POST /agents/test-run.
Carries a full agent config + a sample record. The BE runs the record through the agent (LLM + tools) without touching Flink and returns the timeline so the FE can show what happened.
Full agent config under test
Show child attributes
Show child attributes
One Kafka-shaped record to feed the agent
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).
64Mirror of the ValidateLlmRequest.savedConnectionId path.
64When 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
Response body for POST /agents/test-run.
Show child attributes
Show child attributes
completed, max_iterations, error, timeout Free-form list of caveats, e.g. 'memory_excluded', 'transforms_skipped'.
Deterministic hints (max 4) computed from the agent config + run result. Empty when the run produced a useful structured output. Each suggestion has a stable kind the FE can map to icon / copy.
Show child attributes
Show child attributes
Static config-vs-record checks (e.g. memory keyField missing on the sample) that the Flink runtime would silently swallow at deploy. Empty when nothing is amiss.
Show child attributes
Show child attributes
Field-level diff between the declared output.schema and the LLM's finalOutput. Null when no schema was declared OR the run errored / produced a non-structured (text envelope) result. ok=true means every declared field is present with a compatible type.
Show child attributes
Show child attributes
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).
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.
Structured error envelope on a failed test-run.
Show child attributes
Show child attributes
Was this page helpful?