fast-agent-mcp 0.0.7__tar.gz → 0.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fast-agent-mcp might be problematic. Click here for more details.

Files changed (110) hide show
  1. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/.gitignore +1 -0
  2. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/PKG-INFO +22 -57
  3. fast_agent_mcp-0.0.8/README.md +51 -0
  4. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/pyproject.toml +16 -5
  5. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/agents/agent.py +8 -4
  6. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/app.py +5 -1
  7. fast_agent_mcp-0.0.8/src/mcp_agent/cli/commands/bootstrap.py +280 -0
  8. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/cli/commands/setup.py +20 -16
  9. fast_agent_mcp-0.0.8/src/mcp_agent/core/exceptions.py +47 -0
  10. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/core/fastagent.py +176 -85
  11. fast_agent_mcp-0.0.8/src/mcp_agent/core/server_validation.py +44 -0
  12. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/event_progress.py +4 -1
  13. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/logging/rich_progress.py +11 -0
  14. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/mcp/mcp_connection_manager.py +11 -2
  15. fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/data-analysis/analysis.py +35 -0
  16. fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +20 -0
  17. fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +1471 -0
  18. fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/workflows/chaining.py +31 -0
  19. fast_agent_mcp-0.0.7/src/mcp_agent/resources/examples/decorator/optimizer.py → fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/workflows/evaluator.py +7 -10
  20. fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/workflows/human_input.py +26 -0
  21. {fast_agent_mcp-0.0.7/src/mcp_agent/resources/examples/decorator → fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/workflows}/orchestrator.py +20 -11
  22. {fast_agent_mcp-0.0.7/src/mcp_agent/resources/examples/decorator → fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/workflows}/parallel.py +14 -18
  23. {fast_agent_mcp-0.0.7/src/mcp_agent/resources/examples/decorator → fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/workflows}/router.py +9 -10
  24. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/llm/augmented_llm_anthropic.py +48 -12
  25. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/llm/augmented_llm_openai.py +38 -9
  26. fast_agent_mcp-0.0.8/src/mcp_agent/workflows/swarm/__init__.py +0 -0
  27. fast_agent_mcp-0.0.7/README.md +0 -85
  28. fast_agent_mcp-0.0.7/src/mcp_agent/cli/commands/bootstrap.py +0 -221
  29. fast_agent_mcp-0.0.7/src/mcp_agent/resources/examples/decorator/main.py +0 -26
  30. fast_agent_mcp-0.0.7/src/mcp_agent/resources/examples/decorator/tiny.py +0 -22
  31. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/LICENSE +0 -0
  32. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/__init__.py +0 -0
  33. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/agents/__init__.py +0 -0
  34. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/cli/__init__.py +0 -0
  35. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/cli/__main__.py +0 -0
  36. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/cli/commands/config.py +0 -0
  37. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/cli/main.py +0 -0
  38. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/cli/terminal.py +0 -0
  39. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/config.py +0 -0
  40. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/console.py +0 -0
  41. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/context.py +0 -0
  42. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/context_dependent.py +0 -0
  43. {fast_agent_mcp-0.0.7/src/mcp_agent/eval → fast_agent_mcp-0.0.8/src/mcp_agent/core}/__init__.py +0 -0
  44. {fast_agent_mcp-0.0.7/src/mcp_agent/executor → fast_agent_mcp-0.0.8/src/mcp_agent/eval}/__init__.py +0 -0
  45. {fast_agent_mcp-0.0.7/src/mcp_agent/human_input → fast_agent_mcp-0.0.8/src/mcp_agent/executor}/__init__.py +0 -0
  46. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/executor/decorator_registry.py +0 -0
  47. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/executor/executor.py +0 -0
  48. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/executor/task_registry.py +0 -0
  49. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/executor/temporal.py +0 -0
  50. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/executor/workflow.py +0 -0
  51. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/executor/workflow_signal.py +0 -0
  52. {fast_agent_mcp-0.0.7/src/mcp_agent/logging → fast_agent_mcp-0.0.8/src/mcp_agent/human_input}/__init__.py +0 -0
  53. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/human_input/handler.py +0 -0
  54. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/human_input/types.py +0 -0
  55. {fast_agent_mcp-0.0.7/src/mcp_agent/mcp → fast_agent_mcp-0.0.8/src/mcp_agent/logging}/__init__.py +0 -0
  56. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/logging/events.py +0 -0
  57. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/logging/json_serializer.py +0 -0
  58. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/logging/listeners.py +0 -0
  59. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/logging/logger.py +0 -0
  60. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/logging/tracing.py +0 -0
  61. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/logging/transport.py +0 -0
  62. {fast_agent_mcp-0.0.7/src/mcp_agent/telemetry → fast_agent_mcp-0.0.8/src/mcp_agent/mcp}/__init__.py +0 -0
  63. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/mcp/gen_client.py +0 -0
  64. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/mcp/mcp_activity.py +0 -0
  65. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/mcp/mcp_agent_client_session.py +0 -0
  66. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/mcp/mcp_agent_server.py +0 -0
  67. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/mcp/mcp_aggregator.py +0 -0
  68. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/mcp/stdio.py +0 -0
  69. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/mcp_server_registry.py +0 -0
  70. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/progress_display.py +0 -0
  71. /fast_agent_mcp-0.0.7/src/mcp_agent/resources/examples/mcp_researcher/main-evalopt.py → /fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/mcp_researcher/researcher-eval.py +0 -0
  72. /fast_agent_mcp-0.0.7/src/mcp_agent/resources/examples/mcp_researcher/main.py → /fast_agent_mcp-0.0.8/src/mcp_agent/resources/examples/mcp_researcher/researcher.py +0 -0
  73. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows → fast_agent_mcp-0.0.8/src/mcp_agent/telemetry}/__init__.py +0 -0
  74. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/telemetry/usage_tracking.py +0 -0
  75. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows/embedding → fast_agent_mcp-0.0.8/src/mcp_agent/workflows}/__init__.py +0 -0
  76. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows/evaluator_optimizer → fast_agent_mcp-0.0.8/src/mcp_agent/workflows/embedding}/__init__.py +0 -0
  77. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/embedding/embedding_base.py +0 -0
  78. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/embedding/embedding_cohere.py +0 -0
  79. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/embedding/embedding_openai.py +0 -0
  80. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows/intent_classifier → fast_agent_mcp-0.0.8/src/mcp_agent/workflows/evaluator_optimizer}/__init__.py +0 -0
  81. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/evaluator_optimizer/evaluator_optimizer.py +0 -0
  82. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows/llm → fast_agent_mcp-0.0.8/src/mcp_agent/workflows/intent_classifier}/__init__.py +0 -0
  83. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/intent_classifier/intent_classifier_base.py +0 -0
  84. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/intent_classifier/intent_classifier_embedding.py +0 -0
  85. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/intent_classifier/intent_classifier_embedding_cohere.py +0 -0
  86. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/intent_classifier/intent_classifier_embedding_openai.py +0 -0
  87. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/intent_classifier/intent_classifier_llm.py +0 -0
  88. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/intent_classifier/intent_classifier_llm_anthropic.py +0 -0
  89. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/intent_classifier/intent_classifier_llm_openai.py +0 -0
  90. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows/orchestrator → fast_agent_mcp-0.0.8/src/mcp_agent/workflows/llm}/__init__.py +0 -0
  91. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/llm/augmented_llm.py +0 -0
  92. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/llm/llm_selector.py +0 -0
  93. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/llm/model_factory.py +0 -0
  94. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows/parallel → fast_agent_mcp-0.0.8/src/mcp_agent/workflows/orchestrator}/__init__.py +0 -0
  95. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/orchestrator/orchestrator.py +0 -0
  96. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/orchestrator/orchestrator_models.py +0 -0
  97. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/orchestrator/orchestrator_prompts.py +0 -0
  98. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows/router → fast_agent_mcp-0.0.8/src/mcp_agent/workflows/parallel}/__init__.py +0 -0
  99. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/parallel/fan_in.py +0 -0
  100. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/parallel/fan_out.py +0 -0
  101. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/parallel/parallel_llm.py +0 -0
  102. {fast_agent_mcp-0.0.7/src/mcp_agent/workflows/swarm → fast_agent_mcp-0.0.8/src/mcp_agent/workflows/router}/__init__.py +0 -0
  103. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/router/router_base.py +0 -0
  104. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/router/router_embedding.py +0 -0
  105. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/router/router_embedding_cohere.py +0 -0
  106. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/router/router_embedding_openai.py +0 -0
  107. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/router/router_llm.py +0 -0
  108. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/swarm/swarm.py +0 -0
  109. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/swarm/swarm_anthropic.py +0 -0
  110. {fast_agent_mcp-0.0.7 → fast_agent_mcp-0.0.8}/src/mcp_agent/workflows/swarm/swarm_openai.py +0 -0
