versionhq 1.2.2.4__py3-none-any.whl → 1.2.2.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
versionhq/__init__.py CHANGED
@@ -32,7 +32,7 @@ from versionhq.agent_network.formation import form_agent_network
32
32
  from versionhq.task_graph.draft import workflow
33
33
 
34
34
 
35
- __version__ = "1.2.2.4"
35
+ __version__ = "1.2.2.5"
36
36
  __all__ = [
37
37
  "Agent",
38
38
 
@@ -38,7 +38,7 @@ vhq_formation_planner = Agent(
38
38
  "Solo is a formation where a single agent with tools, knowledge, and memory handles tasks indivudually. When self-learning mode is on - it will turn into Random formation. Typical usecase is an email agent drafts promo message for the given audience using their own knowledge.",
39
39
  "Supervising is a formation where the leader agent gives directions, while sharing its knowledge and memory with subbordinates.Subordinates can be solo agents or networks. Typical usecase is that the leader agent strategizes an outbound campaign plan and assigns components such as media mix or message creation to subordinate agents.",
40
40
  "Network is a formation where multple agents can share tasks, knowledge, and memory among network members without hierarchy. Typical usecase is that an email agent and social media agent share the product knowledge and deploy multi-channel outbound campaign. ",
41
- "Random is a formation where a single agent handles tasks, asking help from other agents without sharing its memory or knowledge. Typical usecase is that an email agent drafts promo message for the given audience, asking insights on tones from other email agents which oversee other customer clusters, or an agent calls the external, third party agent to deploy the campaign. ",
41
+ "Random is a formation where a single agent handles tasks, asking help from other agents without sharing its memory or knowledge. Typical usecase is that an email agent drafts promo message for the given audience, asking insights on tones from other email agents which oversee other customer clusters, or an agent calls the external, third party agent to deploy the campaign.",
42
42
  ]
43
43
  )
44
44
 
versionhq/agent/model.py CHANGED
@@ -35,8 +35,8 @@ class Agent(BaseModel):
35
35
  config: Optional[Dict[str, Any]] = Field(default=None, exclude=True, description="values to add to the Agent class")
36
36
 
37
37
  id: UUID4 = Field(default_factory=uuid.uuid4, frozen=True)
38
- role: str = Field(description="role of the agent - used in summary and logs")
39
- goal: str = Field(description="concise goal of the agent (details are set in the Task instance)")
38
+ role: str = Field(description="required. agent's role")
39
+ goal: Optional[str] = Field(default=None)
40
40
  backstory: Optional[str] = Field(default=None, description="developer prompt to the llm")
41
41
  skillsets: Optional[List[str]] = Field(default_factory=list)
42
42
  tools: Optional[List[Any]] = Field(default_factory=list)
@@ -92,7 +92,7 @@ class Agent(BaseModel):
92
92
 
93
93
  @model_validator(mode="after")
94
94
  def validate_required_fields(self) -> Self:
95
- required_fields = ["role", "goal"]
95
+ required_fields = ["role",]
96
96
  for field in required_fields:
97
97
  if getattr(self, field) is None:
98
98
  raise ValueError(f"{field} must be provided either directly or through config")
@@ -172,7 +172,7 @@ class Agent(BaseModel):
172
172
  skills = ", ".join([item for item in self.skillsets]) if self.skillsets else ""
173
173
  tools = ", ".join([item.name for item in self.tools if hasattr(item, "name") and item.name is not None]) if self.tools else ""
174
174
  role = self.role.lower()
175
- goal = self.goal.lower()
175
+ goal = self.goal.lower() if self.goal else ""
176
176
 
177
177
  if self.tools or self.skillsets:
178
178
  backstory = BACKSTORY_FULL.format(role=role, goal=goal, skills=skills, tools=tools)
@@ -494,7 +494,7 @@ class Agent(BaseModel):
494
494
  Defines and executes a task when it is not given and returns TaskOutput object.
