# Create a new sub-agent Creates a new specialized sub-agent that can handle specific tasks. The sub-agent will have access to the specified tools and can be assigned tasks. Endpoint: POST /core/v1/chain/sub_agents Version: v1 Security: APIKeyHeader ## Request fields (application/json): - `name` (string, required) A descriptive name for the sub-agent Example: "Market Research Agent" - `description` (string, required) A detailed description of the sub-agent's purpose and capabilities Example: "Specialized agent for conducting market research and competitive analysis" - `objective` (string, required) The primary goal or objective for the sub-agent Example: "Gather and analyze market information to provide competitive insights" - `tools` (array) List of tool names to include for the sub-agent Example: ["web_search","csv_analysis"] - `workflow_type` (string) The workflow type for the sub-agent Enum: "react", "hierarchical" ## Response 200 fields (application/json): - `sub_agent_id` (string, required) Unique identifier for the new sub-agent Example: "sa-1234abcd" - `sub_agent_info` (object, required) Information about the created sub-agent - `sub_agent_info.id` (string, required) Unique identifier for the sub-agent Example: "sa-1234abcd" - `sub_agent_info.name` (string, required) Name of the sub-agent Example: "Market Research Agent" - `sub_agent_info.description` (string, required) Description of the sub-agent's purpose Example: "Specialized agent for conducting market research and competitive analysis" - `sub_agent_info.status` (string, required) Current status of the sub-agent Example: "ready" - `sub_agent_info.created_at` (string, required) Creation timestamp Example: "2025-04-10T14:30:00Z" - `sub_agent_info.last_active` (any) Last activity timestamp Example: "2025-04-10T15:45:00Z" ## Response 201 fields (application/json): - `sub_agent_id` (string, required) Unique identifier for the new sub-agent Example: "sa-1234abcd" - `sub_agent_info` (object, required) Information about the created sub-agent - `sub_agent_info.id` (string, required) Unique identifier for the sub-agent Example: "sa-1234abcd" - `sub_agent_info.name` (string, required) Name of the sub-agent Example: "Market Research Agent" - `sub_agent_info.description` (string, required) Description of the sub-agent's purpose Example: "Specialized agent for conducting market research and competitive analysis" - `sub_agent_info.status` (string, required) Current status of the sub-agent Example: "ready" - `sub_agent_info.created_at` (string, required) Creation timestamp Example: "2025-04-10T14:30:00Z" - `sub_agent_info.last_active` (any) Last activity timestamp Example: "2025-04-10T15:45:00Z" ## Response 400 fields (application/json): - `body` (string, required) Error message or description - `status_code` (integer, required) HTTP status code Example: 400 - `details` (any) Additional error details if available ## Response 422 fields (application/json): - `body` (string, required) Error message or description - `status_code` (integer, required) HTTP status code Example: 400 - `details` (any) Additional error details if available ## Response 500 fields (application/json): - `body` (string, required) Error message or description - `status_code` (integer, required) HTTP status code Example: 400 - `details` (any) Additional error details if available