Create orchestration
create_orchestrationCreate a complete orchestration workflow in ONE call. Returns the saved orchestration with its id. Prefer create_orchestration_skeleton + add_steps for plans with more than 3 steps — splitting the build avoids giant tool-call payloads. Use this single-shot form only for trivial orchestrations (≤3 steps). Steps are passed as a JSON-encoded string.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"steps_json": "<steps_json>",
"entry_step_id": "<entry_step_id>"
},
"name": "create_orchestration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| steps_json | Yes | JSON-encoded array of step objects. Each step is an object with {id, name, type, ...type-specific fields}. See the step-type palette in your system prompt for the full field list per type. Keep each step lean — include only fields that differ from zero-defaults. Sub-structures MUST be JSON strings inside each step: route_map_json, route_descriptions_json, parallel_branches_json, human_fields_json, switch_cases_json, output_fields_json (an llm or agent step's answer fields, F1553). Retrieve and ingest steps take add_single_step's flat retrieve_* / ingest_* fields. An agent step that should read the images a person attaches in chat sets "pass_images": true. Minimal example (2 agent steps): '[{"id":"step_abc1234","name":"Analyse","type":"agent","agent_id":"agent_123","prompt_template":"Summarise {{ state.user_input }}","input_keys":["user_input"],"output_key":"summary","next_step_id":"step_def5678"},{"id":"step_def5678","name":"Done","type":"end"}]' | |
| description | No | ||
| max_run_usd | No | The most one run of this workflow may spend on models, in US dollars (0.5 is fifty cents). A run that has spent it stops before its next step and says so. Set a cap only when the person asks for one; 0 removes it. | |
| entry_step_id | Yes | ID of the first step to execute | |
| max_run_credits | No | Cloud only: the most execution credits one run of this workflow may use, 1 or more. A run that reaches it stops before its next step and says so. Set a cap only when the person asks for one; 0 removes it. | |
| max_total_turns | No | Global turn limit (default 100) | |
| timeout_minutes | No | Overall timeout (default 30) | |
| state_schema_json | No | JSON-encoded state-schema object mapping each state key to {type, default, description}. Allowed types: str, int, float, bool, list, dict. Example: '{"user_input":{"type":"str","default":"","description":"Initial user message"}}'. Pass '{}' (empty object JSON) when the orchestration has no upfront state keys. |