fast-agent-mcp 0.3.6__tar.gz → 0.3.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.
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/PKG-INFO +4 -4
- fast_agent_mcp-0.3.8/examples/a2a/agent_executor.py +93 -0
- fast_agent_mcp-0.3.8/examples/a2a/server.py +53 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/fastapi/fastapi-advanced.py +1 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/setup/fastagent.config.yaml +2 -2
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/pyproject.toml +4 -4
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/__init__.py +9 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/agent_types.py +11 -11
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/llm_agent.py +60 -40
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/llm_decorator.py +351 -7
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/mcp_agent.py +87 -65
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/tool_agent.py +50 -4
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/commands/auth.py +14 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/commands/go.py +3 -3
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/constants.py +2 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/agent_app.py +2 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/direct_factory.py +39 -120
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/fastagent.py +2 -2
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/logging/listeners.py +2 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/history/history_exporter.py +3 -3
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/interfaces.py +2 -2
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/fastagent_llm.py +3 -3
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/model_database.py +7 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/model_factory.py +2 -3
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/bedrock/llm_bedrock.py +1 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/google/llm_google_native.py +1 -3
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_azure.py +1 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_openai.py +57 -8
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_tensorzero_openai.py +1 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/request_params.py +1 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/__init__.py +1 -2
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/mcp_aggregator.py +6 -3
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompt_message_extended.py +2 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompt_serialization.py +124 -39
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompts/prompt_load.py +34 -32
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompts/prompt_server.py +26 -11
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/setup/fastagent.config.yaml +2 -2
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/types/__init__.py +3 -1
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/enhanced_prompt.py +111 -64
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/interactive_prompt.py +13 -41
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/rich_progress.py +12 -8
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/.gitignore +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/LICENSE +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/README.md +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/azure-openai/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/bedrock/fast-agent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/custom-agents/agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/custom-agents/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/fastapi/fastapi-simple.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/fastapi/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/fastapi/readme.md +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/forms_demo.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/game_character.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/elicitations/tool_call.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/mcp-filtering/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/mcp-filtering/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/mcp-filtering/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/mcp-filtering/test_mcp_filtering.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/vision-examples/cat.png +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/vision-examples/example1.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/vision-examples/example2.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/vision-examples/example3.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/new-api/display_check.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/new-api/simple_llm.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/new-api/simple_llm_advanced.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/new-api/simple_mcp.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/otel/agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/otel/agent2.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/otel/docker-compose.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/otel/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/setup/.gitignore +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/setup/agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/setup/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/setup/pyproject.toml.tmpl +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/.env.sample +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/Makefile +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/demo_images/clam.jpg +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/demo_images/crab.png +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/demo_images/shrimp.png +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/image_demo.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/mcp_server/Dockerfile +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/mcp_server/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/simple_agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/hatch_build.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/workflow/chain_agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/workflow/evaluator_optimizer.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/workflow/iterative_planner.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/workflow/orchestrator_models.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/workflow/orchestrator_prompts.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/workflow/parallel_agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/agents/workflow/router_agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/__main__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/commands/check_config.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/commands/quickstart.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/commands/server_helpers.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/commands/setup.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/commands/url_parser.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/constants.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/main.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/cli/terminal.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/config.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/context.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/context_dependent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/core_app.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/direct_decorators.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/error_handling.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/exceptions.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/executor/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/executor/executor.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/executor/task_registry.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/executor/workflow_signal.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/logging/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/logging/events.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/logging/json_serializer.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/logging/logger.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/logging/transport.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/prompt.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/core/validation.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/event_progress.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/human_input/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/human_input/elicitation_handler.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/human_input/elicitation_state.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/human_input/form_fields.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/human_input/simple_form.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/human_input/types.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/internal/passthrough.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/internal/playback.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/internal/silent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/internal/slow.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/memory.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/model_info.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/prompt_utils.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/anthropic/anthropic_utils.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/anthropic/llm_anthropic.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/anthropic/multipart_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/bedrock/bedrock_utils.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/google/google_converter.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_aliyun.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_deepseek.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_generic.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_google_oai.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_groq.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_openrouter.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/llm_xai.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/multipart_converter_openai.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/openai_multipart.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider/openai/openai_utils.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider_key_manager.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/provider_types.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/sampling_converter.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/llm/usage_tracking.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/common.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/elicitation_factory.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/elicitation_handlers.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/gen_client.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/helpers/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/helpers/content_helpers.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/helpers/server_config_helpers.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/hf_auth.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/interfaces.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/logger_textio.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/mcp_agent_client_session.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/mcp_connection_manager.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/mcp_content.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/mime_utils.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/oauth_client.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompt.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompt_render.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompts/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompts/__main__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompts/prompt_constants.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompts/prompt_helpers.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/prompts/prompt_template.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/resource_utils.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/sampling.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/server/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/server/agent_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/ui_agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp/ui_mixin.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/mcp_server_registry.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/py.typed +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/forms_demo.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/game_character.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/elicitations/tool_call.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/.env.sample +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/Makefile +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/demo_images/clam.jpg +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/demo_images/crab.png +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/demo_images/shrimp.png +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/image_demo.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/mcp_server/.python-version +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/mcp_server/Dockerfile +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/mcp_server/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/simple_agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/setup/.gitignore +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/setup/agent.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/setup/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/resources/setup/pyproject.toml.tmpl +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/tools/elicitation.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/types/llm_stop_reason.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/__init__.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/console.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/console_display.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/elicitation_form.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/elicitation_style.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/mcp_ui_utils.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/mermaid_utils.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/src/fast_agent/ui/progress_display.py +0 -0
- {fast_agent_mcp-0.3.6 → fast_agent_mcp-0.3.8}/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.8
|
|
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
|
|
@@ -209,9 +209,9 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
209
209
|
Classifier: Operating System :: OS Independent
|
|
210
210
|
Classifier: Programming Language :: Python :: 3
|
|
211
211
|
Requires-Python: >=3.13.5
|
|
212
|
-
Requires-Dist: a2a-sdk>=0.3.
|
|
212
|
+
Requires-Dist: a2a-sdk>=0.3.6
|
|
213
213
|
Requires-Dist: aiohttp>=3.11.13
|
|
214
|
-
Requires-Dist: anthropic>=0.
|
|
214
|
+
Requires-Dist: anthropic>=0.68.0
|
|
215
215
|
Requires-Dist: azure-identity>=1.14.0
|
|
216
216
|
Requires-Dist: boto3>=1.35.0
|
|
217
217
|
Requires-Dist: deprecated>=1.2.18
|
|
@@ -220,7 +220,7 @@ Requires-Dist: fastapi>=0.115.6
|
|
|
220
220
|
Requires-Dist: google-genai>=1.33.0
|
|
221
221
|
Requires-Dist: keyring>=24.3.1
|
|
222
222
|
Requires-Dist: mcp==1.14.0
|
|
223
|
-
Requires-Dist: openai>=1.
|
|
223
|
+
Requires-Dist: openai>=1.108.0
|
|
224
224
|
Requires-Dist: opentelemetry-distro>=0.55b0
|
|
225
225
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.7.0
|
|
226
226
|
Requires-Dist: opentelemetry-instrumentation-anthropic>=0.43.1; python_version >= '3.10' and python_version < '4.0'
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from contextlib import AsyncExitStack
|
|
4
|
+
from typing import TYPE_CHECKING, cast
|
|
5
|
+
|
|
6
|
+
from a2a.server.agent_execution import AgentExecutor, RequestContext
|
|
7
|
+
from a2a.utils import new_agent_text_message
|
|
8
|
+
|
|
9
|
+
from fast_agent import FastAgent
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from a2a.server.events import EventQueue
|
|
13
|
+
from a2a.types import AgentCard
|
|
14
|
+
|
|
15
|
+
from fast_agent.core.agent_app import AgentApp
|
|
16
|
+
from fast_agent.interfaces import AgentProtocol
|
|
17
|
+
|
|
18
|
+
DEFAULT_AGENT_NAME = "helper"
|
|
19
|
+
|
|
20
|
+
fast = FastAgent(
|
|
21
|
+
"A2A FastAgent Demo",
|
|
22
|
+
parse_cli_args=False,
|
|
23
|
+
quiet=True,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@fast.agent(
|
|
28
|
+
name=DEFAULT_AGENT_NAME,
|
|
29
|
+
instruction="You are a helpful AI agent answering incoming A2A messages.",
|
|
30
|
+
default=True,
|
|
31
|
+
)
|
|
32
|
+
async def helper() -> None:
|
|
33
|
+
"""Default agent registered with FastAgent."""
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class FastAgentExecutor(AgentExecutor):
|
|
38
|
+
"""AgentExecutor that proxies requests to a FastAgent runtime."""
|
|
39
|
+
|
|
40
|
+
def __init__(self, default_agent_name: str = DEFAULT_AGENT_NAME) -> None:
|
|
41
|
+
self._stack = AsyncExitStack()
|
|
42
|
+
self._agents: AgentApp | None = None
|
|
43
|
+
self._default_agent_name = default_agent_name
|
|
44
|
+
|
|
45
|
+
async def _agents_app(self) -> AgentApp:
|
|
46
|
+
"""Ensure the FastAgent runtime is running and return the AgentApp."""
|
|
47
|
+
if self._agents is None:
|
|
48
|
+
self._agents = await self._stack.enter_async_context(fast.run())
|
|
49
|
+
return self._agents
|
|
50
|
+
|
|
51
|
+
async def _agent(self, agent_name: str | None = None) -> AgentProtocol:
|
|
52
|
+
"""Return the requested agent or fall back to the default agent."""
|
|
53
|
+
app = await self._agents_app()
|
|
54
|
+
agents_map = cast("dict[str, AgentProtocol]", getattr(app, "_agents"))
|
|
55
|
+
|
|
56
|
+
if agent_name and agent_name in agents_map:
|
|
57
|
+
return agents_map[agent_name]
|
|
58
|
+
|
|
59
|
+
if self._default_agent_name and self._default_agent_name in agents_map:
|
|
60
|
+
return agents_map[self._default_agent_name]
|
|
61
|
+
|
|
62
|
+
for candidate in agents_map.values():
|
|
63
|
+
config = getattr(candidate, "config", None)
|
|
64
|
+
if config is not None and getattr(config, "default", False):
|
|
65
|
+
return candidate
|
|
66
|
+
|
|
67
|
+
return next(iter(agents_map.values()))
|
|
68
|
+
|
|
69
|
+
async def execute(
|
|
70
|
+
self,
|
|
71
|
+
context: RequestContext,
|
|
72
|
+
event_queue: EventQueue,
|
|
73
|
+
) -> None:
|
|
74
|
+
message = context.get_user_input().strip()
|
|
75
|
+
if not message:
|
|
76
|
+
return
|
|
77
|
+
|
|
78
|
+
agent = await self._agent()
|
|
79
|
+
response = await agent.send(message)
|
|
80
|
+
await event_queue.enqueue_event(new_agent_text_message(response))
|
|
81
|
+
|
|
82
|
+
async def cancel(self, context: RequestContext, event_queue: EventQueue) -> None:
|
|
83
|
+
raise Exception("cancel not supported")
|
|
84
|
+
|
|
85
|
+
async def agent_card(self, agent_name: str | None = None) -> AgentCard:
|
|
86
|
+
"""Return the FastAgent-provided AgentCard for the given agent."""
|
|
87
|
+
agent = await self._agent(agent_name)
|
|
88
|
+
return await agent.agent_card()
|
|
89
|
+
|
|
90
|
+
async def shutdown(self) -> None:
|
|
91
|
+
"""Close the FastAgent runtime."""
|
|
92
|
+
await self._stack.aclose()
|
|
93
|
+
self._agents = None
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
from a2a.server.apps import A2AStarletteApplication
|
|
4
|
+
from a2a.server.request_handlers import DefaultRequestHandler
|
|
5
|
+
from a2a.server.tasks import InMemoryTaskStore
|
|
6
|
+
from a2a.types import AgentCard, TransportProtocol
|
|
7
|
+
from agent_executor import FastAgentExecutor
|
|
8
|
+
from uvicorn import Config, Server
|
|
9
|
+
|
|
10
|
+
HOST = "0.0.0.0"
|
|
11
|
+
PORT = 9999
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _with_server_url(card: AgentCard) -> AgentCard:
|
|
15
|
+
"""Inject JSON-RPC transport details while preserving FastAgent metadata."""
|
|
16
|
+
base_url = f"http://localhost:{PORT}/"
|
|
17
|
+
return card.model_copy(
|
|
18
|
+
update={
|
|
19
|
+
"url": base_url,
|
|
20
|
+
"preferred_transport": TransportProtocol.jsonrpc,
|
|
21
|
+
"additional_interfaces": [],
|
|
22
|
+
"supports_authenticated_extended_card": False,
|
|
23
|
+
"default_input_modes": ["text"],
|
|
24
|
+
"default_output_modes": ["text"],
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
async def main() -> None:
|
|
30
|
+
executor = FastAgentExecutor()
|
|
31
|
+
agent_card = _with_server_url(await executor.agent_card())
|
|
32
|
+
|
|
33
|
+
request_handler = DefaultRequestHandler(
|
|
34
|
+
agent_executor=executor,
|
|
35
|
+
task_store=InMemoryTaskStore(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
server = A2AStarletteApplication(
|
|
39
|
+
agent_card=agent_card,
|
|
40
|
+
http_handler=request_handler,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
config = Config(server.build(), host=HOST, port=PORT)
|
|
44
|
+
uvicorn_server = Server(config)
|
|
45
|
+
|
|
46
|
+
try:
|
|
47
|
+
await uvicorn_server.serve()
|
|
48
|
+
finally:
|
|
49
|
+
await executor.shutdown()
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if __name__ == "__main__":
|
|
53
|
+
asyncio.run(main())
|
|
@@ -2,11 +2,11 @@ from contextlib import asynccontextmanager
|
|
|
2
2
|
|
|
3
3
|
from fastapi import Body, FastAPI, HTTPException
|
|
4
4
|
|
|
5
|
+
from fast_agent import PromptMessageExtended
|
|
5
6
|
from fast_agent.agents import McpAgent
|
|
6
7
|
from fast_agent.agents.agent_types import AgentConfig
|
|
7
8
|
from fast_agent.core import Core
|
|
8
9
|
from fast_agent.core.direct_factory import get_model_factory
|
|
9
|
-
from fast_agent.mcp import PromptMessageExtended
|
|
10
10
|
|
|
11
11
|
core = Core(name="fast-agent core")
|
|
12
12
|
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
# Accepts aliases for Anthropic Models: haiku, haiku3, sonnet, sonnet35, opus, opus3
|
|
8
8
|
# and OpenAI Models: gpt-4.1, gpt-4.1-mini, o1, o1-mini, o3-mini
|
|
9
9
|
#
|
|
10
|
-
# If not specified, defaults to "
|
|
10
|
+
# If not specified, defaults to "gpt-5-mini.low".
|
|
11
11
|
# Can be overriden with a command line switch --model=<model>, or within the Agent constructor.
|
|
12
12
|
|
|
13
|
-
default_model:
|
|
13
|
+
default_model: gpt-5-mini.low
|
|
14
14
|
# mcp-ui support: disabled, enabled or auto. "auto" opens the web browser on the asset automatically
|
|
15
15
|
# mcp_ui_output_dir: ".fast-agent/ui" # Where to write MCP-UI HTML files (relative to CWD if not absolute)
|
|
16
16
|
# mcp_ui_mode: enabled
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "fast-agent-mcp"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.8"
|
|
4
4
|
description = "Define, Prompt and Test MCP enabled Agents and Workflows"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -23,8 +23,8 @@ dependencies = [
|
|
|
23
23
|
"pyyaml>=6.0.2",
|
|
24
24
|
"rich>=14.1.0",
|
|
25
25
|
"typer>=0.15.1",
|
|
26
|
-
"anthropic>=0.
|
|
27
|
-
"openai>=1.
|
|
26
|
+
"anthropic>=0.68.0",
|
|
27
|
+
"openai>=1.108.0",
|
|
28
28
|
"azure-identity>=1.14.0",
|
|
29
29
|
"boto3>=1.35.0",
|
|
30
30
|
"prompt-toolkit>=3.0.51",
|
|
@@ -36,7 +36,7 @@ dependencies = [
|
|
|
36
36
|
"opentelemetry-instrumentation-google-genai>=0.3b0",
|
|
37
37
|
"tensorzero>=2025.7.5",
|
|
38
38
|
"deprecated>=1.2.18",
|
|
39
|
-
"a2a-sdk>=0.3.
|
|
39
|
+
"a2a-sdk>=0.3.6",
|
|
40
40
|
"email-validator>=2.2.0",
|
|
41
41
|
"pyperclip>=1.9.0",
|
|
42
42
|
"keyring>=24.3.1",
|
|
@@ -27,8 +27,11 @@ from fast_agent.config import (
|
|
|
27
27
|
XAISettings,
|
|
28
28
|
)
|
|
29
29
|
|
|
30
|
+
# Prompt helpers (safe - no heavy dependencies)
|
|
31
|
+
from fast_agent.mcp.prompt import Prompt
|
|
32
|
+
|
|
30
33
|
# Type definitions and enums (safe - no dependencies)
|
|
31
|
-
from fast_agent.types import LlmStopReason, RequestParams
|
|
34
|
+
from fast_agent.types import LlmStopReason, PromptMessageExtended, RequestParams
|
|
32
35
|
|
|
33
36
|
|
|
34
37
|
def __getattr__(name: str):
|
|
@@ -91,6 +94,8 @@ def __getattr__(name: str):
|
|
|
91
94
|
if TYPE_CHECKING: # pragma: no cover - typing aid only
|
|
92
95
|
# Provide a concrete import path for type checkers/IDEs
|
|
93
96
|
from fast_agent.core.fastagent import FastAgent as FastAgent # noqa: F401
|
|
97
|
+
from fast_agent.mcp.prompt import Prompt as Prompt # noqa: F401
|
|
98
|
+
from fast_agent.types import PromptMessageExtended as PromptMessageExtended # noqa: F401
|
|
94
99
|
|
|
95
100
|
|
|
96
101
|
__all__ = [
|
|
@@ -127,6 +132,9 @@ __all__ = [
|
|
|
127
132
|
# Type definitions and enums (eagerly loaded)
|
|
128
133
|
"LlmStopReason",
|
|
129
134
|
"RequestParams",
|
|
135
|
+
"PromptMessageExtended",
|
|
136
|
+
# Prompt helpers (eagerly loaded)
|
|
137
|
+
"Prompt",
|
|
130
138
|
# Agents (lazy loaded)
|
|
131
139
|
"LlmAgent",
|
|
132
140
|
"LlmDecorator",
|
|
@@ -3,7 +3,7 @@ Type definitions for agents and agent configurations.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from dataclasses import dataclass, field
|
|
6
|
-
from enum import
|
|
6
|
+
from enum import StrEnum, auto
|
|
7
7
|
from typing import Dict, List, Optional
|
|
8
8
|
|
|
9
9
|
from mcp.client.session import ElicitationFnT
|
|
@@ -12,18 +12,18 @@ from mcp.client.session import ElicitationFnT
|
|
|
12
12
|
from fast_agent.types import RequestParams
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class AgentType(
|
|
15
|
+
class AgentType(StrEnum):
|
|
16
16
|
"""Enumeration of supported agent types."""
|
|
17
17
|
|
|
18
|
-
LLM =
|
|
19
|
-
BASIC =
|
|
20
|
-
CUSTOM =
|
|
21
|
-
ORCHESTRATOR =
|
|
22
|
-
PARALLEL =
|
|
23
|
-
EVALUATOR_OPTIMIZER =
|
|
24
|
-
ROUTER =
|
|
25
|
-
CHAIN =
|
|
26
|
-
ITERATIVE_PLANNER =
|
|
18
|
+
LLM = auto()
|
|
19
|
+
BASIC = auto()
|
|
20
|
+
CUSTOM = auto()
|
|
21
|
+
ORCHESTRATOR = auto()
|
|
22
|
+
PARALLEL = auto()
|
|
23
|
+
EVALUATOR_OPTIMIZER = auto()
|
|
24
|
+
ROUTER = auto()
|
|
25
|
+
CHAIN = auto()
|
|
26
|
+
ITERATIVE_PLANNER = auto()
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
@dataclass
|
|
@@ -45,7 +45,7 @@ class LlmAgent(LlmDecorator):
|
|
|
45
45
|
|
|
46
46
|
This class provides LLM-specific functionality including UI display methods,
|
|
47
47
|
tool call tracking, and chat interaction patterns while delegating core
|
|
48
|
-
LLM operations to the attached
|
|
48
|
+
LLM operations to the attached FastAgentLLMProtocol.
|
|
49
49
|
"""
|
|
50
50
|
|
|
51
51
|
def __init__(
|
|
@@ -81,56 +81,71 @@ class LlmAgent(LlmDecorator):
|
|
|
81
81
|
"""
|
|
82
82
|
|
|
83
83
|
# Determine display content based on stop reason if not provided
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
84
|
+
additional_segments: List[Text] = []
|
|
85
|
+
|
|
86
|
+
# Generate additional message based on stop reason
|
|
87
|
+
match message.stop_reason:
|
|
88
|
+
case LlmStopReason.END_TURN:
|
|
89
|
+
pass
|
|
90
|
+
|
|
91
|
+
case LlmStopReason.MAX_TOKENS:
|
|
92
|
+
additional_segments.append(
|
|
93
|
+
Text(
|
|
93
94
|
"\n\nMaximum output tokens reached - generation stopped.",
|
|
94
95
|
style="dim red italic",
|
|
95
96
|
)
|
|
97
|
+
)
|
|
96
98
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
case LlmStopReason.SAFETY:
|
|
100
|
+
additional_segments.append(
|
|
101
|
+
Text(
|
|
102
|
+
"\n\nContent filter activated - generation stopped.",
|
|
103
|
+
style="dim red italic",
|
|
100
104
|
)
|
|
105
|
+
)
|
|
101
106
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
case LlmStopReason.PAUSE:
|
|
108
|
+
additional_segments.append(
|
|
109
|
+
Text("\n\nLLM has requested a pause.", style="dim green italic")
|
|
110
|
+
)
|
|
106
111
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
case LlmStopReason.STOP_SEQUENCE:
|
|
113
|
+
additional_segments.append(
|
|
114
|
+
Text(
|
|
115
|
+
"\n\nStop Sequence activated - generation stopped.",
|
|
116
|
+
style="dim red italic",
|
|
110
117
|
)
|
|
118
|
+
)
|
|
111
119
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
else:
|
|
118
|
-
additional_message_text = None
|
|
120
|
+
case LlmStopReason.TOOL_USE:
|
|
121
|
+
if None is message.last_text():
|
|
122
|
+
additional_segments.append(
|
|
123
|
+
Text("The assistant requested tool calls", style="dim green italic")
|
|
124
|
+
)
|
|
119
125
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
case _:
|
|
127
|
+
if message.stop_reason:
|
|
128
|
+
additional_segments.append(
|
|
129
|
+
Text(
|
|
123
130
|
f"\n\nGeneration stopped for an unhandled reason ({message.stop_reason})",
|
|
124
131
|
style="dim red italic",
|
|
125
132
|
)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
if additional_message is not None:
|
|
136
|
+
additional_segments.append(
|
|
137
|
+
additional_message
|
|
138
|
+
if isinstance(additional_message, Text)
|
|
139
|
+
else Text(str(additional_message))
|
|
132
140
|
)
|
|
133
141
|
|
|
142
|
+
additional_message_text = None
|
|
143
|
+
if additional_segments:
|
|
144
|
+
combined = Text()
|
|
145
|
+
for segment in additional_segments:
|
|
146
|
+
combined += segment
|
|
147
|
+
additional_message_text = combined
|
|
148
|
+
|
|
134
149
|
message_text = message.last_text() or ""
|
|
135
150
|
|
|
136
151
|
# Use provided name/model or fall back to defaults
|
|
@@ -182,9 +197,11 @@ class LlmAgent(LlmDecorator):
|
|
|
182
197
|
|
|
183
198
|
# TODO -- we should merge the request parameters here with the LLM defaults?
|
|
184
199
|
# TODO - manage error catch, recovery, pause
|
|
185
|
-
result = await
|
|
200
|
+
result, summary = await self._generate_with_summary(messages, request_params, tools)
|
|
201
|
+
|
|
202
|
+
summary_text = Text(f"\n\n{summary.message}", style="dim red italic") if summary else None
|
|
186
203
|
|
|
187
|
-
await self.show_assistant_message(result)
|
|
204
|
+
await self.show_assistant_message(result, additional_message=summary_text)
|
|
188
205
|
return result
|
|
189
206
|
|
|
190
207
|
async def structured_impl(
|
|
@@ -196,8 +213,11 @@ class LlmAgent(LlmDecorator):
|
|
|
196
213
|
if "user" == messages[-1].role:
|
|
197
214
|
self.show_user_message(message=messages[-1])
|
|
198
215
|
|
|
199
|
-
result, message = await
|
|
200
|
-
|
|
216
|
+
(result, message), summary = await self._structured_with_summary(
|
|
217
|
+
messages, model, request_params
|
|
218
|
+
)
|
|
219
|
+
summary_text = Text(f"\n\n{summary.message}", style="dim red italic") if summary else None
|
|
220
|
+
await self.show_assistant_message(message=message, additional_message=summary_text)
|
|
201
221
|
return result, message
|
|
202
222
|
|
|
203
223
|
# async def show_prompt_loaded(
|