- AgentDefinition gains base_url and workspace_path fields (optional) - load_agent_registry parses them from matrix-agents.yaml - _build_platform_from_env uses agent.base_url per agent (falls back to AGENT_BASE_URL) - _agent_workspace_root() resolves workspace per agent from registry - _materialize_incoming_attachments saves files to agent workspace_path/incoming/ - send_outgoing accepts workspace_root param; reads outgoing files from agent workspace_path - dispatch loop computes workspace_root from room agent_id and passes to _send_all - config/matrix-agents.yaml and example updated with base_url and workspace_path
30 lines
1.2 KiB
YAML
30 lines
1.2 KiB
YAML
# Agent registry for the Matrix bot.
|
|
#
|
|
# user_agents: maps a Matrix user ID to an agent ID.
|
|
# If a user is not listed, the bot uses the first agent from the list below.
|
|
# Omit this section entirely for a single-agent setup.
|
|
#
|
|
# agents: list of available agents.
|
|
# id — must match the agent ID known to the platform
|
|
# label — human-readable name (shown in logs)
|
|
# base_url — HTTP/WS URL of this agent's endpoint
|
|
# (overrides the global AGENT_BASE_URL env var for this agent)
|
|
# workspace_path — absolute path to this agent's workspace directory inside the bot container
|
|
# (the bot saves incoming files here and reads outgoing files from here)
|
|
# Example: /agents/0 means the bot mounts the shared volume at /agents/
|
|
# and this agent's files live under /agents/0/
|
|
|
|
user_agents:
|
|
"@user0:matrix.example.org": agent-0
|
|
"@user1:matrix.example.org": agent-1
|
|
|
|
agents:
|
|
- id: agent-0
|
|
label: "Agent 0"
|
|
base_url: "http://lambda.coredump.ru:7000/agent_0/"
|
|
workspace_path: "/agents/0"
|
|
|
|
- id: agent-1
|
|
label: "Agent 1"
|
|
base_url: "http://lambda.coredump.ru:7000/agent_1/"
|
|
workspace_path: "/agents/1"
|