Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CollatedInput Schema

The CollatedInput is the universal runtime contract between Agent Studio and the workflow engine. It fully describes a workflow’s execution environment — language models, agents, tasks, tools, and MCP servers.

Top-Level Structure

class CollatedInput(BaseModel):
    default_language_model_id: str
    language_models: List[Input__LanguageModel]
    tool_instances: List[Input__ToolInstance]
    mcp_instances: List[Input__MCPInstance]
    agents: List[Input__Agent]
    tasks: List[Input__Task]
    workflow: Input__Workflow

Language Models

{
  "default_language_model_id": "model-uuid",
  "language_models": [
    {
      "model_id": "model-uuid",
      "model_name": "gpt-4o",
      "generation_config": {
        "do_sample": true,
        "temperature": 0.1,
        "max_new_tokens": 4096,
        "top_p": 1,
        "top_k": 50,
        "num_beams": 1,
        "max_length": null
      }
    }
  ]
}
FieldTypeDescription
default_language_model_idstringID of the model to use when an agent doesn’t specify one
language_models[].model_idstringUnique identifier
language_models[].model_namestringHuman-readable name
language_models[].generation_configobjectLLM generation parameters

Tool Instances

{
  "tool_instances": [
    {
      "id": "tool-uuid",
      "name": "JSON Reader",
      "python_code_file_name": "tool.py",
      "python_requirements_file_name": "requirements.txt",
      "source_folder_path": "studio-data/workflows/my_workflow/tools/json_reader_abc123",
      "tool_metadata": "{\"user_params\": [\"api_key\"], \"user_params_metadata\": {\"api_key\": {\"required\": true}}}",
      "tool_image_uri": "tool_template_icons/json_reader_abc123_icon.png",
      "is_venv_tool": true
    }
  ]
}
FieldTypeDescription
idstringUnique tool instance identifier
namestringTool name
python_code_file_namestringAlways "tool.py"
python_requirements_file_namestringAlways "requirements.txt"
source_folder_pathstringPath to tool code directory within the artifact
tool_metadatastringJSON-encoded metadata including user parameter definitions
tool_image_uristring or nullRelative path to icon
is_venv_toolbooleanWhether the tool uses a virtual environment

MCP Instances

{
  "mcp_instances": [
    {
      "id": "mcp-uuid",
      "name": "Filesystem Server",
      "type": "NODE",
      "args": ["npx", "@modelcontextprotocol/server-filesystem", "/workspace"],
      "env_names": [],
      "tools": ["read_file", "write_file", "list_directory"],
      "mcp_image_uri": null
    }
  ]
}
FieldTypeDescription
idstringUnique MCP instance identifier
namestringServer name
typestring"PYTHON" or "NODE"
argsarray of stringsServer startup arguments
env_namesarray of stringsRequired environment variable names
toolsarray of strings or nullAvailable tool names (populated at runtime)
mcp_image_uristring or nullRelative path to icon

Agents

{
  "agents": [
    {
      "id": "agent-uuid",
      "name": "Research Analyst",
      "llm_provider_model_id": "model-uuid",
      "crew_ai_role": "Senior Research Analyst",
      "crew_ai_backstory": "You are an experienced analyst...",
      "crew_ai_goal": "Produce accurate research reports",
      "crew_ai_allow_delegation": true,
      "crew_ai_verbose": true,
      "crew_ai_cache": true,
      "crew_ai_temperature": 0.7,
      "crew_ai_max_iter": 10,
      "tool_instance_ids": ["tool-uuid"],
      "mcp_instance_ids": [],
      "agent_image_uri": ""
    }
  ]
}
FieldTypeDescription
idstringUnique agent identifier
namestringAgent name
llm_provider_model_idstring or nullOverride LLM for this agent (uses default if null)
crew_ai_rolestringAgent’s role description
crew_ai_backstorystringAgent’s background context
crew_ai_goalstringAgent’s primary objective
crew_ai_allow_delegationbooleanCan delegate to other agents
crew_ai_verbosebooleanDetailed logging
crew_ai_cachebooleanCache LLM responses
crew_ai_temperaturefloat or nullSampling temperature
crew_ai_max_iterinteger or nullMaximum reasoning iterations
tool_instance_idsarray of stringsIDs of tools this agent can use
mcp_instance_idsarray of stringsIDs of MCP servers this agent can use
agent_image_uristringRelative path to icon

Tasks

{
  "tasks": [
    {
      "id": "task-uuid",
      "description": "Analyze the quarterly sales data and identify trends.",
      "expected_output": "A structured report with trends and recommendations.",
      "assigned_agent_id": "agent-uuid"
    }
  ]
}
FieldTypeDescription
idstringUnique task identifier
descriptionstringTask instructions for the agent
expected_outputstringWhat the agent should produce
assigned_agent_idstring or nullAgent assigned to this task (sequential mode)

Workflow

{
  "workflow": {
    "id": "workflow-uuid",
    "name": "Sales Analysis Workflow",
    "description": "Analyzes quarterly sales data",
    "crew_ai_process": "sequential",
    "agent_ids": ["agent-uuid"],
    "task_ids": ["task-uuid"],
    "manager_agent_id": null,
    "llm_provider_model_id": null,
    "is_conversational": false,
    "created_at": "2025-01-15T10:30:00"
  }
}
FieldTypeDescription
idstringUnique workflow identifier
namestringWorkflow name
descriptionstring or nullWorkflow description
crew_ai_processstring"sequential" or "hierarchical"
agent_idsarray of stringsParticipating agent IDs
task_idsarray of stringsTask IDs in execution order
manager_agent_idstring or nullManager agent for hierarchical mode
llm_provider_model_idstring or nullDefault LLM override for the workflow
is_conversationalbooleanMulti-turn conversation support
created_atstring (ISO 8601) or nullCreation timestamp