@@ -178,3 +178,4 @@ project_contents.md
178
178
  examples/**/*.jsonl
179
179
  mcp_agent.config.yaml
180
180
  mcp_agent.secrets.yaml
181
+ fastagent.secrets.yaml
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-agent-mcp
3
- Version: 0.0.7
4
- Summary: Build, Test, Deploy composable MCP Agent Workflows.
3
+ Version: 0.0.8
4
+ Summary: Define, Prompt and Test MCP enabled Agents and Workflows
5
5
  Author-email: Shaun Smith <fastagent@llmindset.co.uk>, Sarmad Qadri <sarmad@lastmileai.dev>
6
6
  License: Apache License
7
7
  Version 2.0, January 2004
@@ -219,7 +219,6 @@ Requires-Dist: opentelemetry-distro>=0.50b0
219
219
  Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.29.0
220
220
  Requires-Dist: pydantic-settings>=2.7.0
221
221
  Requires-Dist: pydantic>=2.10.4
222
- Requires-Dist: pyreadline3>=3.5.4
223
222
  Requires-Dist: pyyaml>=6.0.2
224
223
  Requires-Dist: rich>=13.9.4
225
224
  Requires-Dist: scikit-learn>=1.6.0
@@ -238,35 +237,37 @@ Description-Content-Type: text/markdown
238
237
  ## FastAgent
