Skip to content

Commit

Permalink
feat: refine
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Nov 6, 2024
1 parent 78fdcfa commit 3258a7a
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions examples/software_team/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@


def write_code(task):
"""Function for the Developer agent to write code based on the given task."""
"""
Provide the code written for the given task.
"""
return f"Code for {task} has been written."


def test_code(code):
"""Function for the Tester agent to test the given code."""
"""
Provide the test results.
"""
return f"Code '{code}' has been tested and passed all tests."


def manage_project(task):
"""Function for the Project Manager agent to manage the project and coordinate between Developer and Tester."""
return f"Project task '{task}' has been managed and coordinated."
"""
When managing the project, you can provide updates to the user.
Provide the code from the Developer or the test results from the Tester.
"""
return f"Project task '{task}' is in progress."

def get_status(task):
"""Function for the Project Manager agent to get the status of the project. Returns the output of the code from Developer or the result of the tests from Tester."""
"""
When the user asks for the status of the project, you can provide the output of the code from Developer or the result of the tests from Tester.
"""
return f"Project task '{task}' is in progress. The output is as follows:"

developer_agent = Agent(
Expand All @@ -33,7 +42,12 @@ def get_status(task):

project_manager_agent = Agent(
name="Project Manager Agent",
instructions="You are responsible for managing the project and coordinating between the Developer and Tester agents.",
instructions="""
You are responsible for managing the project and coordinating between Developer and Tester.
You can transfer the conversation to the Developer or Tester agent if needed.
As the work progresses, you can provide updates to the user.
When the user asks for the status of the project, you can provide the output of the code from Developer or the result of the tests from Tester.
""",
functions=[manage_project, get_status],
)

Expand Down

0 comments on commit 3258a7a

Please sign in to comment.