Skip to content

Commit fd44e7c

Browse files
committed
remove example agents
1 parent ba9a226 commit fd44e7c

File tree

5 files changed

+43
-196
lines changed

5 files changed

+43
-196
lines changed

.agents/examples/01-basic-diff-reviewer.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

.agents/examples/02-intermediate-git-committer.ts

Lines changed: 0 additions & 76 deletions
This file was deleted.

.agents/examples/03-advanced-file-explorer.ts

Lines changed: 0 additions & 73 deletions
This file was deleted.

.agents/my-custom-agent.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* EDIT ME to create your own agent!
3+
*
4+
* Change any field below, and consult the AgentDefinition type for information on all fields and their purpose.
5+
*
6+
* Run your agent with:
7+
* > codebuff --agent git-committer
8+
*
9+
* Or, run codebuff normally, and use the '@' menu to mention your agent, and codebuff will spawn it for you.
10+
*
11+
* Finally, you can publish your agent with 'codebuff publish your-custom-agent' so users from around the world can run it.
12+
*/
13+
14+
import type { AgentDefinition } from './types/agent-definition'
15+
16+
const definition: AgentDefinition = {
17+
id: 'my-custom-agent',
18+
displayName: 'My Custom Agent',
19+
20+
model: 'anthropic/claude-4-sonnet-20250522',
21+
spawnableAgents: ['codebuff/file-explorer@0.0.1'],
22+
23+
// Check out .agents/types/tools.ts for more information on the tools you can include.
24+
toolNames: ['run_terminal_command', 'read_files', 'spawn_agents'],
25+
26+
spawnerPrompt: 'Spawn when you need to review code changes in the git diff',
27+
28+
instructionsPrompt: `Review the code changes and suggest improvements.
29+
Execute the following steps:
30+
1. Run git diff
31+
2. Spawn a file explorer to find all relevant files
32+
3. Read any relevant files
33+
4. Review the changes and suggest improvements`,
34+
35+
// Add more fields here to customize your agent further:
36+
// - system prompt
37+
// - input/output schema
38+
// - handleSteps
39+
40+
// Check out the examples in .agents/examples for more ideas!
41+
}
42+
43+
export default definition

.agents/types/agent-definition.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -320,33 +320,3 @@ export type ModelName =
320320
import type * as Tools from './tools'
321321
export type { Tools }
322322
type ToolName = Tools.ToolName
323-
324-
// ============================================================================
325-
// Placeholders (ported from backend/src/templates/types.ts)
326-
// ============================================================================
327-
328-
const placeholderNames = [
329-
'AGENT_NAME',
330-
'AGENTS_PROMPT',
331-
'CONFIG_SCHEMA',
332-
'FILE_TREE_PROMPT',
333-
'GIT_CHANGES_PROMPT',
334-
'INITIAL_AGENT_PROMPT',
335-
'KNOWLEDGE_FILES_CONTENTS',
336-
'PROJECT_ROOT',
337-
'REMAINING_STEPS',
338-
'SYSTEM_INFO_PROMPT',
339-
'TOOLS_PROMPT',
340-
'USER_CWD',
341-
'USER_INPUT_PROMPT',
342-
] as const
343-
344-
type PlaceholderType<T extends readonly string[]> = {
345-
[K in T[number]]: `{CODEBUFF_${K}}`
346-
}
347-
348-
export const PLACEHOLDER = Object.fromEntries(
349-
placeholderNames.map((name) => [name, `{CODEBUFF_${name}}` as const]),
350-
) as PlaceholderType<typeof placeholderNames>
351-
export type PlaceholderValue = (typeof PLACEHOLDER)[keyof typeof PLACEHOLDER]
352-
export const placeholderValues = Object.values(PLACEHOLDER)

0 commit comments

Comments
 (0)