239
238
 
240
239
  <p align="center">
241
- <a href="https://pypi.org/project/mcp-agent/"><img src="https://img.shields.io/pypi/v/mcp-agent?color=%2334D058&label=pypi" /></a>
242
- <a href="https://github.com/lastmile-ai/mcp-agent/issues"><img src="https://img.shields.io/github/issues-raw/lastmile-ai/mcp-agent" /></a>
240
+ <a href="https://pypi.org/project/fast-agent-mcp/"><img src="https://img.shields.io/pypi/v/fast-agent-mcp?color=%2334D058&label=pypi" /></a>
241
+ <a href="https://github.com/evalstate/fast-agent/issues"><img src="https://img.shields.io/github/issues-raw/evalstate/fast-agent" /></a>
243
242
  <a href="https://lmai.link/discord/mcp-agent"><img src="https://shields.io/discord/1089284610329952357" alt="discord" /></a>
244
- <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/mcp-agent?label=pypi%20%7C%20downloads"/>
245
- <a href="https://github.com/lastmile-ai/mcp-agent/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/mcp-agent" /></a>
243
+ <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/fast-agent-mcp?label=pypi%20%7C%20downloads"/>
244
+ <a href="https://github.com/evalstate/fast-agent-mcp/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/fast-agent-mcp" /></a>
246
245
  </p>
247
246
 
248
247
  ## Overview
249
248
 
