coordinator.parser¶
coordinator.parser ¶
Structured output parser for coordinator agent responses.
Agents produce text with recognized KEY: VALUE blocks. This module extracts them into a normalized dict for programmatic access.
parse_agent_output ¶
Extract structured KEY: VALUE blocks from agent output text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw
|
str
|
The full text output from a subagent. |
required |
agent
|
str
|
Agent type (unused currently, reserved for future agent-specific parsing rules). |
''
|
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
Dict mapping lowercase key names to their stripped string values. |
dict[str, str]
|
If a key appears multiple times, the last occurrence wins. |
dict[str, str]
|
Returns an empty dict if raw is empty or None. |