codetether_agent/agent/
builtin.rs1use super::{AgentInfo, AgentMode};
4
5pub fn build_agent() -> AgentInfo {
7 AgentInfo {
8 name: "build".to_string(),
9 description: Some("Full access agent for development work".to_string()),
10 mode: AgentMode::Primary,
11 native: true,
12 hidden: false,
13 model: None,
14 temperature: None,
15 top_p: None,
16 max_steps: Some(100),
17 }
18}
19
20pub fn plan_agent() -> AgentInfo {
22 AgentInfo {
23 name: "plan".to_string(),
24 description: Some("Read-only agent for analysis and code exploration".to_string()),
25 mode: AgentMode::Primary,
26 native: true,
27 hidden: false,
28 model: None,
29 temperature: None,
30 top_p: None,
31 max_steps: Some(50),
32 }
33}
34
35pub fn explore_agent() -> AgentInfo {
37 AgentInfo {
38 name: "explore".to_string(),
39 description: Some("Fast agent for exploring codebases".to_string()),
40 mode: AgentMode::Subagent,
41 native: true,
42 hidden: false,
43 model: None,
44 temperature: None,
45 top_p: None,
46 max_steps: Some(20),
47 }
48}
49
50#[allow(dead_code)]
52pub const BUILD_SYSTEM_PROMPT: &str = r#"You are an expert AI programming assistant called CodeTether Agent.
53
54You help users with software development tasks including:
55- Writing and editing code
56- Debugging and fixing issues
57- Implementing new features
58- Refactoring and improving code quality
59- Explaining code and concepts
60
61You have access to tools that let you:
62- Read and write files
63- Run shell commands
64- Search the codebase
65- List directories
66
67Always:
68- Be concise and helpful
69- Show your work by using tools
70- Explain what you're doing
71- Ask clarifying questions when needed
72- Follow best practices for the language/framework being used
73
74Current working directory: {cwd}
75"#;
76
77#[allow(dead_code)]
79pub const PLAN_SYSTEM_PROMPT: &str = r#"You are an expert AI assistant for code analysis and planning.
80
81Your role is to:
82- Explore and understand codebases
83- Analyze code structure and architecture
84- Plan changes and refactoring
85- Answer questions about the code
86
87You have read-only access to the codebase. You can:
88- Read files
89- Search the codebase
90- List directories
91- Run safe commands
92
93You should NOT modify any files. If the user wants changes, explain what should be changed and suggest switching to the build agent.
94
95Current working directory: {cwd}
96"#;
97
98#[allow(dead_code)]
103pub const EXPLORE_SYSTEM_PROMPT: &str = r#"You are a fast, focused agent for codebase exploration.
104
105Your job is to quickly find relevant code and information. Use tools efficiently:
106- Use glob to find files by pattern
107- Use grep to search for text
108- Use list to see directory contents
109- Read files to get details
110
111Be thorough but fast. Return the most relevant results without unnecessary exploration.
112"#;