Skip to main content
Agents are the core building blocks of the Agency Swarm framework. Each agent is specialized for a specific role and is designed to perform a specific set of processes within an agency.

Key Characteristics of Agents

Autonomous

Agents can decide the next best action to achieve a goal autonomously within the guardrails.

Perceptual

Agents sense the environment, interpret observations, and self-correct based on feedback.

Proactive

Agents can take initiative (monitor, plan, act) and surprise you with the results, or escalate when needed.

Defining AI agents

An AI agent is an autonomous, goal-driven system that perceives its environment, dynamically uses tools and APIs to take actions, adapts proactively within guardrails, and can collaborate with other agents or humans.
Now, let’s breakdown this definition:
  • Autonomous - Agents define their own execution flow independently without hardcoded logic, unlike traditional workflows
  • Goal-driven - Agents are focused on outcomes, rather than on invididual steps
  • Perceives environment - Agents observe the real-world and use the feedback to validate its own actions (e.g., a coding agent testing its code)
  • Dynamic tool use - Agents generate value through actions rather than just responses (most critical characteristic)
  • Adapts within guardrails - Agents balance autonomy with safety constraints for enterprise reliability
  • Collaboration - Agents can work seamlessly with other agents or humans in multi-agent systems

Agent Parameters

In agency swarm, to create an agent, you need to instantiate the Agent class.
To see a full list of agent parameters, refer to OpenAI documentation.Please note that agent handoff parameters are not supported. To enable handoffs, use communication_flows with the Handoff tool class as shown here
Agency Swarm runs the default gpt-5.6-luna model with reasoning effort set to "none". To enable reasoning and receive reasoning events, pass reasoning=Reasoning(effort="low") (or another supported effort) inside ModelSettings.

Agent Template

Create a new agent by instantiating the Agent class:
You can adjust the parameters to fit the agent to your use case.