Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix micro-agents schema bug #1424

Merged
merged 8 commits into from Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions agenthub/micro/agent.py
Expand Up @@ -56,14 +56,9 @@ def __init__(self, llm: LLM):
super().__init__(llm)
if 'name' not in self.agent_definition:
raise ValueError('Agent definition must contain a name')
self.name = self.agent_definition['name']
li-boxuan marked this conversation as resolved.
Show resolved Hide resolved
self.description = self.agent_definition['description'] if 'description' in self.agent_definition else ''
self.inputs = self.agent_definition['inputs'] if 'inputs' in self.agent_definition else []
self.outputs = self.agent_definition['outputs'] if 'outputs' in self.agent_definition else []
self.examples = self.agent_definition['examples'] if 'examples' in self.agent_definition else []
self.prompt_template = Environment(loader=BaseLoader).from_string(self.prompt)
self.delegates = all_microagents.copy()
del self.delegates[self.name]
del self.delegates[self.agent_definition['name']]

def step(self, state: State) -> Action:
prompt = self.prompt_template.render(
Expand Down
8 changes: 4 additions & 4 deletions agenthub/micro/coder/agent.yaml
@@ -1,6 +1,6 @@
name: Coder
name: CoderAgent
description: Given a particular task, and a detailed description of the codebase, accomplishes the task
inputs:
- task: string
- codebase_summary: string
outputs: []
task: string
codebase_summary: string
outputs: {}
3 changes: 2 additions & 1 deletion agenthub/micro/manager/agent.yaml
@@ -1,5 +1,6 @@
name: Manager
name: ManagerAgent
description: Delegates tasks to microagents based on their area of expertise
generates: Action
inputs:
task: string
outputs: {}
14 changes: 7 additions & 7 deletions agenthub/micro/math_agent/agent.yaml
Expand Up @@ -7,19 +7,19 @@ inputs:
outputs:
answer: string
examples:
- input:
- inputs:
task: "What is 2 + 2?"
output:
outputs:
answer: "4"
- input:
- inputs:
task: "What is the area of a circle with radius 7.324 inches?"
output:
answer: "168.518 square inches"
- input:
- inputs:
task: "What day of the week is 2099-01-01?"
output:
outputs:
answer: "Saturday"
- input:
- inputs:
task: "What is the integral of sin(x^2) evaluated from -1 to 1?"
output:
outputs:
answer: "0.603848"
4 changes: 2 additions & 2 deletions agenthub/micro/postgres_agent/agent.yaml
Expand Up @@ -2,5 +2,5 @@ name: PostgresAgent
description: Writes and maintains PostgreSQL migrations
generates: Action
inputs:
- task: string
outputs: []
task: string
outputs: {}
6 changes: 3 additions & 3 deletions agenthub/micro/repo_explorer/agent.yaml
@@ -1,5 +1,5 @@
name: RepoExplorer
name: RepoExplorerAgent
description: Generates a detailed summary of an existing codebase
inputs: []
inputs: {}
outputs:
- summary: string
summary: string
4 changes: 2 additions & 2 deletions agenthub/micro/study_repo_for_task/agent.yaml
@@ -1,6 +1,6 @@
name: StudyRepoForTaskAgent
description: Given a particular task, finds and describes all relevant parts of the codebase
inputs:
- task: string
task: string
outputs:
- summary: string
summary: string
8 changes: 4 additions & 4 deletions agenthub/micro/verifier/agent.yaml
@@ -1,7 +1,7 @@
name: Verifier
name: VerifierAgent
description: Given a particular task, verifies that the task has been completed
inputs:
- task: string
task: string
outputs:
- completed: boolean
- summary: string
completed: boolean
summary: string