@@ -81,55 +81,38 @@ writer = Agent(
81
81
82
82
### Editor Team (Manager Agent in Coordinate Mode)
83
83
84
+ ```
84
85
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,
116
101
)
102
+ ```
117
103
118
- - - -
119
-
120
- Running the Team
104
+ ## Running the Team
121
105
106
+ ```
122
107
Method 1: Print output directly
123
-
124
108
editor.print_response("Write an article about latest developments in AI.")
125
109
126
110
Method 2: Get raw result
111
+ response = editor.run("Write an article about latest developments in AI.")
127
112
128
- python
113
+ ```
129
114
130
- CopyEdit
131
115
132
- response = editor.run("Write an article about latest developments in AI.")
133
116
134
117
- - -
135
118
0 commit comments