POST /mltk/agents
POST /mltk/agents
Create a new agent.
AGENT_RUN_CAPABILITIES
Description. Create a new agent. The handler:
- Inserts a record into
aitk_agent_collectionwith state"Creating". - Calls SCS
POST {scs_url_base}/agent/aws_agentcoreto provision the runtime. - Persists the returned
runtime_idandversion. - Dispatches an asynchronous
agentstatussearch to monitor convergence.
Body (JSON).
| Field | Required | Type | Default | Notes |
|---|---|---|---|---|
name |
yes | string | — | Unique agent name |
runtime_type |
no | string | "AWS_AGENT_CORE" |
Runtime platform |
system_prompt |
no | string | "You are a helpful assistant." |
|
task_prompt |
no | string | "" |
|
description |
no | string | "" |
|
llm |
no | object | {} |
{ "provider": ..., "model": ... } |
mcps |
no | array | [] |
List of { "name": ..., "tools": [...] } |
knowledge_bases |
no | array | [] |
Vector store references |
agent_timeout |
no | int | 450 |
Seconds |
acl |
no | object | owner-share | { "sharing": ..., "perms": { "read": [], "write": [] } } |
Response (200).
{
"agent_name": "demo",
"runtime_type": "AWS_AGENT_CORE",
"tracking_job_id": "1715425200.123"
}
Example.
curl -sk -u "$SPLUNK_USER:$SPLUNK_PASSWORD" -X POST
-H "Content-Type: application/json"
--data @- "$SPLUNK_HOST/servicesNS/nobody/Splunk_ML_Toolkit/mltk/agents?output_mode=json" <<'JSON'
{
"name": "demo",
"description": "Quick demo agent",
"system_prompt": "You are a helpful Splunk admin.",
"task_prompt": "Answer with SPL examples.",
"llm": { "provider": "OpenAI", "model": "gpt-4o-mini" },
"mcps": [ { "name": "splunk_mcp", "tools": ["search", "get_fields"] } ],
"agent_timeout": 450
}
JSON