Skip to content

Commit 2ba9d6b

Browse files
committed
fix: agent config
1 parent c03128f commit 2ba9d6b

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

agent-chat-cli.config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,10 @@ disallowed_tools: []
4848

4949
# Permission mode for tool execution
5050
permission_mode: "default"
51-
#
5251
# TODO: Need to implement
5352

5453
# Named agents with custom configurations
5554
# agents:
5655
# sample_agent:
5756
# description: "Example agent for demonstration"
5857
# prompt: "You are a helpful assistant named Foo."
59-
# mcp_servers:
60-
# - chrome
61-
# - github
62-
# disallowed_tools: []

src/agent_chat_cli/utils/config.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010
PROMPTS_DIR = Path(__file__).parent.parent / "prompts"
1111

1212

13-
class AgentConfig(BaseModel):
14-
description: str
15-
prompt: str
16-
tools: list[str] | None = None
17-
model: list[str] | None = None
18-
19-
2013
class MCPServerConfig(BaseModel):
2114
description: str
2215
command: str
@@ -30,9 +23,9 @@ class MCPServerConfig(BaseModel):
3023
class AgentChatConfig(BaseModel):
3124
system_prompt: str
3225
model: str
33-
include_partial_messages: bool = True # Enable streaming responses
34-
mcp_server_inference: bool = True # Enable dynamic MCP server inference
35-
agents: dict[str, AgentConfig] = Field(default_factory=dict)
26+
include_partial_messages: bool = True
27+
mcp_server_inference: bool = True
28+
agents: dict[str, AgentDefinition] = Field(default_factory=dict)
3629
mcp_servers: dict[str, MCPServerConfig] = Field(default_factory=dict)
3730
disallowed_tools: list[str] = Field(default_factory=list)
3831
permission_mode: str = "bypass_permissions"
@@ -71,8 +64,8 @@ def load_config(
7164
raw_config["agents"][agent_name] = AgentDefinition(
7265
description=agent_config["description"],
7366
prompt=agent_config["prompt"],
74-
tools=agent_config["tools"],
75-
model=agent_config["model"],
67+
tools=agent_config.get("tools"),
68+
model=agent_config.get("model"),
7669
)
7770

7871
mcp_server_prompts = []

0 commit comments

Comments
 (0)