495
495
  """
496
496
 
497
- if not self.goal or not self.role:
497
+ if not self.role or not self.goal:
498
498
  return None
499
499
 
500
500
  from versionhq.task.model import Task
@@ -595,7 +595,7 @@ class Agent(BaseModel):
595
595
 
596
596
 
597
597
  def __repr__(self):
598
- return f"Agent(role={self.role}, goal={self.goal}"
598
+ return f"Agent(role={self.role}, id={str(self.id)}"
599
599
 
600
600
  def __str__(self):
601
601
  return super().__str__()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.2.4
3
+ Version: 1.2.2.5
4
4
  Summary: An agentic orchestration framework for building agent networks that handle task automation.
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -227,10 +227,7 @@ The following code snippet demonstrates agent customization:
227
227
  ```python
228
228
  import versionhq as vhq
229
229
 
230
- agent = vhq.Agent(
231
- role="Marketing Analyst",
232
- goal="my amazing goal"
233
- ) # assuming this agent was created during the network formation
230
+ agent = vhq.Agent(role="Marketing Analyst")
234
231
 
235
232
  # update the agent
236
233
  agent.update(
@@ -321,8 +318,8 @@ To create an agent network with one or more manager agents, designate members us
321
318
  ```python
322
319
  import versionhq as vhq
323
320
 
324
- agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
325
- agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
321
+ agent_a = vhq.Agent(role="agent a", llm="llm-of-your-choice")
322
+ agent_b = vhq.Agent(role="agent b", llm="llm-of-your-choice")
326
323
 
327
324
  task_1 = vhq.Task(
328
325
  description="Analyze the client's business model.",
@@ -1,4 +1,4 @@
1
- versionhq/__init__.py,sha256=PqOgmog9JVNxGm2LP1RV5x3D-U7PClfcKFWVAE6dXCM,2980
1
+ versionhq/__init__.py,sha256=Jvfebb0t1n5s9I3WQOAa9cAdppjxYDyg2H3sJ26Cn8I,2980
2
2
  versionhq/_utils/__init__.py,sha256=d-vYVcORZKG-kkLe_fzE8VbViDpAk9DDOKe2fVK25ew,178
3
3
  versionhq/_utils/i18n.py,sha256=TwA_PnYfDLA6VqlUDPuybdV9lgi3Frh_ASsb_X8jJo8,1483
4
4
  versionhq/_utils/llm_as_a_judge.py,sha256=RM0oYfoeanuUyUL3Ewl6_8Xn1F5Axd285UMH46kxG1I,2378
@@ -7,8 +7,8 @@ versionhq/_utils/process_config.py,sha256=YTGY_erW335RfceQfzS18YAqq-AAb-iSvKSjN7
7
7
  versionhq/_utils/usage_metrics.py,sha256=xgYGRW3OTuK9EJyi3QYJeYcJl7dL27olcWaLo_7B3JE,2246
8
8
  versionhq/_utils/vars.py,sha256=bZ5Dx_bFKlt3hi4-NNGXqdk7B23If_WaTIju2fiTyPQ,57
9
9
  versionhq/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- versionhq/agent/inhouse_agents.py,sha256=WAbyog-6pKwa8ru9u_KJgD_ViTLv4ZRECks1Znch47E,2638
11
- versionhq/agent/model.py,sha256=xebClhCdx0Xt-_or3Ne_fTh8eOWSDEbi4r3WvGSOYcI,26595
10
+ versionhq/agent/inhouse_agents.py,sha256=BPkvEyMH8VnZWsMeCwsGplDT_kLwlIejeRcr-6ItGqQ,2637
11
+ versionhq/agent/model.py,sha256=Z3NkiP18l4Oi9w7mLzGAXC3-_LlG38yrWvjuXBgMbuY,26532
12
12
  versionhq/agent/parser.py,sha256=riG0dkdQCxH7uJ0AbdVdg7WvL0BXhUgJht0VtQvxJBc,4082
13
13
  versionhq/agent/rpm_controller.py,sha256=grezIxyBci_lDlwAlgWFRyR5KOocXeOhYkgN02dNFNE,2360
14
14
  versionhq/agent/TEMPLATES/Backstory.py,sha256=IAhGnnt6VUMe3wO6IzeyZPDNu7XE7Uiu3VEXUreOcKs,532
@@ -62,8 +62,8 @@ versionhq/tool/decorator.py,sha256=C4ZM7Xi2gwtEMaSeRo-geo_g_MAkY77WkSLkAuY0AyI,1
62
62
  versionhq/tool/model.py,sha256=Nc2f9frTK5tH4kh6EeEAk1Fi1w19kEXLOcsBwHCS1a4,12189
63
63
  versionhq/tool/rag_tool.py,sha256=qm_nDWs-WyDvrxZeZAL2AkswfUWGPZS4zybz0o6wOFI,3653
64
64
  versionhq/tool/tool_handler.py,sha256=2m41K8qo5bGCCbwMFferEjT-XZ-mE9F0mDUOBkgivOI,1416
65
- versionhq-1.2.2.4.dist-info/LICENSE,sha256=cRoGGdM73IiDs6nDWKqPlgSv7aR4n-qBXYnJlCMHCeE,1082
66
- versionhq-1.2.2.4.dist-info/METADATA,sha256=fX-azucXgCg-Fm05snnLT02ttDz5u10xMOaBjGmpkp4,22213
67
- versionhq-1.2.2.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
68
- versionhq-1.2.2.4.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
69
- versionhq-1.2.2.4.dist-info/RECORD,,
65
+ versionhq-1.2.2.5.dist-info/LICENSE,sha256=cRoGGdM73IiDs6nDWKqPlgSv7aR4n-qBXYnJlCMHCeE,1082
66
+ versionhq-1.2.2.5.dist-info/METADATA,sha256=KXfw-CbZM8gV7Jz5r9Ui1fmwW51kZZ8uEthgROTZq4Y,22068
67
+ versionhq-1.2.2.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
68
+ versionhq-1.2.2.5.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
69
+ versionhq-1.2.2.5.dist-info/RECORD,,