250
- **`mcp-agent`** is a simple, composable framework to build agents using [Model Context Protocol](https://modelcontextprotocol.io/introduction).
249
+ **`fast-agent`** lets you define, test and compose agents and tools in minutes.
251
250
 
252
- **Inspiration**: Anthropic announced 2 foundational updates for AI application developers:
251
+ ### Get started:
253
252
 
254
- 1. [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) - a standardized interface to let any software be accessible to AI assistants via MCP servers.
255
- 2. [Building Effective Agents](https://www.anthropic.com/research/building-effective-agents) - a seminal writeup on simple, composable patterns for building production-ready AI agents.
253
+ Install the [uv package manager](https://docs.astral.sh/uv/).
256
254
 
257
- `mcp-agent` puts these two foundational pieces into an AI application framework:
255
+ `uv pip install fast-agent-mcp` - download fast-agent
258
256
 
259
- 1. It handles the pesky business of managing the lifecycle of MCP server connections so you don't have to.
260
- 2. It implements every pattern described in Building Effective Agents, and does so in a _composable_ way, allowing you to chain these patterns together.
261
- 3. **Bonus**: It implements [OpenAI's Swarm](https://github.com/openai/swarm) pattern for multi-agent orchestration, but in a model-agnostic way.
257
+ `fast-agent setup` - setup an agent and configuration files.
262
258
 
263
- Altogether, this is the simplest and easiest way to build robust agent applications. Much like MCP, this project is in early development.
264
- We welcome all kinds of [contributions](/CONTRIBUTING.md), feedback and your help in growing this to become a new standard.
259
+ `uv run agent.py` - run and interact with your first agent.
260
+
261
+ `fast-agent bootstrap workflow` - generate example agents demonstrating each of the workflows from Anthropic's "[Building Effective Agents](https://www.anthropic.com/research/building-effective-agents)" paper.
262
+
263
+ It's built on top of [mcp-agent](todo).
265
264
 
266
265
  ### llmindset.co.uk fork:
267
266
 
268
- - "FastAgent" style prototyping
269
- - Interactive Mode
267
+ - "FastAgent" style prototyping, with per-agent models
268
+ - Warm-up / Post-Workflow Agent Interactions
269
+ - Quick Setup
270
+ - Interactive Prompt Mode
270
271
  - Simple Model Selection with aliases
271
272
  - User/Assistant and Tool Call message display
272
273
  - MCP Sever Environment Variable support
@@ -274,49 +275,13 @@ We welcome all kinds of [contributions](/CONTRIBUTING.md), feedback and your hel
274
275
  - Comprehensive Progress display
275
276
  - JSONL file logging with secret revokation
276
277
  - OpenAI o1/o3-mini support with reasoning level
277
- - Enhaned Human Input Messaging and Handling
278
+ - Enhanced Human Input Messaging and Handling
279
+ - Declarative workflows
278
280
 
279
281
  ## Get Started
280
282
 
281
283
  We recommend using [uv](https://docs.astral.sh/uv/) to manage your Python projects:
282
284
 
283
- ```bash
284
- uv add "mcp-agent"
285
- ```
286
-
287
- Alternatively:
288
-
289
- ```bash
290
- pip install mcp-agent
291
- ```
292
-
293
- ### Quickstart
294
-
295
- > [!TIP]
296
- > The [`examples`](/examples) directory has several example applications to get started with.
297
- > To run an example, clone this repo, then:
298
- >
299
- > ```bash
300
- > cd examples/mcp_basic_agent # Or any other example
301
- > cp mcp_agent.secrets.yaml.example mcp_agent.secrets.yaml # Update API keys
302
- > uv run main.py
303
- > ```
304
-
305
285
  ## Table of Contents
306
286
 
307
- ## Workflows
308
-
309
- mcp-agent provides implementations for every pattern in Anthropic’s [Building Effective Agents](https://www.anthropic.com/research/building-effective-agents), as well as the OpenAI [Swarm](https://github.com/openai/swarm) pattern.
310
- Each pattern is model-agnostic, and exposed as an `AugmentedLLM`, making everything very composable.
311
-
312
- </details>
313
-
314
- ### Signaling and Human Input
315
-
316
- **Signaling**: The framework can pause/resume tasks. The agent or LLM might “signal” that it needs user input, so the workflow awaits. A developer may signal during a workflow to seek approval or review before continuing with a workflow.
317
-
318
- **Human Input**: If an Agent has a `human_input_callback`, the LLM can call a `__human_input__` tool to request user input mid-workflow.
319
-
320
- ## Contributing
321
-
322
287
  We welcome any and all kinds of contributions. Please see the [CONTRIBUTING guidelines](./CONTRIBUTING.md) to get started.
@@ -0,0 +1,51 @@
1
+ ## FastAgent
2
+
3
+ <p align="center">
4
+ <a href="https://pypi.org/project/fast-agent-mcp/"><img src="https://img.shields.io/pypi/v/fast-agent-mcp?color=%2334D058&label=pypi" /></a>
5
+ <a href="https://github.com/evalstate/fast-agent/issues"><img src="https://img.shields.io/github/issues-raw/evalstate/fast-agent" /></a>
6
+ <a href="https://lmai.link/discord/mcp-agent"><img src="https://shields.io/discord/1089284610329952357" alt="discord" /></a>
7
+ <img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/fast-agent-mcp?label=pypi%20%7C%20downloads"/>
8
+ <a href="https://github.com/evalstate/fast-agent-mcp/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/fast-agent-mcp" /></a>
9
+ </p>
10
+
11
+ ## Overview
12
+
13
+ **`fast-agent`** lets you define, test and compose agents and tools in minutes.
14
+
15
+ ### Get started:
16
+
17
+ Install the [uv package manager](https://docs.astral.sh/uv/).
18
+
19
+ `uv pip install fast-agent-mcp` - download fast-agent
20
+
21
+ `fast-agent setup` - setup an agent and configuration files.
22
+
23
+ `uv run agent.py` - run and interact with your first agent.
24
+
25
+ `fast-agent bootstrap workflow` - generate example agents demonstrating each of the workflows from Anthropic's "[Building Effective Agents](https://www.anthropic.com/research/building-effective-agents)" paper.
26
+
27
+ It's built on top of [mcp-agent](todo).
28
+
29
+ ### llmindset.co.uk fork:
30
+
31
+ - "FastAgent" style prototyping, with per-agent models
32
+ - Warm-up / Post-Workflow Agent Interactions
33
+ - Quick Setup
34
+ - Interactive Prompt Mode
35
+ - Simple Model Selection with aliases
36
+ - User/Assistant and Tool Call message display
37
+ - MCP Sever Environment Variable support
38
+ - MCP Roots support
39
+ - Comprehensive Progress display
40
+ - JSONL file logging with secret revokation
41
+ - OpenAI o1/o3-mini support with reasoning level
42
+ - Enhanced Human Input Messaging and Handling
43
+ - Declarative workflows
44
+
45
+ ## Get Started
46
+
47
+ We recommend using [uv](https://docs.astral.sh/uv/) to manage your Python projects:
48
+
49
+ ## Table of Contents
50
+
51
+ We welcome any and all kinds of contributions. Please see the [CONTRIBUTING guidelines](./CONTRIBUTING.md) to get started.
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "fast-agent-mcp"
3
- version = "0.0.7"
4
- description = "Build, Test, Deploy composable MCP Agent Workflows."
3
+ version = "0.0.8"
4
+ description = "Define, Prompt and Test MCP enabled Agents and Workflows"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
7
7
  authors = [
@@ -27,7 +27,6 @@ dependencies = [
27
27
  "typer>=0.15.1",
28
28
  "numpy>=2.2.1",
29
29
  "scikit-learn>=1.6.0",
30
- "pyreadline3>=3.5.4",
31
30
  "anthropic>=0.42.0",
32
31
  "openai>=1.63.2",
33
32
  ]
@@ -57,7 +56,13 @@ packages = ["src/mcp_agent"]
57
56
  [tool.hatch.build]
58
57
  include = [
59
58
  "src/mcp_agent/**/*.py",
59
+ "src/mcp_agent/**/*.yaml",
60
+ "src/mcp_agent/**/*.yml",
61
+ "src/mcp_agent/**/*.csv",
60
62
  "src/mcp_agent/resources/**/*.py",
63
+ "src/mcp_agent/resources/**/*.yaml",
64
+ "src/mcp_agent/resources/**/*.yml",
65
+ "src/mcp_agent/resources/**/*.csv",
61
66
  ]
62
67
 
63
68
  [dependency-groups]
@@ -77,6 +82,12 @@ fastagent = "mcp_agent.cli.__main__:app"
77
82
  silsila = "mcp_agent.cli.__main__:app"
78
83
 
79
84
  [tool.setuptools.package-data]
80
- mcp-agent = ["data/*.json"]
81
- mcp_agent = ["resources/examples/**/*.py"] # Include all Python files in examples subdirectories
85
+ mcp_agent = [
86
+ "data/*.json",
87
+ "resources/examples/**/*.py",
88
+ "resources/examples/**/*.yaml",
89
+ "resources/examples/**/*.yml",
90
+ "resources/examples/**/*.csv",
91
+ "resources/examples/**/mount-point/*.csv"
92
+ ]
82
93
 
@@ -43,6 +43,7 @@ class AgentConfig:
43
43
  model: Optional[str] = None
44
44
  use_history: bool = True
45
45
  default_request_params: Optional[RequestParams] = None
46
+ human_input: bool = False
46
47
 
47
48
  def __post_init__(self):
48
49
  """Ensure default_request_params exists with proper history setting"""
@@ -103,10 +104,13 @@ class Agent(MCPAggregator):
103
104
  # Map function names to tools
104
105
  self._function_tool_map: Dict[str, FastTool] = {}
105
106
 
106
- self.human_input_callback: HumanInputCallback | None = human_input_callback
107
- if not human_input_callback:
108
- if self.context.human_input_handler:
109
- self.human_input_callback = self.context.human_input_handler
107
+ if not self.config.human_input:
108
+ self.human_input_callback = None
109
+ else:
110
+ self.human_input_callback: HumanInputCallback | None = human_input_callback
111
+ if not human_input_callback:
112
+ if self.context.human_input_handler:
113
+ self.human_input_callback = self.context.human_input_handler
110
114
 
111
115
  async def initialize(self):
112
116
  """
@@ -154,7 +154,11 @@ class MCPApp:
154
154
  "agent_name": "mcp_application_loop",
155
155
  },
156
156
  )
157
- await cleanup_context()
157
+ try:
158
+ await cleanup_context()
159
+ except asyncio.CancelledError:
160
+ self.logger.debug("Cleanup cancelled error during shutdown")
161
+
158
162
  self._context = None
159
163
  self._initialized = False
160
164
 
@@ -0,0 +1,280 @@
1
+ """Bootstrap command to create example applications."""
2
+
3
+ import shutil
4
+ from pathlib import Path
5
+ import typer
6
+ from rich.console import Console
7
+ from rich.table import Table
8
+ from rich.panel import Panel
9
+
10
+ app = typer.Typer(
11
+ help="Create example applications",
12
+ no_args_is_help=False, # Allow showing our custom help instead
13
+ )
14
+ console = Console()
15
+
16
+ EXAMPLE_TYPES = {
17
+ "workflow": {
18
+ "description": "Example workflows, demonstrating each of the patterns in Anthropic's\n"
19
+ "'Building Effective Agents' paper. Some agents use the 'fetch'\n"
20
+ "and filesystem MCP Servers.",
21
+ "files": [
22
+ "chaining.py",
23
+ "evaluator.py",
24
+ "human_input.py",
25
+ "orchestrator.py",
26
+ "parallel.py",
27
+ "router.py",
28
+ ],
29
+ "create_subdir": False,
30
+ },
31
+ "researcher": {
32
+ "description": "Research agent example with additional evaluation/optimization\n"
33
+ "example. Uses Brave Search and Docker MCP Servers.\n"
34
+ "Creates examples in a 'researcher' subdirectory.",
35
+ "files": [
36
+ "researcher.py",
37
+ "researcher-eval.py",
38
+ "mcp_agent.secrets.yaml.example",
39
+ ],
40
+ "create_subdir": True,
41
+ },
42
+ "data-analysis": {
43
+ "description": "Data analysis agent examples that demonstrate working with\n"
44
+ "datasets, performing statistical analysis, and generating visualizations.\n"
45
+ "Creates examples in a 'data-analysis' subdirectory with mount-point for data.\n"
46
+ "Uses MCP 'roots' feature for mapping",
47
+ "files": ["analysis.py", "fastagent.config.yaml"],
48
+ "mount_point_files": ["WA_Fn-UseC_-HR-Employee-Attrition.csv"],
49
+ "create_subdir": True,
50
+ },
51
+ }
52
+
53
+
54
+ def copy_example_files(
55
+ example_type: str, target_dir: Path, force: bool = False
56
+ ) -> list[str]:
57
+ """Copy example files from resources to target directory."""
58
+ created = []
59
+
60
+ # Determine if we should create a subdirectory for this example type
61
+ example_info = EXAMPLE_TYPES[example_type]
62
+ if example_info["create_subdir"]:
63
+ target_dir = target_dir / example_type
64
+ if not target_dir.exists():
65
+ target_dir.mkdir(parents=True)
66
+ console.print(f"Created subdirectory: {target_dir}")
67
+
68
+ # Create mount-point directory if needed
69
+ mount_point_files = example_info.get("mount_point_files", [])
70
+ if mount_point_files:
71
+ mount_point_dir = target_dir / "mount-point"
72
+ if not mount_point_dir.exists():
73
+ mount_point_dir.mkdir(parents=True)
74
+ console.print(f"Created mount-point directory: {mount_point_dir}")
75
+
76
+ # Use the resources directory from the package
77
+ source_dir = (
78
+ Path(__file__).parent.parent.parent
79
+ / "resources"
80
+ / "examples"
81
+ / ("workflows" if example_type == "workflow" else f"{example_type}")
82
+ )
83
+
84
+ if not source_dir.exists():
85
+ console.print(f"[red]Error: Source directory not found: {source_dir}[/red]")
86
+ return created
87
+
88
+ for filename in example_info["files"]:
89
+ source = source_dir / filename
90
+ target = target_dir / filename
91
+
92
+ try:
93
+ if not source.exists():
94
+ console.print(f"[red]Error: Source file not found: {source}[/red]")
95
+ continue
96
+
97
+ if target.exists() and not force:
98
+ console.print(f"[yellow]Skipping[/yellow] {filename} (already exists)")
99
+ continue
100
+
101
+ shutil.copy2(source, target)
102
+ created.append(str(target.relative_to(target_dir.parent)))
103
+ console.print(f"[green]Created[/green] {created[-1]}")
104
+
105
+ except Exception as e:
106
+ console.print(f"[red]Error copying {filename}: {str(e)}[/red]")
107
+
108
+ # Copy mount-point files if any
109
+ if mount_point_files:
110
+ source_mount_point = source_dir / "mount-point"
111
+ for filename in mount_point_files:
112
+ source = source_mount_point / filename
113
+ target = mount_point_dir / filename
114
+
115
+ try:
116
+ if not source.exists():
117
+ console.print(f"[red]Error: Source file not found: {source}[/red]")
118
+ continue
119
+
120
+ if target.exists() and not force:
121
+ console.print(
122
+ f"[yellow]Skipping[/yellow] mount-point/{filename} (already exists)"
123
+ )
124
+ continue
125
+
126
+ shutil.copy2(source, target)
127
+ created.append(f"{example_type}/mount-point/{filename}")
128
+ console.print(f"[green]Created[/green] mount-point/{filename}")
129
+
130
+ except Exception as e:
131
+ console.print(
132
+ f"[red]Error copying mount-point/{filename}: {str(e)}[/red]"
133
+ )
134
+
135
+ return created
136
+
137
+
138
+ def show_overview():
139
+ """Display an overview of available examples in a nicely formatted table."""
140
+ console.print("\n[bold cyan]FastAgent Example Applications[/bold cyan]")
141
+ console.print("Build agents and compose workflows through practical examples\n")
142
+
143
+ # Create a table for better organization
144
+ table = Table(
145
+ show_header=True, header_style="bold magenta", box=None, padding=(0, 2)
146
+ )
147
+ table.add_column("Example")
148
+ table.add_column("Description")
149
+ table.add_column("Files")
150
+
151
+ for name, info in EXAMPLE_TYPES.items():
152
+ files_list = "\n".join(f"• {f}" for f in info["files"])
153
+ if "mount_point_files" in info:
154
+ files_list += "\n[blue]mount-point:[/blue]\n" + "\n".join(
155
+ f"• {f}" for f in info["mount_point_files"]
156
+ )
157
+ table.add_row(f"[green]{name}[/green]", info["description"], files_list)
158
+
159
+ console.print(table)
160
+
161
+ # Show usage instructions in a panel
162
+ usage_text = (
163
+ "[bold]Commands:[/bold]\n"
164
+ " fastagent bootstrap workflow DIR Create workflow examples in DIR\n"
165
+ " fastagent bootstrap researcher DIR Create researcher example in 'researcher' subdirectory\n"
166
+ " fastagent bootstrap data-analysis DIR Create data analysis examples in 'data-analysis' subdirectory\n\n"
167
+ "[bold]Options:[/bold]\n"
168
+ " --force Overwrite existing files\n\n"
169
+ "[bold]Examples:[/bold]\n"
170
+ " fastagent bootstrap workflow . Create in current directory\n"
171
+ " fastagent bootstrap researcher . Create in researcher subdirectory\n"
172
+ " fastagent bootstrap data-analysis . --force Force overwrite files in data-analysis subdirectory"
173
+ )
174
+ console.print(Panel(usage_text, title="Usage", border_style="blue"))
175
+
176
+
177
+ @app.command()
178
+ def workflow(
179
+ directory: Path = typer.Argument(
180
+ Path("."),
181
+ help="Directory where workflow examples will be created",
182
+ ),
183
+ force: bool = typer.Option(
184
+ False, "--force", "-f", help="Force overwrite existing files"
185
+ ),
186
+ ):
187
+ """Create workflow pattern examples."""
188
+ target_dir = directory.resolve()
189
+ if not target_dir.exists():
190
+ target_dir.mkdir(parents=True)
191
+ console.print(f"Created directory: {target_dir}")
192
+
193
+ created = copy_example_files("workflow", target_dir, force)
194
+ _show_completion_message("workflow", created)
195
+
196
+
197
+ @app.command()
198
+ def researcher(
199
+ directory: Path = typer.Argument(
200
+ Path("."),
201
+ help="Directory where researcher examples will be created (in 'researcher' subdirectory)",
202
+ ),
203
+ force: bool = typer.Option(
204
+ False, "--force", "-f", help="Force overwrite existing files"
205
+ ),
206
+ ):
207
+ """Create researcher pattern examples."""
208
+ target_dir = directory.resolve()
209
+ if not target_dir.exists():
210
+ target_dir.mkdir(parents=True)
211
+ console.print(f"Created directory: {target_dir}")
212
+
213
+ created = copy_example_files("researcher", target_dir, force)
214
+ _show_completion_message("researcher", created)
215
+
216
+
217
+ @app.command()
218
+ def data_analysis(
219
+ directory: Path = typer.Argument(
220
+ Path("."),
221
+ help="Directory where data analysis examples will be created (creates 'data-analysis' subdirectory with mount-point)",
222
+ ),
223
+ force: bool = typer.Option(
224
+ False, "--force", "-f", help="Force overwrite existing files"
225
+ ),
226
+ ):
227
+ """Create data analysis examples with sample dataset."""
228
+ target_dir = directory.resolve()
229
+ if not target_dir.exists():
230
+ target_dir.mkdir(parents=True)
231
+ console.print(f"Created directory: {target_dir}")
232
+
233
+ created = copy_example_files("data-analysis", target_dir, force)
234
+ _show_completion_message("data-analysis", created)
235
+
236
+
237
+ def _show_completion_message(example_type: str, created: list[str]):
238
+ """Show completion message and next steps."""
239
+ if created:
240
+ console.print("\n[green]Setup completed successfully![/green]")
241
+ console.print("\nCreated files:")
242
+ for f in created:
243
+ console.print(f" - {f}")
244
+
245
+ console.print("\n[bold]Next Steps:[/bold]")
246
+ if example_type == "workflow":
247
+ console.print("1. Review chaining.py for the basic workflow example")
248
+ console.print("2. Check other examples:")
249
+ console.print(" - parallel.py: Run agents in parallel")
250
+ console.print(" - router.py: Route requests between agents")
251
+ console.print(" - evaluator.py: Add evaluation capabilities")
252
+ console.print(" - human_input.py: Incorporate human feedback")
253
+ console.print("3. Run an example with: uv run <example>.py")
254
+ console.print(
255
+ "4. Try a different model with --model=<model>, or update the agent config"
256
+ )
257
+
258
+ elif example_type == "researcher":
259
+ console.print(
260
+ "1. Set up the Brave MCP Server (get an API key from https://brave.com/search/api/)"
261
+ )
262
+ console.print("2. Try `uv run researcher.py` for the basic version")
263
+ console.print(
264
+ "3. Try `uv run researcher-eval.py` for the eval/optimize version"
265
+ )
266
+ elif example_type == "data-analysis":
267
+ console.print(
268
+ "1. Run uv `analysis.py` to perform data analysis and visualization"
269
+ )
270
+ console.print("2. The dataset is available in the mount-point directory:")
271
+ console.print(" - mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv")
272
+ else:
273
+ console.print("\n[yellow]No files were created.[/yellow]")
274
+
275
+
276
+ @app.callback(invoke_without_command=True)
277
+ def main(ctx: typer.Context):
278
+ """Create example applications and learn FastAgent patterns."""
279
+ if ctx.invoked_subcommand is None:
280
+ show_overview()
@@ -22,28 +22,31 @@ FASTAGENT_CONFIG_TEMPLATE = """
22
22
  default_model: sonnet
23
23
 
24
24
  # Logging and Console Configuration:
25
- logging:
25
+ logger:
26
26
  # level: "debug" | "info" | "warning" | "error"
27
27
  # type: "none" | "console" | "file" | "http"
28
28
  # path: "/path/to/logfile.jsonl"
29
29
 
30
30
 
31
31
  # Switch the progress display on or off
32
- # progress_display: true
32
+ progress_display: true
33
33
 
34
34
  # Show chat User/Assistant messages on the console
35
- # show_chat: true
35
+ show_chat: true
36
36
  # Show tool calls on the console
37
- # show_tools: true
37
+ show_tools: true
38
38
  # Truncate long tool responses on the console
39
- # truncate_tools: true
39
+ truncate_tools: true
40
40
 
41
41
  # MCP Servers
42
42
  mcp:
43
43
  servers:
44
44
  fetch:
45
45
  command: "uvx"
46
- args: ["mcp-server-fetch"]
46
+ args: ["mcp-server-fetch"]
47
+ filesystem:
48
+ command: "npx"
49
+ args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
47
50
 
48
51
  """
49
52
 
@@ -51,6 +54,8 @@ FASTAGENT_SECRETS_TEMPLATE = """
51
54
  # FastAgent Secrets Configuration
52
55
  # WARNING: Keep this file secure and never commit to version control
53
56
 
57
+ # Alternatively set OPENAI_API_KEY and ANTHROPIC_API_KEY environment variables. Config file takes precedence.
58
+
54
59
  openai:
55
60
  api_key: <your-api-key-here>
56
61
  anthropic:
@@ -110,17 +115,14 @@ import asyncio
110
115
  from mcp_agent.core.fastagent import FastAgent
111
116
 
112
117
  # Create the application
113
- agent_app = FastAgent("FastAgent Example")
114
- # Uncomment the below to disable human input callback tool
115
- # agent_app.app._human_input_callback = None
118
+ fast = FastAgent("FastAgent Example")
116
119
 
117
120
 
118
121
  # Define the agent
119
- @agent_app.agent(servers=["fetch"])
120
- # @agent_app.agent(servers=["fetch"])
122
+ @fast.agent(servers=["fetch"])
121
123
  async def main():
122
- # use the --model= command line switch to specify model
123
- async with agent_app.run() as agent:
124
+ # use the --model command line switch or agent arguments to change model
125
+ async with fast.run() as agent:
124
126
  await agent()
125
127
 
126
128
 
@@ -217,11 +219,13 @@ def init(
217
219
 
218
220
  if created:
219
221
  console.print("\n[green]Setup completed successfully![/green]")
220
- if "fastagent-secrets.yaml" in created:
222
+ if "fastagent.secrets.yaml" in created:
221
223
  console.print("\n[yellow]Important:[/yellow] Remember to:")
222
- console.print("1. Add your API keys to fastagent-secrets.yaml")
223
224
  console.print(
224
- "2. Keep fastagent-secrets.yaml secure and never commit it to version control"
225
+ "1. Add your API keys to fastagent-secrets.yaml or set OPENAI_API_KEY and ANTHROPIC_API_KEY environment variables"
226
+ )
227
+ console.print(
228
+ "2. Keep fastagent.secrets.yaml secure and never commit it to version control"
225
229
  )
226
230
  console.print("\nTo get started, run:")
227
231
  console.print(" uv run agent.py")