Agent Network¶
class
versionhq.agent_network.model.
A Pydantic class to store AgentNetwork
objects that handle multiple agent formations for the task execution.
You can specify a desired formation or allow the agents to determine it autonomously (default).
Solo Agent | Supervising | Squad | Random | |
---|---|---|---|---|
Formation | ![]() |
![]() |
![]() |
![]() |
Usage |
|
|
|
|
Use case | An email agent drafts promo message for the given audience. | The leader agent strategizes an outbound campaign plan and assigns components such as media mix or message creation to subordinate agents. | An email agent and social media agent share the product knowledge and deploy multi-channel outbound campaign. | 1. An email agent drafts promo message for the given audience, asking insights on tones from other email agents which oversee other clusters. 2. An agent calls the external agent to deploy the campaign. |
Quick Start¶
By default, lead agents will determine the best network formation autonomously based on the given task and its goal.
Calling .launch()
method can start executing tasks and generate a tuple of response as a TaskOutput
object and TaskGraph
object.
import versionhq as vhq
network = vhq.form_agent_network(
task=f"create a promo plan to attract a client",
expected_outcome='media mix, key messages, and CTA targets.'
)
res, tg = network.launch()
assert isinstance(res, vhq.TaskOutput)
assert isinstance(tg, vhq.TaskGraph)
Ref. TaskOutput / TaskGraph class.
Visit Playground.