π OpenHands: AI-Driven Development
Fix micro-agents schema bug (#1424)
Boxuan Li319b9ac0f341
diff --git a/agenthub/micro/agent.py b/agenthub/micro/agent.pyindex dda72fb89b..4445221d25 100644--- a/agenthub/micro/agent.py+++ b/agenthub/micro/agent.py@@ -56,14 +56,9 @@ class MicroAgent(Agent):super().__init__(llm)if 'name' not in self.agent_definition:raise ValueError('Agent definition must contain a name')- self.name = self.agent_definition['name']- 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(diff --git a/agenthub/micro/coder/agent.yaml b/agenthub/micro/coder/agent.yamlindex bd5806077b..21eb9b6184 100644--- a/agenthub/micro/coder/agent.yaml+++ b/agenthub/micro/coder/agent.yaml@@ -1,6 +1,6 @@-name: Coder+name: CoderAgentdescription: Given a particular task, and a detailed description of the codebase, accomplishes the taskinputs:- - task: string- - codebase_summary: string-outputs: []+ task: string+ codebase_summary: string+outputs: {}diff --git a/agenthub/micro/manager/agent.yaml b/agenthub/micro/manager/agent.yamlindex 2577ddc912..5980f6f03f 100644--- a/agenthub/micro/manager/agent.yaml+++ b/agenthub/micro/manager/agent.yaml@@ -1,5 +1,6 @@-name: Manager+name: ManagerAgentdescription: Delegates tasks to microagents based on their area of expertisegenerates: Actioninputs:task: string+outputs: {}diff --git a/agenthub/micro/math_agent/agent.yaml b/agenthub/micro/math_agent/agent.yamlindex f73a2d8ee0..bf6f09a66a 100644--- a/agenthub/micro/math_agent/agent.yaml+++ b/agenthub/micro/math_agent/agent.yaml@@ -7,19 +7,19 @@ inputs:outputs:answer: stringexamples:- - 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"diff --git a/agenthub/micro/postgres_agent/agent.yaml b/agenthub/micro/postgres_agent/agent.yamlindex a8e60c3cb5..993bb63321 100644--- a/agenthub/micro/postgres_agent/agent.yaml+++ b/agenthub/micro/postgres_agent/agent.yaml@@ -2,5 +2,5 @@ name: PostgresAgentdescription: Writes and maintains PostgreSQL migrationsgenerates: Actioninputs:- - task: string-outputs: []+ task: string+outputs: {}diff --git a/agenthub/micro/repo_explorer/agent.yaml b/agenthub/micro/repo_explorer/agent.yamlindex 311497e6c5..75b000e93c 100644--- a/agenthub/micro/repo_explorer/agent.yaml+++ b/agenthub/micro/repo_explorer/agent.yaml@@ -1,5 +1,5 @@-name: RepoExplorer+name: RepoExplorerAgentdescription: Generates a detailed summary of an existing codebase-inputs: []+inputs: {}outputs:- - summary: string+ summary: stringdiff --git a/agenthub/micro/study_repo_for_task/agent.yaml b/agenthub/micro/study_repo_for_task/agent.yamlindex 1ee1722f95..e4aba3320e 100644--- a/agenthub/micro/study_repo_for_task/agent.yaml+++ b/agenthub/micro/study_repo_for_task/agent.yaml@@ -1,6 +1,6 @@name: StudyRepoForTaskAgentdescription: Given a particular task, finds and describes all relevant parts of the codebaseinputs:- - task: string+ task: stringoutputs:- - summary: string+ summary: stringdiff --git a/agenthub/micro/verifier/agent.yaml b/agenthub/micro/verifier/agent.yamlindex 38544ebbe8..8d3662fa77 100644--- a/agenthub/micro/verifier/agent.yaml+++ b/agenthub/micro/verifier/agent.yaml@@ -1,7 +1,7 @@-name: Verifier+name: VerifierAgentdescription: Given a particular task, verifies that the task has been completedinputs:- - task: string+ task: stringoutputs:- - completed: boolean- - summary: string+ completed: boolean+ summary: string