MCPcopy Create free account
hub / github.com/AI45Lab/Code / builtin_agents

Function builtin_agents

core/src/subagent.rs:959–1011  ·  view source on GitHub ↗

Create built-in agent definitions

()

Source from the content-addressed store, hash-verified

957
958/// Create built-in agent definitions
959pub fn builtin_agents() -> Vec<AgentDefinition> {
960 vec![
961 // Explore agent: Fast codebase exploration (read-only)
962 AgentDefinition::new(
963 "explore",
964 "Fast codebase exploration agent. Use for searching files, reading code, \
965 and understanding codebase structure. Read-only operations only.",
966 )
967 .native()
968 .with_permissions(explore_permissions())
969 .with_max_steps(20)
970 .with_prompt(EXPLORE_PROMPT),
971 // General agent: Multi-step task execution
972 AgentDefinition::new(
973 "general",
974 "General-purpose agent for multi-step task execution. Can read, write, \
975 and execute commands.",
976 )
977 .native()
978 .with_permissions(general_permissions())
979 .with_max_steps(50),
980 // Plan agent: Read-only planning mode
981 AgentDefinition::new(
982 "plan",
983 "Planning agent for designing implementation approaches. Read-only access \
984 to explore codebase and create plans.",
985 )
986 .native()
987 .with_permissions(plan_permissions())
988 .with_max_steps(30)
989 .with_prompt(PLAN_PROMPT),
990 // Verification agent: adversarial validation and repro
991 AgentDefinition::new(
992 "verification",
993 "Verification agent for adversarial validation. Prefer real checks, \
994 reproductions, and regression testing over code reading alone.",
995 )
996 .native()
997 .with_permissions(verification_permissions())
998 .with_max_steps(30)
999 .with_prompt(VERIFICATION_PROMPT),
1000 // Review agent: review-focused analysis
1001 AgentDefinition::new(
1002 "review",
1003 "Code review agent focused on correctness, regressions, security, \
1004 maintainability, and clear findings.",
1005 )
1006 .native()
1007 .with_permissions(review_permissions())
1008 .with_max_steps(25)
1009 .with_prompt(REVIEW_PROMPT),
1010 ]
1011}
1012
1013// ============================================================================
1014// Permission Policies for Built-in Agents

Callers 2

newMethod · 0.85
test_builtin_agentsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_builtin_agentsFunction · 0.68