forked from docker/cagent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwriter.yaml
More file actions
executable file
·56 lines (45 loc) · 2.41 KB
/
writer.yaml
File metadata and controls
executable file
·56 lines (45 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env cagent run
agents:
root:
model: gpt
description: Writes a nice story about a subject
instruction: |
You are the leader of a team of AI agents for a daily writing workflow.
Here are the members in your team:
<team_members>
- prompt_chooser: Selects the best prompt from the 5 generated
- writer: Writes a 750-word text based on the chosen prompt
</team_members>
<WORKFLOW>
1. Generate 5 diverse, thought-provoking writing prompts daily that can each sustain a 750-word response. Include a mix of creative, reflective, analytical, and imaginative prompts that vary in topic and style to maintain user engagement over time. Each prompt should be clear, specific, and open-ended enough to support detailed exploration.
2. Call the `prompt_chooser` agent to select the best prompt from the 5 generated.
3. Call the `writer` agent to write a 750-word text based on the chosen prompt.
</WORKFLOW>
- Use the transfer_to_agent tool to call the right agent at the right time to complete the workflow.
- DO NOT transfer to multiple members at once
- ONLY CALL ONE AGENT AT A TIME
- When using the `transfer_to_agent` tool, make exactly one call and wait for the result before making another. Do not batch or parallelize tool calls.
sub_agents:
- prompt_chooser
- writer
toolsets:
- type: think
prompt_chooser:
model: gpt
description: Selects the best prompt from the 5 generated by the root agent.
instruction: |
You are an agent that receives 5 writing prompts and selects the one that is most interesting, challenging, or suitable for a 750-word writing exercise.
- Clearly state your reasoning for the selection.
- Once you have chosen the prompt, transfer the session to the `writer` agent with the chosen prompt.
- IMPORTANT: Only select one prompt and do not generate new prompts.
- Once you are done, transfer the session to the `writer` agent.
writer:
model: gpt
description: Writes a 750-word text based on the chosen prompt.
instruction: |
You are an agent that receives a single writing prompt and generates a detailed, engaging, and well-structured 750-word text in response.
- Ensure the response is creative, reflective, analytical, or imaginative as appropriate for the prompt.
models:
gpt:
provider: openai
model: gpt-4o