Key Characteristics of Agents
Autonomous
Agents can determine the next best actions by themselves.
Adaptive
Agents adapt their course of action based on real-time feedback.
Interactive
Agents can manipulate their environment by using tools.
In the latest version, agents are built on top of the
You can adjust the parameters to fit the agent to your use case.
agents
SDK to support multi-agent collaboration within an Agency
. The agent class provides context management, async execution, and streamlined tool integration.Agent Parameters
The newAgent
class extends the base agents.Agent
with Agency Swarm-specific capabilities:Agency Swarm Specific Parameters
Name | Parameter | Description |
---|---|---|
Files Folder (optional) | files_folder | Path to a local folder for managing files associated with this agent. If the folder name follows the pattern *_vs_<vector_store_id> , files uploaded via upload_file will also be added to the specified OpenAI Vector Store, and a FileSearchTool will be automatically added. Default: None |
Tools Folder (optional) | tools_folder | Path to a directory containing tool definitions. Tools are automatically discovered and loaded from this directory. Supports both BaseTool subclasses and modern FunctionTool instances. Default: None |
Schemas Folder (optional) | schemas_folder | Path to a directory containing openapi schema files in .json format. Schemas are automatically converted into FunctionTools. Default: None |
API headers (optional) API params (optional) | api_headers api_params | Additional parameters to include into tools converted from OpenAPI schemas. Default: None |
Description (optional) | description | A description of the agent’s role or purpose, used to convey agent’s role to other agents. Default: None |
Send Message Tool Class (optional) | send_message_tool_class | Custom SendMessage tool class to use for inter-agent communication. If None, uses the default SendMessage class. Default: None |
Include Search Results (optional) | include_search_results | Include search results in FileSearchTool output for citation extraction. Default: False |
Validation Attempts (optional) | validation_attempts | Number of retries when an output guardrail trips. Default: 1 |
Throw Input Guardrail Error (optional) | throw_input_guardrail_error | If set to True , input guardrail errors raise an exception. If set to False , the guardrail message is returned as the agent’s response. Default: False |
Core Agent Parameters
Name | Parameter | Description |
---|---|---|
Name (required) | name | The name of the agent. |
Instructions (optional) | instructions | The instructions for the agent. Will be used as the “system prompt” when this agent is invoked. Can be a string or a function that dynamically generates instructions. Default: None |
Model (optional) | model | The model implementation to use when invoking the LLM. If not provided, uses agents SDK default model. Current default model can be found here. Default: None |
Model Settings (optional) | model_settings | Configures model-specific tuning parameters (e.g. temperature, top_p). Default: ModelSettings() |
Tools (optional) | tools | A list of tools that the agent can use. Default: [] |
MCP Servers (optional) | mcp_servers | A list of Model Context Protocol servers that the agent can use. Every time the agent runs, it will include tools from these servers in the list of available tools. Default: [] |
MCP Config (optional) | mcp_config | Configuration for MCP servers. Default: MCPConfig() |
Input Guardrails (optional) | input_guardrails | A list of checks that run in parallel to the agent’s execution, before generating a response. Default: [] |
Output Guardrails (optional) | output_guardrails | A list of checks that run on the final output of the agent, after generating a response. Default: [] |
Output Type (optional) | output_type | The type of the output object. If not provided, the output will be str . In most cases, you should pass a regular Python type (e.g. a dataclass, Pydantic model, TypedDict, etc). Default: None |
To see a full list of agent parameters, refer to OpenAI documentation.Please note that agent handoff parameters are not supported. To enable handoffs, add the SendMessageHandoff tool class to the agent as shown here