Skip to main content

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 format agent-[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. The my_supervisor agent is assigned the role "supervisor", indicating that this agent oversees and coordinates other agents. The Role field defaults to normal if 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:

RoleDescriptionRequired in YAML Configuration?Example
normalA standard agent that performs specific tasks as defined in the configuration.No"normal"
supervisorAn 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

Featurenormal Agentsupervisor Agent
Primary FunctionExecutes tasks assigned to it.Oversees and coordinates other agents.
Tools ProvidedYes, requires tools to perform tasks.No, supervisors do not perform tasks directly but ensure other agents do.
Hierarchical LimitationsNot 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 Role for supervisor agents.
  • Task Delegation: Supervisors do not perform tasks directly. Ensure all tools and resources are provided to the normal agents under their supervision.

Agent Fields

FieldTypeDescriptionRequiredExample
agent_nameStringUnique name for the agent. Must be human-readable and agent-readable.Yes"stock_news_searcher"
RoleStringRole 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.