Skip to content

Commit 4781d82

Browse files
committed
Update Blog “part-5-agentic-ai-team-coordination-mode-in-action”
1 parent 4efc94d commit 4781d82

File tree

1 file changed

+21
-38
lines changed

1 file changed

+21
-38
lines changed

content/blog/part-5-agentic-ai-team-coordination-mode-in-action.md

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -81,55 +81,38 @@ writer = Agent(
8181

8282
### Editor Team (Manager Agent in Coordinate Mode)
8383

84+
```
8485
editor = Team(
85-
86-
name="Editor",
87-
88-
mode="coordinate",
89-
90-
model=OpenAIChat("gpt-4o"),
91-
92-
members=\[searcher, writer],
93-
94-
description="You are a senior NYT editor coordinating the team.",
95-
96-
instructions=[
97-
98-
     "Delegate research to the search agent.",
99-
100-
     "Delegate drafting to the writer.",
101-
102-
     "Review, proofread, and enhance the final article.",
103-
104-
     "Maintain NYT-level quality, structure, and tone."
105-
106-
],
107-
108-
add_datetime_to_instructions=True,
109-
110-
send_team_context_to_members=True,
111-
112-
show_members_responses=True,
113-
114-
markdown=True,
115-
86+
name="Editor",
87+
mode="coordinate",
88+
model=OpenAIChat("gpt-4o"),
89+
members=[searcher, writer],
90+
description="You are a senior NYT editor coordinating the team.",
91+
instructions=[
92+
"Delegate research to the search agent.",
93+
"Delegate drafting to the writer.",
94+
"Review, proofread, and enhance the final article.",
95+
"Maintain NYT-level quality, structure, and tone."
96+
],
97+
add_datetime_to_instructions=True,
98+
send_team_context_to_members=True,
99+
show_members_responses=True,
100+
markdown=True,
116101
)
102+
```
117103

118-
- - -
119-
120-
 Running the Team
104+
## Running the Team
121105

106+
```
122107
Method 1: Print output directly
123-
124108
editor.print_response("Write an article about latest developments in AI.")
125109
126110
Method 2: Get raw result
111+
response = editor.run("Write an article about latest developments in AI.")
127112
128-
python
113+
```
129114

130-
CopyEdit
131115

132-
response = editor.run("Write an article about latest developments in AI.")
133116

134117
- - -
135118

0 commit comments

Comments
 (0)