Skip to content
Streamkap
Esc
↑↓navigate↵open⌘Jpreview

Suggest Agent System Prompt

Generate a starter customInstructions block for an agent.

Same two credential shapes as /agents/validate-llm:

  • Inline - raw apiKey (+ optional baseUrl) supplied directly.
  • Saved connection - savedConnectionId references a saved LLM connection; Streamkap loads its apiKey, baseUrl and provider server-side, so the stored secret never leaves the server.

Describes the agent (type, name, description, topics, fields, tools, output schema, optional existing draft) to your own LLM and returns the suggested instructions. The base template, schema field listing and tool signatures are added to the system prompt automatically at deploy time, so the suggestion covers only the custom-instructions part. Nothing is persisted.

Per-tenant rate limit: 30 req/min, counted separately from validate-llm -> 429 with Retry-After. 404 if savedConnectionId does not match a saved connection. Provider failures (timeouts, 4xx, schema errors) return 400 with the provider’s error message.

POST/agents/system-prompt-suggestion
Authorization
AuthorizationBearer token · headerrequired
Request body
requiredapplication/json
providerAgentLlmProviderEnumrequired

Unified LLM provider enum.

A single AgentLlmConnection carries one provider and a set of capabilities (chat / embedding). Each provider supports a fixed set of capabilities, validated on every write.

Allowed:anthropicopenaiopenai-responsesollamaazureazure-openaibedrockqwenopenai-compatible
modelstring
max length 200 · default: ""
apiKeystring

Raw key - never stored

max length 512 · default: ""
baseUrlstring | null
Show properties
Any of:
string
string
null
null
savedConnectionIdstring | null

If set, Streamkap uses the provider, apiKey and baseUrl of the tenant's saved LLM connection with this id and ignores the inline apiKey / baseUrl.

Show properties
Any of:
string
string
null
null
agentTypestringrequired

Agent type (e.g. react, workflow)

min length 1 · max length 50
agentNamestring | null
Show properties
Any of:
string
string
null
null
descriptionstring | null
Show properties
Any of:
string
string
null
null
inputTopicsstring[]
max items 20
selectedFieldsstring[]
max items 50
toolsToolContext[]

Tool name + description list. Replaces the older toolNames-only shape.

max items 50
Show properties
Array of ToolContext
namestringrequired

Tool name as referenced in the agent

min length 1 · max length 200
descriptionstring

What the tool does, free-form

max length 1000 · default: ""
outputSchemaOutputSchemaField[]
max items 50
Show properties
Array of OutputSchemaField
namestringrequired

Output field name

min length 1 · max length 100
typestringrequired

Output field type as the wizard renders it

min length 1 · max length 50
filterSQLstring | null

Active record-filter (matches AgentInputConfig.filterSQL). Anchors the LLM's prompt to the actual shape of records reaching the agent.

Show properties
Any of:
string
string
null
null
existingCustomInstructionsstring | null

Existing draft to refine.

Show properties
Any of:
string
string
null
null
generationHintstring | null

Optional one-line steer the user types into the wizard's 'Hint for AI' input. The meta-prompt already gets the agent's metadata, so this should carry use-case intent (tone, edge-case priority, what to emphasize) rather than restate the data shape.

Show properties
Any of:
string
string
null
null
Responses
200

Successful Response

generatedPromptstringrequired
tokensInintegerrequired
tokensOutintegerrequired
modelstringrequired
providerstringrequired
422

Validation Error

detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X POST 'https://api.streamkap.com/agents/system-prompt-suggestion' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "anthropic",
  "model": "",
  "apiKey": "",
  "baseUrl": "string",
  "savedConnectionId": "string",
  "agentType": "string",
  "agentName": "string",
  "description": "string",
  "inputTopics": [
    "string"
  ],
  "selectedFields": [
    "string"
  ],
  "tools": [
    {
      "name": "string",
      "description": ""
    }
  ],
  "outputSchema": [
    {
      "name": "string",
      "type": "string"
    }
  ],
  "filterSQL": "string",
  "existingCustomInstructions": "string",
  "generationHint": "string"
}'
Response
{
  "generatedPrompt": "string",
  "tokensIn": 0,
  "tokensOut": 0,
  "model": "string",
  "provider": "string"
}