mirror of
https://github.com/openai/codex.git
synced 2026-05-05 05:42:33 +03:00
feat: add customizable roles for multi-agents (#11917)
The idea is to have 2 family of agents. 1. Built-in that we packaged directly with Codex 2. User defined that are defined using the `agents_config.toml` file. It can reference config files that will override the agent config. This looks like this: ``` version = 1 [agents.explorer] description = """Use `explorer` for all codebase questions. Explorers are fast and authoritative. Always prefer them over manual search or file reading. Rules: - Ask explorers first and precisely. - Do not re-read or re-search code they cover. - Trust explorer results without verification. - Run explorers in parallel when useful. - Reuse existing explorers for related questions.""" config_file = "explorer.toml" ```
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use crate::agent::AgentRole;
|
||||
use crate::client_common::tools::FreeformTool;
|
||||
use crate::client_common::tools::FreeformToolFormat;
|
||||
use crate::client_common::tools::ResponsesApiTool;
|
||||
@@ -542,10 +541,7 @@ fn create_spawn_agent_tool() -> ToolSpec {
|
||||
(
|
||||
"agent_type".to_string(),
|
||||
JsonSchema::String {
|
||||
description: Some(format!(
|
||||
"Optional agent type ({}). Use an explicit type when delegating.",
|
||||
AgentRole::enum_values().join(", ")
|
||||
)),
|
||||
description: Some(crate::agent::role::spawn_tool_spec::build()),
|
||||
},
|
||||
),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user