Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7f8921e
workflow: Agents as Tools — BASIC agents with child_agents expose chi…
iqdoctor Nov 8, 2025
438e651
Merge pull request #1 from evalstate/main
iqdoctor Nov 8, 2025
aedfdda
workflow: suppress child agent display + simplify aggregated view for…
iqdoctor Nov 8, 2025
82df4ba
fix: suppress child display via config modification, not RequestParams
iqdoctor Nov 8, 2025
5e4f855
display: show detailed I/O for each agent tool call/result
iqdoctor Nov 8, 2025
7937c73
feat: add instance count indicator for parallel agent execution
iqdoctor Nov 8, 2025
2f5f5f9
refactor: optimize AgentsAsToolsAgent code
iqdoctor Nov 8, 2025
643ea39
feat: add instance IDs to progress + restore child tool logs
iqdoctor Nov 8, 2025
cae1155
fix: use _name attribute instead of name property for instance IDs
iqdoctor Nov 8, 2025
132c76e
style: align code style with library conventions
iqdoctor Nov 8, 2025
0a137a5
style: change instance ID format from ': 1' to '#1'
iqdoctor Nov 8, 2025
bd7c4c9
ui: show instance count in tool name instead of metadata
iqdoctor Nov 8, 2025
f7f19af
fix: show individual instance numbers [1], [2] in tool headers
iqdoctor Nov 8, 2025
c9aa9b9
feat: add separate progress panel lines for parallel instances
iqdoctor Nov 8, 2025
d1afe69
fix: show tool call status in instance lines, not parent
iqdoctor Nov 8, 2025
15cb923
fix: explicitly enable show_tools for child agents
iqdoctor Nov 8, 2025
4143015
fix: hide parent line during parallel execution, only show instances
iqdoctor Nov 8, 2025
7905edb
docs: add comprehensive README for agents-as-tools pattern
iqdoctor Nov 8, 2025
85610a4
fix: hide instance lines immediately when each task completes
iqdoctor Nov 8, 2025
e3783db
fix: use consistent progress_display instance for visibility control
iqdoctor Nov 8, 2025
2b922b5
fix: prevent display config race conditions in parallel instances
iqdoctor Nov 8, 2025
5c503db
docs: update module documentation with latest implementation details
iqdoctor Nov 8, 2025
963275e
fix: duplicate labels, final logs without instance index
iqdoctor Nov 8, 2025
eba9fab
fix: label truncation and display config restoration
iqdoctor Nov 8, 2025
10cfe75
fix: move display suppression to run_tools before parallel execution
iqdoctor Nov 8, 2025
e58b465
fix: create new display objects for suppression instead of just modif…
iqdoctor Nov 8, 2025
20afe3b
fix: eliminate name mutation race condition in parallel execution
iqdoctor Nov 8, 2025
12459ad
fix: remove agent renaming to eliminate race condition
iqdoctor Nov 8, 2025
c937913
fix: suppress child progress events to eliminate duplicate panel rows
iqdoctor Nov 8, 2025
6df253c
fix: use NullDisplay to completely suppress child output during paral…
iqdoctor Nov 8, 2025
9cef0a6
fix: also suppress child logger to prevent progress events
iqdoctor Nov 8, 2025
63ae11e
fix: also suppress aggregator logger to block MCP tool progress events
iqdoctor Nov 8, 2025
73d3d04
refactor: simplify child suppression to config-only approach
iqdoctor Nov 8, 2025
8a48d30
docs: add comprehensive documentation for parallel execution approach
iqdoctor Nov 8, 2025
37bfacf
refactor: first instance runs normally, only instances 2+ get indexed
iqdoctor Nov 8, 2025
37d3198
feat: all instances visible in panel, only streaming suppressed for 2+
iqdoctor Nov 8, 2025
4b26a70
Merge pull request #2 from evalstate/main
iqdoctor Nov 9, 2025
f1783c5
feat: detach agents-as-tools instances and harden MCP task groups
iqdoctor Nov 23, 2025
1520a5b
feat: detach agents-as-tools instances and harden MCP task groups
iqdoctor Nov 23, 2025
4c4686d
Merge branch 'evalstate:main' into main
iqdoctor Nov 23, 2025
81bb7a9
agents-as-tools: clean debug hooks and finalize progress UI
iqdoctor Nov 23, 2025
de07f01
agents-as-tools: clean progress wiring and restore upstream listeners
iqdoctor Nov 24, 2025
c5b8856
Hybrid Agents-as-Tools MCP-aware agent
iqdoctor Nov 24, 2025
8adcd3b
Added §3.3 “Minimal usage sample (for docs and examples)”
iqdoctor Nov 24, 2025
5bf73cb
Agents-as-Tools hybrid MCP agent: sync with main and fix tool execution
iqdoctor Nov 24, 2025
43c210e
Add PMO Agents-as-Tools examples and tidy AgentsAsToolsAgent
iqdoctor Nov 24, 2025
e2779f9
Document AgentsAsToolsAgent and polish parallel tool UI
iqdoctor Nov 24, 2025
57295ff
Finalize Agents-as-Tools PMO examples and hybrid agent docs
iqdoctor Nov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,52 @@ uv run workflow/chaining.py --agent post_writer --message "<url>"

Add the `--quiet` switch to disable progress and message display and return only the final response - useful for simple automations.

### Agents-as-Tools (child agents as tools)

Sometimes one agent needs to call other agents as tools. `fast-agent` supports
this via a hybrid *Agents-as-Tools* agent:

- You declare a BASIC agent with `agents=[...]`.
- At runtime it is instantiated as an internal `AgentsAsToolsAgent`, which:
- Inherits from `McpAgent` (keeps its own MCP servers/tools).
- Exposes each child agent as a tool (`agent__ChildName`).
- Can mix MCP tools and agent-tools in the same tool loop.

Minimal example:

```python
@fast.agent(
name="NY-Project-Manager",
instruction="Return current time and project status.",
servers=["time"], # MCP server 'time' configured in fastagent.config.yaml
)
@fast.agent(
name="London-Project-Manager",
instruction="Return current time and news.",
servers=["time"],
)
@fast.agent(
name="PMO-orchestrator",
instruction="Get reports. Separate call per topic. NY: {OpenAI, Fast-Agent, Anthropic}, London: Economics",
default=True,
agents=[
"NY-Project-Manager",
"London-Project-Manager",
], # children are exposed as tools: agent__NY-Project-Manager, agent__London-Project-Manager
)
async def main() -> None:
async with fast.run() as agent:
result = await agent("Get PMO report")
print(result)


if __name__ == "__main__":
asyncio.run(main())
```

Extended example is available in the repository as
`examples/workflows/agents_as_tools_extended.py`.

## MCP OAuth (v2.1)

For SSE and HTTP MCP servers, OAuth is enabled by default with minimal configuration. A local callback server is used to capture the authorization code, with a paste-URL fallback if the port is unavailable.
Expand Down
Loading
Loading