Agentic Network Initialization
To start building your Agentic Network using the Svahnar Agentic AI Framework, begin by defining the top-level key create_vertical_agent_network in your YAML configuration file. Under this key, define each agent with a unique identifier and specify their properties, including roles.
Defining Agents and Roles
Here's how you can initialize your Agentic Network by defining agents:
create_vertical_agent_network:
agent-1:
agent_name: "stock_news_searcher"
agent-2:
agent_name: "sms_sender"
agent-3:
agent_name: "my_supervisor"
Role: "supervisor"
Explanation:
create_vertical_agent_network: The top-level key that initializes the Agentic Network. This acts as a strict container for all agents in the network to function cohesively. Ensure this key is always present in your YAML configuration.agent-1,agent-2,agent-3: Unique identifiers for each agent within the network. These must follow the formatagent-[number]and should always be in order without any duplications.agent_name: A descriptive name for the agent. This name should be both human-readable and agent-readable, meaning other agents or supervisor agents can easily identify and remember this agent using its name. It is recommended to use descriptive names in snake_case format (e.g.,stock_news_searcher).Role: Specifies the role of the agent. Themy_supervisoragent is assigned the role"supervisor", indicating that this agent oversees and coordinates other agents. TheRolefield defaults tonormalif not specified.
Detailed Explanation of Role
The Role field defines the purpose and behavior of an agent within the network. There are two allowed values for Role:
| Role | Description | Required in YAML Configuration? | Example |
|---|---|---|---|
normal | A standard agent that performs specific tasks as defined in the configuration. | No | "normal" |
supervisor | An agent responsible for overseeing and coordinating other agents. Supervisors make decisions and ensure proper functioning of agents under their hierarchy. | Yes (for supervisors) | "supervisor" |
Key Differences Between supervisor and normal Agents
| Feature | normal Agent | supervisor Agent |
|---|---|---|
| Primary Function | Executes tasks assigned to it. | Oversees and coordinates other agents. |
| Tools Provided | Yes, requires tools to perform tasks. | No, supervisors do not perform tasks directly but ensure other agents do. |
| Hierarchical Limitations | Not applicable. | Should manage a limited number of agents to maintain efficiency. |
Recommendations for Supervisors
- Hierarchy Management: Avoid attaching too many agents to a single supervisor. Test and determine the optimal number of agents a supervisor can efficiently manage.
- Role Specification: Always specify the
Rolefor supervisor agents. - Task Delegation: Supervisors do not perform tasks directly. Ensure all tools and resources are provided to the
normalagents under their supervision.
Agent Fields
| Field | Type | Description | Required | Example |
|---|---|---|---|---|
agent_name | String | Unique name for the agent. Must be human-readable and agent-readable. | Yes | "stock_news_searcher" |
Role | String | Role of the agent. Allowed values: normal, supervisor. Defaults to normal. | No | "supervisor" |
Note: If no Role is specified, the agent defaults to a normal agent.
Next Steps
To enable an agent to perform its tasks, it requires an LLM (Large Language Model). Explore more about configuring LLMs in the next page.