Skip to content

A programming framework for agentic AI

Validate agent description, DRY metadata (#321)

Andreas Volkmannefa87784cc9e
diff --git a/python/src/agnext/core/_base_agent.py b/python/src/agnext/core/_base_agent.py
index 813a198cd..3b72e2dea 100644
--- a/python/src/agnext/core/_base_agent.py
+++ b/python/src/agnext/core/_base_agent.py
@@ -32,6 +32,8 @@ class BaseAgent(ABC, Agent):
self._runtime: AgentRuntime = runtime
self._id: AgentId = id
+ if not isinstance(description, str):
+ raise ValueError("Agent description must be a string")
self._description = description
self._subscriptions = subscriptions
diff --git a/python/teams/team-one/readme.md b/python/teams/team-one/readme.md
index ca3359c48..679d16826 100644
--- a/python/teams/team-one/readme.md
+++ b/python/teams/team-one/readme.md
@@ -9,7 +9,7 @@ Team-One is a generalist multi-agent softbot that utilizes a combination of five
<center>
<img src="./imgs/team-one-landing.png" alt="drawing" style="width:350px;"/>
-</center
+</center>
diff --git a/python/teams/team-one/src/team_one/agents/orchestrator.py b/python/teams/team-one/src/team_one/agents/orchestrator.py
index 7ca1d25e6..02e8e11ec 100644
--- a/python/teams/team-one/src/team_one/agents/orchestrator.py
+++ b/python/teams/team-one/src/team_one/agents/orchestrator.py
@@ -82,8 +82,9 @@ class LedgerOrchestrator(BaseOrchestrator):
async def _get_team_description(self) -> str:
team_description = ""
for agent in self._agents:
- name = (await agent.metadata)["name"]
- description = (await agent.metadata)["description"]
+ metadata = await agent.metadata
+ name = metadata["name"]
+ description = metadata["description"]
team_description += f"{name}: {description}\n"
return team_description