fast-agent-mcp 0.3.2__tar.gz → 0.3.4__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.
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/.gitignore +1 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/PKG-INFO +2 -2
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/README.md +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/custom-agents/agent.py +2 -2
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/data-analysis/analysis-campaign.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/data-analysis/analysis.py +1 -1
- fast_agent_mcp-0.3.4/examples/fastapi/fastapi-advanced.py +51 -0
- fast_agent_mcp-0.3.4/examples/fastapi/fastapi-simple.py +43 -0
- fast_agent_mcp-0.3.4/examples/fastapi/pyproject.toml +17 -0
- fast_agent_mcp-0.3.4/examples/fastapi/readme.md +6 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/forms_demo.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/game_character.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/tool_call.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/mcp-filtering/test_mcp_filtering.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/state-transfer/agent_one.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/mcp/state-transfer/agent_two.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/vision-examples/example1.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/vision-examples/example2.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/vision-examples/example3.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/otel/agent.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/otel/agent2.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/researcher/researcher-eval.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/researcher/researcher-imp.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/researcher/researcher.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4/examples}/setup/agent.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4/examples}/setup/fastagent.config.yaml +1 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/agent.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/image_demo.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/simple_agent.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/workflows/chaining.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/workflows/evaluator.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/workflows/human_input.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/workflows/orchestrator.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/workflows/parallel.py +1 -1
- {fast_agent_mcp-0.3.2/src/fast_agent/resources → fast_agent_mcp-0.3.4}/examples/workflows/router.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/pyproject.toml +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/__init__.py +6 -3
- fast_agent_mcp-0.3.4/src/fast_agent/agents/__init__.py +85 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/llm_decorator.py +2 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/tool_agent.py +4 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/workflow/orchestrator_models.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/commands/go.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/commands/url_parser.py +3 -3
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/main.py +7 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/config.py +6 -0
- fast_agent_mcp-0.3.4/src/fast_agent/core/__init__.py +92 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/direct_decorators.py +85 -103
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/direct_factory.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/error_handling.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/fastagent.py +153 -34
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/logging/events.py +4 -9
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/prompt_utils.py +10 -4
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/anthropic/llm_anthropic.py +16 -5
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/bedrock/llm_bedrock.py +13 -5
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/google/llm_google_native.py +13 -2
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_openai.py +22 -13
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/ui_agent.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/data-analysis/analysis-campaign.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/data-analysis/analysis.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/elicitations/forms_demo.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/elicitations/game_character.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/mcp/elicitations/tool_call.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/state-transfer/agent_one.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/mcp/state-transfer/agent_two.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/researcher/researcher-eval.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/researcher/researcher-imp.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/researcher/researcher.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/agent.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/image_demo.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/simple_agent.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/workflows/chaining.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/workflows/evaluator.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/workflows/human_input.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/workflows/orchestrator.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/workflows/parallel.py +1 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4/src/fast_agent/resources}/examples/workflows/router.py +1 -1
- {fast_agent_mcp-0.3.2/examples → fast_agent_mcp-0.3.4/src/fast_agent/resources}/setup/agent.py +1 -1
- {fast_agent_mcp-0.3.2/examples → fast_agent_mcp-0.3.4/src/fast_agent/resources}/setup/fastagent.config.yaml +1 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/mcp_ui_utils.py +12 -1
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/rich_progress.py +8 -6
- fast_agent_mcp-0.3.2/src/fast_agent/agents/__init__.py +0 -36
- fast_agent_mcp-0.3.2/src/fast_agent/core/__init__.py +0 -52
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/LICENSE +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/azure-openai/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/bedrock/fast-agent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/custom-agents/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/mcp-filtering/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/mcp-filtering/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/mcp-filtering/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/vision-examples/cat.png +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/new-api/display_check.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/new-api/simple_llm.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/new-api/simple_llm_advanced.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/new-api/simple_mcp.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/otel/docker-compose.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/otel/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/setup/.gitignore +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/setup/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/setup/pyproject.toml.tmpl +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/.env.sample +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/Makefile +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/demo_images/clam.jpg +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/demo_images/crab.png +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/demo_images/shrimp.png +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/mcp_server/Dockerfile +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/mcp_server/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/hatch_build.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/agent_types.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/llm_agent.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/mcp_agent.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/workflow/chain_agent.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/workflow/evaluator_optimizer.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/workflow/iterative_planner.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/workflow/orchestrator_prompts.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/workflow/parallel_agent.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/workflow/router_agent.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/__main__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/commands/check_config.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/commands/quickstart.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/commands/server_helpers.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/commands/setup.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/constants.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/cli/terminal.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/constants.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/context.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/context_dependent.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/agent_app.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/core_app.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/exceptions.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/executor/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/executor/executor.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/executor/task_registry.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/executor/workflow_signal.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/logging/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/logging/json_serializer.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/logging/listeners.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/logging/logger.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/logging/transport.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/prompt.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/core/validation.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/event_progress.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/history/history_exporter.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/human_input/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/human_input/elicitation_handler.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/human_input/elicitation_state.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/human_input/form_fields.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/human_input/simple_form.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/human_input/types.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/interfaces.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/fastagent_llm.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/internal/passthrough.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/internal/playback.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/internal/silent.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/internal/slow.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/memory.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/model_database.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/model_factory.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/model_info.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/anthropic/anthropic_utils.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/anthropic/multipart_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/bedrock/bedrock_utils.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/google/google_converter.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_aliyun.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_azure.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_deepseek.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_generic.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_google_oai.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_groq.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_openrouter.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_tensorzero_openai.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/llm_xai.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/multipart_converter_openai.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/openai_multipart.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider/openai/openai_utils.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider_key_manager.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/provider_types.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/request_params.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/sampling_converter.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/llm/usage_tracking.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/common.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/elicitation_factory.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/elicitation_handlers.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/gen_client.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/helpers/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/helpers/content_helpers.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/helpers/server_config_helpers.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/hf_auth.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/interfaces.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/logger_textio.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/mcp_agent_client_session.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/mcp_aggregator.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/mcp_connection_manager.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/mcp_content.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/mime_utils.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompt.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompt_message_extended.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompt_render.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompt_serialization.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompts/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompts/__main__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompts/prompt_constants.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompts/prompt_helpers.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompts/prompt_load.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompts/prompt_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/prompts/prompt_template.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/resource_utils.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/sampling.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/server/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/server/agent_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp/ui_mixin.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/mcp_server_registry.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/py.typed +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/.env.sample +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/Makefile +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/demo_images/clam.jpg +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/demo_images/crab.png +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/demo_images/shrimp.png +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/mcp_server/.python-version +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/mcp_server/Dockerfile +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/mcp_server/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/setup/.gitignore +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/setup/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/resources/setup/pyproject.toml.tmpl +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/tools/elicitation.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/types/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/types/llm_stop_reason.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/__init__.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/console.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/console_display.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/elicitation_form.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/elicitation_style.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/enhanced_prompt.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/interactive_prompt.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/mermaid_utils.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/progress_display.py +0 -0
- {fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/ui/usage_display.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fast-agent-mcp
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Define, Prompt and Test MCP enabled Agents and Workflows
|
|
5
5
|
Author-email: Shaun Smith <fastagent@llmindset.co.uk>
|
|
6
6
|
License: Apache License
|
|
@@ -321,7 +321,7 @@ Here is the complete `sizer.py` Agent application, with boilerplate code:
|
|
|
321
321
|
|
|
322
322
|
```python
|
|
323
323
|
import asyncio
|
|
324
|
-
from fast_agent
|
|
324
|
+
from fast_agent import FastAgent
|
|
325
325
|
|
|
326
326
|
# Create the application
|
|
327
327
|
fast = FastAgent("Agent Example")
|
|
@@ -83,7 +83,7 @@ Here is the complete `sizer.py` Agent application, with boilerplate code:
|
|
|
83
83
|
|
|
84
84
|
```python
|
|
85
85
|
import asyncio
|
|
86
|
-
from fast_agent
|
|
86
|
+
from fast_agent import FastAgent
|
|
87
87
|
|
|
88
88
|
# Create the application
|
|
89
89
|
fast = FastAgent("Agent Example")
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from contextlib import asynccontextmanager
|
|
2
|
+
|
|
3
|
+
from fastapi import Body, FastAPI, HTTPException
|
|
4
|
+
|
|
5
|
+
from fast_agent.agents import McpAgent
|
|
6
|
+
from fast_agent.agents.agent_types import AgentConfig
|
|
7
|
+
from fast_agent.core import Core
|
|
8
|
+
from fast_agent.core.direct_factory import get_model_factory
|
|
9
|
+
from fast_agent.mcp import PromptMessageExtended
|
|
10
|
+
|
|
11
|
+
core = Core(name="fast-agent core")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@asynccontextmanager
|
|
15
|
+
async def lifespan(app: FastAPI):
|
|
16
|
+
# Manual lifecycle control: initialize Core and Agent explicitly
|
|
17
|
+
await core.initialize()
|
|
18
|
+
|
|
19
|
+
cfg = AgentConfig(
|
|
20
|
+
name="core_agent",
|
|
21
|
+
instruction="You are a helpful AI Agent.",
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
agent = McpAgent(config=cfg, context=core.context)
|
|
25
|
+
await agent.initialize()
|
|
26
|
+
|
|
27
|
+
llm_factory = get_model_factory(core.context, model=cfg.model)
|
|
28
|
+
await agent.attach_llm(llm_factory)
|
|
29
|
+
|
|
30
|
+
app.state.agent = agent
|
|
31
|
+
try:
|
|
32
|
+
yield
|
|
33
|
+
finally:
|
|
34
|
+
# Manual shutdown/cleanup
|
|
35
|
+
try:
|
|
36
|
+
await agent.shutdown()
|
|
37
|
+
finally:
|
|
38
|
+
await core.cleanup()
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
app = FastAPI(lifespan=lifespan)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@app.post("/ask", response_model=PromptMessageExtended)
|
|
45
|
+
async def ask(body: str = Body(..., media_type="text/plain")) -> PromptMessageExtended:
|
|
46
|
+
try:
|
|
47
|
+
# Call generate() to return the full multipart message (BaseModel)
|
|
48
|
+
result = await app.state.agent.generate(body)
|
|
49
|
+
return result
|
|
50
|
+
except Exception as e:
|
|
51
|
+
raise HTTPException(status_code=500, detail=str(e))
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from contextlib import asynccontextmanager
|
|
2
|
+
|
|
3
|
+
from fastapi import FastAPI, HTTPException
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
|
|
6
|
+
from fast_agent import FastAgent
|
|
7
|
+
|
|
8
|
+
# Create FastAgent without parsing CLI args (plays nice with uvicorn)
|
|
9
|
+
fast = FastAgent("fast-agent demo", parse_cli_args=False, quiet=True)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# Register a simple default agent via decorator
|
|
13
|
+
@fast.agent(name="helper", instruction="You are a helpful AI Agent.", default=True)
|
|
14
|
+
async def decorator():
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Keep FastAgent running for the app lifetime
|
|
19
|
+
@asynccontextmanager
|
|
20
|
+
async def lifespan(app: FastAPI):
|
|
21
|
+
async with fast.run() as agents:
|
|
22
|
+
app.state.agents = agents
|
|
23
|
+
yield
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
app = FastAPI(lifespan=lifespan)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class AskRequest(BaseModel):
|
|
30
|
+
message: str
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class AskResponse(BaseModel):
|
|
34
|
+
response: str
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@app.post("/ask", response_model=AskResponse)
|
|
38
|
+
async def ask(req: AskRequest) -> AskResponse:
|
|
39
|
+
try:
|
|
40
|
+
result = await app.state.agents.send(req.message)
|
|
41
|
+
return AskResponse(response=result)
|
|
42
|
+
except Exception as e:
|
|
43
|
+
raise HTTPException(status_code=500, detail=str(e))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "fast-agent-app"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "a simple fast-agent application"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13.7"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"fast-agent-mcp",
|
|
9
|
+
"fastapi>=0.116.1",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
[tool.uv]
|
|
13
|
+
package = true
|
|
14
|
+
|
|
15
|
+
# Optional convenience entry point if you later package this app:
|
|
16
|
+
[project.scripts]
|
|
17
|
+
fast-agent-app = "agent:main"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# fastapi demo applications
|
|
2
|
+
|
|
3
|
+
Be sure to `uv pip install fastapi[standard]` to run these examples.
|
|
4
|
+
|
|
5
|
+
- fastapi-simply.py -- uses simple `fast-agent` decorators to integrate with fastapi. run with `fastapi dev fastapi-simple.py`.
|
|
6
|
+
- fastapi-advanced.py -- uses `fast-agent` core library for developer managed lifecycle. run with `fastapi dev fastapi-advanced.py`.
|
|
@@ -13,7 +13,7 @@ import asyncio
|
|
|
13
13
|
from rich.console import Console
|
|
14
14
|
from rich.panel import Panel
|
|
15
15
|
|
|
16
|
-
from fast_agent
|
|
16
|
+
from fast_agent import FastAgent
|
|
17
17
|
from fast_agent.mcp.helpers.content_helpers import get_resource_text
|
|
18
18
|
|
|
19
19
|
fast = FastAgent("Elicitation Forms Demo", quiet=True)
|
|
@@ -14,7 +14,7 @@ from game_character_handler import game_character_elicitation_handler
|
|
|
14
14
|
from rich.console import Console
|
|
15
15
|
from rich.panel import Panel
|
|
16
16
|
|
|
17
|
-
from fast_agent
|
|
17
|
+
from fast_agent import FastAgent
|
|
18
18
|
from fast_agent.mcp.helpers.content_helpers import get_resource_text
|
|
19
19
|
|
|
20
20
|
fast = FastAgent("Game Character Creator", quiet=True)
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
default_model: haiku
|
|
14
14
|
# mcp-ui support: disabled, enabled or auto. "auto" opens the web browser on the asset automatically
|
|
15
|
+
# mcp_ui_output_dir: ".fast-agent/ui" # Where to write MCP-UI HTML files (relative to CWD if not absolute)
|
|
15
16
|
# mcp_ui_mode: enabled
|
|
16
17
|
|
|
17
18
|
# Logging and Console Configuration:
|
|
@@ -6,7 +6,7 @@ from typing import List, Union
|
|
|
6
6
|
|
|
7
7
|
from mcp.types import ImageContent, TextContent
|
|
8
8
|
|
|
9
|
-
from fast_agent
|
|
9
|
+
from fast_agent import FastAgent
|
|
10
10
|
from fast_agent.core.prompt import Prompt
|
|
11
11
|
from fast_agent.llm.request_params import RequestParams
|
|
12
12
|
|
|
@@ -5,7 +5,7 @@ Parallel Workflow showing Fan Out and Fan In agents, using different models
|
|
|
5
5
|
import asyncio
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
-
from fast_agent
|
|
8
|
+
from fast_agent import FastAgent
|
|
9
9
|
from fast_agent.core.prompt import Prompt
|
|
10
10
|
|
|
11
11
|
# Create the application
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""fast-agent - An MCP native agent application framework"""
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
3
4
|
|
|
4
5
|
# Configuration and settings (safe - pure Pydantic models)
|
|
5
6
|
from fast_agent.config import (
|
|
@@ -73,10 +74,12 @@ def __getattr__(name: str):
|
|
|
73
74
|
|
|
74
75
|
return ToolAgent
|
|
75
76
|
elif name == "McpAgent":
|
|
77
|
+
# Import directly from submodule to avoid package re-import cycles
|
|
76
78
|
from fast_agent.agents.mcp_agent import McpAgent
|
|
77
79
|
|
|
78
80
|
return McpAgent
|
|
79
81
|
elif name == "FastAgent":
|
|
82
|
+
# Import from the canonical implementation to avoid recursive imports
|
|
80
83
|
from fast_agent.core.fastagent import FastAgent
|
|
81
84
|
|
|
82
85
|
return FastAgent
|
|
@@ -85,7 +88,8 @@ def __getattr__(name: str):
|
|
|
85
88
|
|
|
86
89
|
|
|
87
90
|
# Help static analyzers/IDEs resolve symbols and signatures without importing at runtime.
|
|
88
|
-
if
|
|
91
|
+
if TYPE_CHECKING: # pragma: no cover - typing aid only
|
|
92
|
+
# Provide a concrete import path for type checkers/IDEs
|
|
89
93
|
from fast_agent.core.fastagent import FastAgent as FastAgent # noqa: F401
|
|
90
94
|
|
|
91
95
|
|
|
@@ -124,7 +128,6 @@ __all__ = [
|
|
|
124
128
|
"LlmStopReason",
|
|
125
129
|
"RequestParams",
|
|
126
130
|
# Agents (lazy loaded)
|
|
127
|
-
"ToolAgentSynchronous",
|
|
128
131
|
"LlmAgent",
|
|
129
132
|
"LlmDecorator",
|
|
130
133
|
"ToolAgent",
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Fast Agent - Agent implementations and workflow patterns.
|
|
3
|
+
|
|
4
|
+
This module re-exports agent classes with lazy imports to avoid circular
|
|
5
|
+
dependencies during package initialization while preserving a clean API:
|
|
6
|
+
|
|
7
|
+
from fast_agent.agents import McpAgent, ToolAgent, LlmAgent
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from typing import TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
from fast_agent.agents.agent_types import AgentConfig
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def __getattr__(name: str):
|
|
16
|
+
"""Lazily resolve agent classes to avoid import cycles."""
|
|
17
|
+
if name == "LlmAgent":
|
|
18
|
+
from .llm_agent import LlmAgent
|
|
19
|
+
|
|
20
|
+
return LlmAgent
|
|
21
|
+
elif name == "LlmDecorator":
|
|
22
|
+
from .llm_decorator import LlmDecorator
|
|
23
|
+
|
|
24
|
+
return LlmDecorator
|
|
25
|
+
elif name == "ToolAgent":
|
|
26
|
+
from .tool_agent import ToolAgent
|
|
27
|
+
|
|
28
|
+
return ToolAgent
|
|
29
|
+
elif name == "McpAgent":
|
|
30
|
+
from .mcp_agent import McpAgent
|
|
31
|
+
|
|
32
|
+
return McpAgent
|
|
33
|
+
elif name == "ChainAgent":
|
|
34
|
+
from .workflow.chain_agent import ChainAgent
|
|
35
|
+
|
|
36
|
+
return ChainAgent
|
|
37
|
+
elif name == "EvaluatorOptimizerAgent":
|
|
38
|
+
from .workflow.evaluator_optimizer import EvaluatorOptimizerAgent
|
|
39
|
+
|
|
40
|
+
return EvaluatorOptimizerAgent
|
|
41
|
+
elif name == "IterativePlanner":
|
|
42
|
+
from .workflow.iterative_planner import IterativePlanner
|
|
43
|
+
|
|
44
|
+
return IterativePlanner
|
|
45
|
+
elif name == "ParallelAgent":
|
|
46
|
+
from .workflow.parallel_agent import ParallelAgent
|
|
47
|
+
|
|
48
|
+
return ParallelAgent
|
|
49
|
+
elif name == "RouterAgent":
|
|
50
|
+
from .workflow.router_agent import RouterAgent
|
|
51
|
+
|
|
52
|
+
return RouterAgent
|
|
53
|
+
else:
|
|
54
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
if TYPE_CHECKING: # pragma: no cover - type checking only
|
|
58
|
+
from .llm_agent import LlmAgent as LlmAgent # noqa: F401
|
|
59
|
+
from .llm_decorator import LlmDecorator as LlmDecorator # noqa: F401
|
|
60
|
+
from .mcp_agent import McpAgent as McpAgent # noqa: F401
|
|
61
|
+
from .tool_agent import ToolAgent as ToolAgent # noqa: F401
|
|
62
|
+
from .workflow.chain_agent import ChainAgent as ChainAgent # noqa: F401
|
|
63
|
+
from .workflow.evaluator_optimizer import (
|
|
64
|
+
EvaluatorOptimizerAgent as EvaluatorOptimizerAgent,
|
|
65
|
+
) # noqa: F401
|
|
66
|
+
from .workflow.iterative_planner import IterativePlanner as IterativePlanner # noqa: F401
|
|
67
|
+
from .workflow.parallel_agent import ParallelAgent as ParallelAgent # noqa: F401
|
|
68
|
+
from .workflow.router_agent import RouterAgent as RouterAgent # noqa: F401
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
__all__ = [
|
|
72
|
+
# Core agents
|
|
73
|
+
"LlmAgent",
|
|
74
|
+
"LlmDecorator",
|
|
75
|
+
"ToolAgent",
|
|
76
|
+
"McpAgent",
|
|
77
|
+
# Workflow agents
|
|
78
|
+
"ChainAgent",
|
|
79
|
+
"EvaluatorOptimizerAgent",
|
|
80
|
+
"IterativePlanner",
|
|
81
|
+
"ParallelAgent",
|
|
82
|
+
"RouterAgent",
|
|
83
|
+
# Types
|
|
84
|
+
"AgentConfig",
|
|
85
|
+
]
|
|
@@ -189,6 +189,7 @@ class LlmDecorator(AgentProtocol):
|
|
|
189
189
|
Sequence[Union[str, PromptMessage, PromptMessageExtended]],
|
|
190
190
|
],
|
|
191
191
|
request_params: RequestParams | None = None,
|
|
192
|
+
tools: List[Tool] | None = None,
|
|
192
193
|
) -> PromptMessageExtended:
|
|
193
194
|
"""
|
|
194
195
|
Create a completion with the LLM using the provided messages.
|
|
@@ -212,7 +213,7 @@ class LlmDecorator(AgentProtocol):
|
|
|
212
213
|
multipart_messages = normalize_to_extended_list(messages)
|
|
213
214
|
|
|
214
215
|
with self._tracer.start_as_current_span(f"Agent: '{self._name}' generate"):
|
|
215
|
-
return await self.generate_impl(multipart_messages, request_params,
|
|
216
|
+
return await self.generate_impl(multipart_messages, request_params, tools)
|
|
216
217
|
|
|
217
218
|
async def generate_impl(
|
|
218
219
|
self,
|
|
@@ -97,7 +97,10 @@ class ToolAgent(LlmAgent):
|
|
|
97
97
|
)
|
|
98
98
|
|
|
99
99
|
if LlmStopReason.TOOL_USE == result.stop_reason:
|
|
100
|
-
|
|
100
|
+
if self.config.use_history:
|
|
101
|
+
messages = [await self.run_tools(result)]
|
|
102
|
+
else:
|
|
103
|
+
messages.extend([result, await self.run_tools(result)])
|
|
101
104
|
else:
|
|
102
105
|
break
|
|
103
106
|
|
{fast_agent_mcp-0.3.2 → fast_agent_mcp-0.3.4}/src/fast_agent/agents/workflow/orchestrator_models.py
RENAMED
|
@@ -72,7 +72,7 @@ class TaskWithResult(Task):
|
|
|
72
72
|
class StepResult(BaseModel):
|
|
73
73
|
"""Result of executing a step"""
|
|
74
74
|
|
|
75
|
-
step: Step = Field(description="The step that was executed"
|
|
75
|
+
step: Step = Field(description="The step that was executed")
|
|
76
76
|
task_results: List[TaskWithResult] = Field(
|
|
77
77
|
description="Results of executing each task", default_factory=list
|
|
78
78
|
)
|
|
@@ -7,10 +7,10 @@ from typing import Dict, List, Optional
|
|
|
7
7
|
|
|
8
8
|
import typer
|
|
9
9
|
|
|
10
|
+
from fast_agent import FastAgent
|
|
10
11
|
from fast_agent.agents.llm_agent import LlmAgent
|
|
11
12
|
from fast_agent.cli.commands.server_helpers import add_servers_to_config, generate_server_name
|
|
12
13
|
from fast_agent.cli.commands.url_parser import generate_server_configs, parse_server_urls
|
|
13
|
-
from fast_agent.core.fastagent import FastAgent
|
|
14
14
|
from fast_agent.ui.console_display import ConsoleDisplay
|
|
15
15
|
|
|
16
16
|
app = typer.Typer(
|
|
@@ -104,7 +104,7 @@ def generate_server_name(url: str) -> str:
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
def parse_server_urls(
|
|
107
|
-
urls_param: str, auth_token: str = None
|
|
107
|
+
urls_param: str, auth_token: str | None = None
|
|
108
108
|
) -> List[Tuple[str, Literal["http", "sse"], str, Dict[str, str] | None]]:
|
|
109
109
|
"""
|
|
110
110
|
Parse a comma-separated list of URLs into server configurations.
|
|
@@ -155,7 +155,7 @@ def generate_server_configs(
|
|
|
155
155
|
Returns:
|
|
156
156
|
Dictionary of server configurations
|
|
157
157
|
"""
|
|
158
|
-
server_configs = {}
|
|
158
|
+
server_configs: Dict[str, Dict[str, str | Dict[str, str]]] = {}
|
|
159
159
|
# Keep track of server name occurrences to handle collisions
|
|
160
160
|
name_counts = {}
|
|
161
161
|
|
|
@@ -178,7 +178,7 @@ def generate_server_configs(
|
|
|
178
178
|
final_name = f"{server_name}_{suffix}"
|
|
179
179
|
name_counts[server_name] += 1
|
|
180
180
|
|
|
181
|
-
config = {
|
|
181
|
+
config: Dict[str, str | Dict[str, str]] = {
|
|
182
182
|
"transport": transport_type,
|
|
183
183
|
"url": url,
|
|
184
184
|
}
|
|
@@ -85,7 +85,13 @@ def main(
|
|
|
85
85
|
Use --help with any command for detailed usage information.
|
|
86
86
|
"""
|
|
87
87
|
application.verbosity = 1 if verbose else 0 if not quiet else -1
|
|
88
|
-
|
|
88
|
+
if not color:
|
|
89
|
+
# Recreate consoles without color when --no-color is provided
|
|
90
|
+
from fast_agent.ui.console import console as base_console
|
|
91
|
+
from fast_agent.ui.console import error_console as base_error_console
|
|
92
|
+
|
|
93
|
+
application.console = base_console.__class__(color_system=None)
|
|
94
|
+
application.error_console = base_error_console.__class__(color_system=None, stderr=True)
|
|
89
95
|
|
|
90
96
|
# Handle version flag
|
|
91
97
|
if version:
|