Skip to content

Commit 37d14c9

Browse files
authored
Merge pull request #867 from dgageot/improve-examples
Improve examples
2 parents b8d7b54 + d443b5c commit 37d14c9

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

examples/gopher.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ agents:
4545
add_environment_info: true
4646
add_prompt_files:
4747
- AGENTS.md
48+
sub_agents:
49+
- librarian
4850
toolsets:
4951
- type: filesystem
5052
- type: shell
@@ -61,3 +63,28 @@ agents:
6163
fix-lint: "Fix the lint issues"
6264
remove-comments-tests: "Remove useless comments in test files (*_test.go)"
6365
commit: "Git commit the changes with a meaningful message"
66+
67+
planner:
68+
model: anthropic/claude-sonnet-4-5
69+
instruction: |
70+
You are a planning agent responsible for gathering user requirements and creating a development plan.
71+
Always ask clarifying questions to ensure you fully understand the user's needs before creating the plan.
72+
Once you have a clear understanding, analyze the existing code and create a detailed development plan in a markdown file. Do not write any code yourself.
73+
Once the plan is created, you will delegate tasks to the root agent. Make sure to provide the file name of the plan when delegating. Write the plan in the current directory.
74+
toolsets:
75+
- type: filesystem
76+
sub_agents:
77+
- root
78+
79+
librarian:
80+
model: anthropic/claude-haiku-4-5
81+
instruction: |
82+
You are the librarian, your job is to look for relevant documentation to help the golang developer agent.
83+
When given a query, search the internet for relevant documentation, articles, or resources that can assist in completing the task.
84+
Use context7 for searching documentation and brave for general web searches.
85+
toolsets:
86+
- type: mcp
87+
ref: docker:context7
88+
- type: mcp
89+
ref: docker:brave-search
90+
- type: fetch

examples/librarian.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env cagent run
2+
3+
agents:
4+
root:
5+
model: anthropic/claude-haiku-4-5
6+
description: Expert in searching the web
7+
instruction: |
8+
You are the librarian, your job is to look for relevant documentation to help the golang developer agent.
9+
When given a query, search the internet for relevant documentation, articles, or resources that can assist in completing the task.
10+
Use context7 for searching documentation and duckduckgo for general web searches.
11+
toolsets:
12+
- type: mcp
13+
ref: docker:context7
14+
- type: mcp
15+
ref: docker:duckduckgo
16+
- type: fetch

0 commit comments

Comments
 (0)