fast-agent-mcp 0.2.40__tar.gz → 0.2.42__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.2.40 → fast_agent_mcp-0.2.42}/PKG-INFO +2 -1
- fast_agent_mcp-0.2.42/examples/bedrock/fast-agent.config.yaml +13 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/forms_demo.py +0 -6
- fast_agent_mcp-0.2.42/examples/mcp/mcp-filtering/fastagent.config.yaml +6 -0
- fast_agent_mcp-0.2.42/examples/mcp/mcp-filtering/fastagent.secrets.yaml.example +16 -0
- fast_agent_mcp-0.2.42/examples/mcp/mcp-filtering/mcp_server.py +127 -0
- fast_agent_mcp-0.2.42/examples/mcp/mcp-filtering/test_mcp_filtering.py +96 -0
- {fast_agent_mcp-0.2.40/src/mcp_agent/resources → fast_agent_mcp-0.2.42}/examples/workflows/router.py +9 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/pyproject.toml +4 -3
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/base_agent.py +111 -1
- fast_agent_mcp-0.2.42/src/mcp_agent/cli/__main__.py +33 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/check_config.py +140 -81
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/go.py +151 -38
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/quickstart.py +6 -2
- fast_agent_mcp-0.2.42/src/mcp_agent/cli/commands/server_helpers.py +106 -0
- fast_agent_mcp-0.2.42/src/mcp_agent/cli/constants.py +25 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/main.py +1 -1
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/config.py +111 -44
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/agent_app.py +104 -15
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/agent_types.py +5 -1
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/direct_decorators.py +38 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/direct_factory.py +18 -4
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/enhanced_prompt.py +173 -13
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/fastagent.py +4 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/interactive_prompt.py +37 -37
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/usage_display.py +11 -1
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/validation.py +21 -2
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/elicitation_form.py +53 -21
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm.py +28 -9
- fast_agent_mcp-0.2.42/src/mcp_agent/llm/augmented_llm_silent.py +48 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/model_database.py +20 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/model_factory.py +21 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/provider_key_manager.py +22 -8
- fast_agent_mcp-0.2.42/src/mcp_agent/llm/provider_types.py +30 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_anthropic.py +7 -2
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_azure.py +7 -1
- fast_agent_mcp-0.2.42/src/mcp_agent/llm/providers/augmented_llm_bedrock.py +1787 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_google_native.py +4 -1
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_openai.py +12 -3
- fast_agent_mcp-0.2.42/src/mcp_agent/llm/providers/augmented_llm_xai.py +38 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/usage_tracking.py +28 -3
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/logger.py +7 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/hf_auth.py +32 -4
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/mcp_agent_client_session.py +2 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/mcp_aggregator.py +38 -44
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/sampling.py +15 -11
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/forms_demo.py +0 -6
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42/src/mcp_agent/resources}/examples/workflows/router.py +9 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/ui/console_display.py +125 -13
- fast_agent_mcp-0.2.40/src/mcp_agent/cli/__main__.py +0 -7
- fast_agent_mcp-0.2.40/src/mcp_agent/llm/provider_types.py +0 -22
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/.gitignore +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/LICENSE +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/README.md +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/azure-openai/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/custom-agents/agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/custom-agents/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/game_character.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/elicitations/tool_call.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/cat.png +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/example1.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/example2.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/example3.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/otel/agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/otel/agent2.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/otel/docker-compose.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/otel/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/.env.sample +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/Makefile +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/demo_images/clam.jpg +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/demo_images/crab.png +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/demo_images/shrimp.png +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/image_demo.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/mcp_server/Dockerfile +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/simple_agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/hatch_build.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/chain_agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/evaluator_optimizer.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/orchestrator_agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/orchestrator_models.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/orchestrator_prompts.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/parallel_agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/agents/workflow/router_agent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/app.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/setup.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/commands/url_parser.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/cli/terminal.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/console.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/context.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/context_dependent.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/error_handling.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/exceptions.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/mcp_content.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/prompt.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/core/request_params.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/event_progress.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/executor/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/executor/executor.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/executor/task_registry.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/executor/workflow_signal.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/elicitation_forms.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/elicitation_handler.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/elicitation_state.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/handler.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/human_input/types.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm_passthrough.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm_playback.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/augmented_llm_slow.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/memory.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/prompt_utils.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/anthropic_utils.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_aliyun.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_generic.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_google_oai.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_openrouter.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/augmented_llm_tensorzero.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/google_converter.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/multipart_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/multipart_converter_openai.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/multipart_converter_tensorzero.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/openai_multipart.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/openai_utils.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/sampling_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/providers/sampling_converter_openai.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/sampling_converter.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/llm/sampling_format_converter.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/events.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/json_serializer.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/listeners.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/rich_progress.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/logging/transport.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/common.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/elicitation_factory.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/elicitation_handlers.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/gen_client.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/helpers/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/helpers/content_helpers.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/helpers/server_config_helpers.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/interfaces.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/logger_textio.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/mcp_connection_manager.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/mime_utils.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompt_message_multipart.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompt_render.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompt_serialization.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/__main__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_constants.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_helpers.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_load.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/prompts/prompt_template.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp/resource_utils.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp_server/__init__.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp_server/agent_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/mcp_server_registry.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/progress_display.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/game_character.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/elicitations/tool_call.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/resources/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.2.40 → fast_agent_mcp-0.2.42}/src/mcp_agent/tools/tool_definition.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fast-agent-mcp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.42
|
|
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
|
|
@@ -213,6 +213,7 @@ Requires-Dist: a2a-sdk>=0.2.9
|
|
|
213
213
|
Requires-Dist: aiohttp>=3.11.13
|
|
214
214
|
Requires-Dist: anthropic>=0.55.0
|
|
215
215
|
Requires-Dist: azure-identity>=1.14.0
|
|
216
|
+
Requires-Dist: boto3>=1.35.0
|
|
216
217
|
Requires-Dist: deprecated>=1.2.18
|
|
217
218
|
Requires-Dist: email-validator>=2.2.0
|
|
218
219
|
Requires-Dist: fastapi>=0.115.6
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Example minimalfast-agent.config.yaml for Bedrock
|
|
2
|
+
|
|
3
|
+
# List of supported models: https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html
|
|
4
|
+
default_model: bedrock.amazon.nova-lite-v1:0
|
|
5
|
+
|
|
6
|
+
# Bedrock uses the AWS credentials provider chain to authenticate.
|
|
7
|
+
# This can be accomplished with aws sso login on local machines,
|
|
8
|
+
# or by IAM roles within AWS.
|
|
9
|
+
# see https://docs.aws.amazon.com/res/latest/ug/sso-idc.html
|
|
10
|
+
bedrock:
|
|
11
|
+
region: "us-east-1" # required
|
|
12
|
+
profile: "default" # optional, defaults to "default" - only needed if you have multiple profiles.
|
|
13
|
+
# Only needed on local machines, not on AWS.
|
|
@@ -51,8 +51,6 @@ async def main():
|
|
|
51
51
|
else:
|
|
52
52
|
console.print("[red]No registration data received[/red]")
|
|
53
53
|
|
|
54
|
-
console.print("\n" + "─" * 50 + "\n")
|
|
55
|
-
|
|
56
54
|
# Example 2: Product Review
|
|
57
55
|
console.print("[bold yellow]Example 2: Product Review Form[/bold yellow]")
|
|
58
56
|
console.print(
|
|
@@ -66,8 +64,6 @@ async def main():
|
|
|
66
64
|
)
|
|
67
65
|
console.print(review_panel)
|
|
68
66
|
|
|
69
|
-
console.print("\n" + "─" * 50 + "\n")
|
|
70
|
-
|
|
71
67
|
# Example 3: Account Settings
|
|
72
68
|
console.print("[bold yellow]Example 3: Account Settings Form[/bold yellow]")
|
|
73
69
|
console.print(
|
|
@@ -81,8 +77,6 @@ async def main():
|
|
|
81
77
|
)
|
|
82
78
|
console.print(settings_panel)
|
|
83
79
|
|
|
84
|
-
console.print("\n" + "─" * 50 + "\n")
|
|
85
|
-
|
|
86
80
|
# Example 4: Service Appointment
|
|
87
81
|
console.print("[bold yellow]Example 4: Service Appointment Booking[/bold yellow]")
|
|
88
82
|
console.print(
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# FastAgent Secrets Configuration
|
|
2
|
+
# WARNING: Keep this file secure and never commit to version control
|
|
3
|
+
|
|
4
|
+
# Alternatively set OPENAI_API_KEY, ANTHROPIC_API_KEY or other environment variables.
|
|
5
|
+
# Keys in the configuration file override environment variables.
|
|
6
|
+
|
|
7
|
+
openai:
|
|
8
|
+
api_key: <your-api-key-here>
|
|
9
|
+
anthropic:
|
|
10
|
+
api_key: <your-api-key-here>
|
|
11
|
+
deepseek:
|
|
12
|
+
api_key: <your-api-key-here>
|
|
13
|
+
openrouter:
|
|
14
|
+
api_key: <your-api-key-here>
|
|
15
|
+
|
|
16
|
+
default_model: <choose a default model for your provider>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import random
|
|
2
|
+
import string
|
|
3
|
+
|
|
4
|
+
from mcp.server.fastmcp import FastMCP
|
|
5
|
+
|
|
6
|
+
app = FastMCP(name="Creative Writing Server")
|
|
7
|
+
|
|
8
|
+
# String manipulation tools
|
|
9
|
+
@app.tool(
|
|
10
|
+
name="reverse_string",
|
|
11
|
+
description="Reverses a string",
|
|
12
|
+
)
|
|
13
|
+
def reverse_string(text: str) -> str:
|
|
14
|
+
return text[::-1]
|
|
15
|
+
|
|
16
|
+
@app.tool(
|
|
17
|
+
name="capitalize_string",
|
|
18
|
+
description="Capitalizes a string",
|
|
19
|
+
)
|
|
20
|
+
def capitalize_string(text: str) -> str:
|
|
21
|
+
return text.upper()
|
|
22
|
+
|
|
23
|
+
@app.tool(
|
|
24
|
+
name="lowercase_string",
|
|
25
|
+
description="Converts a string to lowercase",
|
|
26
|
+
)
|
|
27
|
+
def lowercase_string(text: str) -> str:
|
|
28
|
+
return text.lower()
|
|
29
|
+
|
|
30
|
+
@app.tool(
|
|
31
|
+
name="random_string",
|
|
32
|
+
description="Generates a random string of a given length",
|
|
33
|
+
)
|
|
34
|
+
def random_string(length: int) -> str:
|
|
35
|
+
return ''.join(random.choices(string.ascii_letters + string.digits, k=length))
|
|
36
|
+
|
|
37
|
+
@app.tool(
|
|
38
|
+
name="random_case_string",
|
|
39
|
+
description="Randomly capitalizes or lowercase each letter in a string",
|
|
40
|
+
)
|
|
41
|
+
def random_case_string(text: str) -> str:
|
|
42
|
+
return ''.join(random.choice([str.upper, str.lower])(c) for c in text)
|
|
43
|
+
|
|
44
|
+
# Code formatting tools
|
|
45
|
+
@app.tool(
|
|
46
|
+
name="coding_camel_case",
|
|
47
|
+
description="Converts a string to camel case",
|
|
48
|
+
)
|
|
49
|
+
def coding_camel_case(text: str) -> str:
|
|
50
|
+
return text.title().replace(" ", "")
|
|
51
|
+
|
|
52
|
+
@app.tool(
|
|
53
|
+
name="coding_snake_case",
|
|
54
|
+
description="Converts a string to snake case",
|
|
55
|
+
)
|
|
56
|
+
def coding_snake_case(text: str) -> str:
|
|
57
|
+
return text.lower().replace(" ", "_")
|
|
58
|
+
|
|
59
|
+
@app.tool(
|
|
60
|
+
name="coding_kebab_case",
|
|
61
|
+
description="Converts a string to kebab case",
|
|
62
|
+
)
|
|
63
|
+
def coding_kebab_case(text: str) -> str:
|
|
64
|
+
return text.lower().replace(" ", "-")
|
|
65
|
+
|
|
66
|
+
# Resources
|
|
67
|
+
@app.resource("resource://writing/style_guide")
|
|
68
|
+
def writing_style_guide() -> str:
|
|
69
|
+
return """Writing Style Guide:
|
|
70
|
+
1. Use active voice when possible
|
|
71
|
+
2. Keep sentences concise and clear
|
|
72
|
+
3. Vary sentence structure for rhythm
|
|
73
|
+
4. Use strong, specific verbs
|
|
74
|
+
5. Avoid excessive adverbs"""
|
|
75
|
+
|
|
76
|
+
@app.resource("resource://writing/character_names")
|
|
77
|
+
def character_names() -> str:
|
|
78
|
+
return """Character Name Ideas:
|
|
79
|
+
Fantasy: Eldara, Thorne, Zephyr, Lyanna
|
|
80
|
+
Modern: Alex, Jordan, Riley, Cameron
|
|
81
|
+
Historical: Eleanor, Benedict, Cordelia, Jasper
|
|
82
|
+
Sci-fi: Zara, Kai, Nova, Orion"""
|
|
83
|
+
|
|
84
|
+
@app.resource("resource://coding/conventions")
|
|
85
|
+
def coding_conventions() -> str:
|
|
86
|
+
return """Coding Conventions:
|
|
87
|
+
- Variables: snake_case
|
|
88
|
+
- Functions: snake_case
|
|
89
|
+
- Classes: PascalCase
|
|
90
|
+
- Constants: UPPER_CASE
|
|
91
|
+
- Files: lowercase with hyphens"""
|
|
92
|
+
|
|
93
|
+
@app.resource("resource://creativity/prompts")
|
|
94
|
+
def creativity_prompts() -> str:
|
|
95
|
+
return """Creative Writing Prompts:
|
|
96
|
+
1. A character discovers they can hear colors
|
|
97
|
+
2. The last person on Earth receives a phone call
|
|
98
|
+
3. A library where books come to life at night
|
|
99
|
+
4. Time moves backwards for one day only
|
|
100
|
+
5. A world where lies become physical objects"""
|
|
101
|
+
|
|
102
|
+
# Prompts
|
|
103
|
+
@app.prompt("writing_assistant")
|
|
104
|
+
def writing_assistant(genre: str = "general") -> str:
|
|
105
|
+
"""Creative writing assistant for different genres"""
|
|
106
|
+
return f"I am a creative writing assistant specialized in {genre} writing. I can help you with story structure, character development, dialogue, and prose improvement."
|
|
107
|
+
|
|
108
|
+
@app.prompt("writing_feedback")
|
|
109
|
+
def writing_feedback(focus: str = "overall") -> str:
|
|
110
|
+
"""Provides feedback on written work"""
|
|
111
|
+
return f"I am a writing coach focused on {focus} feedback. I'll provide constructive criticism and suggestions to improve your writing."
|
|
112
|
+
|
|
113
|
+
@app.prompt("coding_helper")
|
|
114
|
+
def coding_helper(language: str = "python") -> str:
|
|
115
|
+
"""Coding assistant for formatting and conventions"""
|
|
116
|
+
return f"I am a coding assistant specialized in {language}. I can help you with code formatting, naming conventions, and best practices."
|
|
117
|
+
|
|
118
|
+
@app.prompt("creative_brainstorm")
|
|
119
|
+
def creative_brainstorm(topic: str = "general") -> str:
|
|
120
|
+
"""Brainstorming assistant for creative projects"""
|
|
121
|
+
return f"I am a creative brainstorming assistant focused on {topic}. I can help you generate ideas, explore concepts, and overcome creative blocks."
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
if __name__ == "__main__":
|
|
126
|
+
# Run in stdio mode
|
|
127
|
+
app.run()
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
from mcp_agent.core.fastagent import FastAgent, PromptExitError
|
|
5
|
+
|
|
6
|
+
fast_agent = FastAgent(
|
|
7
|
+
name="MCP Filtering Demo",
|
|
8
|
+
parse_cli_args=False,
|
|
9
|
+
quiet=False
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
@fast_agent.agent(
|
|
13
|
+
name="filtered_agent",
|
|
14
|
+
model="gpt-4o-mini",
|
|
15
|
+
instruction="You are a creative writer with filtered access to tools, resources, and prompts.",
|
|
16
|
+
servers=["creativity"],
|
|
17
|
+
# Tool filtering: only string manipulation tools and coding tools
|
|
18
|
+
tools={"creativity": ["reverse_string", "capitalize_string", "coding_*"]},
|
|
19
|
+
# Resource filtering: only writing resources (not coding resources)
|
|
20
|
+
resources={"creativity": ["resource://writing/*"]},
|
|
21
|
+
# Prompt filtering: only writing prompts (not coding prompts)
|
|
22
|
+
prompts={"creativity": ["writing_*"]}
|
|
23
|
+
)
|
|
24
|
+
async def filtered_agent():
|
|
25
|
+
return "Filtered agent ready"
|
|
26
|
+
|
|
27
|
+
@fast_agent.agent(
|
|
28
|
+
name="unfiltered_agent",
|
|
29
|
+
model="gpt-4o-mini",
|
|
30
|
+
instruction="You are a creative writer with access to all tools, resources, and prompts.",
|
|
31
|
+
servers=["creativity"]
|
|
32
|
+
# No filtering - gets everything
|
|
33
|
+
)
|
|
34
|
+
async def unfiltered_agent():
|
|
35
|
+
return "Unfiltered agent ready"
|
|
36
|
+
|
|
37
|
+
async def main():
|
|
38
|
+
try:
|
|
39
|
+
async with fast_agent.run() as agent:
|
|
40
|
+
try:
|
|
41
|
+
print("🎯 MCP Filtering Demo")
|
|
42
|
+
print("=" * 50)
|
|
43
|
+
|
|
44
|
+
# Show filtered agent capabilities
|
|
45
|
+
print("\n📦 FILTERED AGENT:")
|
|
46
|
+
filtered = agent._agent("filtered_agent")
|
|
47
|
+
|
|
48
|
+
tools = await filtered.list_tools()
|
|
49
|
+
print(f"✅ Available tools ({len(tools.tools)}): {[tool.name for tool in tools.tools]}")
|
|
50
|
+
|
|
51
|
+
resources = await filtered.list_resources()
|
|
52
|
+
resource_list = resources.get("creativity", [])
|
|
53
|
+
print(f"📚 Available resources ({len(resource_list)}): {resource_list}")
|
|
54
|
+
|
|
55
|
+
prompts = await filtered.list_prompts()
|
|
56
|
+
prompt_list = prompts.get("creativity", [])
|
|
57
|
+
prompt_names = [p.name for p in prompt_list]
|
|
58
|
+
print(f"💬 Available prompts ({len(prompt_names)}): {prompt_names}")
|
|
59
|
+
|
|
60
|
+
# Show unfiltered agent capabilities
|
|
61
|
+
print("\n🌐 UNFILTERED AGENT:")
|
|
62
|
+
unfiltered = agent._agent("unfiltered_agent")
|
|
63
|
+
|
|
64
|
+
tools = await unfiltered.list_tools()
|
|
65
|
+
print(f"✅ Available tools ({len(tools.tools)}): {[tool.name for tool in tools.tools]}")
|
|
66
|
+
|
|
67
|
+
resources = await unfiltered.list_resources()
|
|
68
|
+
resource_list = resources.get("creativity", [])
|
|
69
|
+
print(f"📚 Available resources ({len(resource_list)}): {resource_list}")
|
|
70
|
+
|
|
71
|
+
prompts = await unfiltered.list_prompts()
|
|
72
|
+
prompt_list = prompts.get("creativity", [])
|
|
73
|
+
prompt_names = [p.name for p in prompt_list]
|
|
74
|
+
print(f"💬 Available prompts ({len(prompt_names)}): {prompt_names}")
|
|
75
|
+
|
|
76
|
+
print("\n" + "=" * 50)
|
|
77
|
+
print("🚀 Starting interactive session with filtered agent...")
|
|
78
|
+
print("Type 'exit' to quit")
|
|
79
|
+
|
|
80
|
+
await agent.interactive(agent_name="filtered_agent")
|
|
81
|
+
|
|
82
|
+
except PromptExitError:
|
|
83
|
+
print("👋 Goodbye!")
|
|
84
|
+
|
|
85
|
+
except KeyboardInterrupt:
|
|
86
|
+
print("\nExiting...")
|
|
87
|
+
sys.exit(0)
|
|
88
|
+
except Exception as e:
|
|
89
|
+
print(f"Error: {e}")
|
|
90
|
+
import traceback
|
|
91
|
+
traceback.print_exc()
|
|
92
|
+
sys.exit(1)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
if __name__ == "__main__":
|
|
96
|
+
asyncio.run(main())
|
{fast_agent_mcp-0.2.40/src/mcp_agent/resources → fast_agent_mcp-0.2.42}/examples/workflows/router.py
RENAMED
|
@@ -7,6 +7,8 @@ Demonstrates router's ability to either:
|
|
|
7
7
|
|
|
8
8
|
import asyncio
|
|
9
9
|
|
|
10
|
+
from rich.console import Console
|
|
11
|
+
|
|
10
12
|
from mcp_agent.core.fastagent import FastAgent
|
|
11
13
|
|
|
12
14
|
# Create the application
|
|
@@ -45,7 +47,14 @@ SAMPLE_REQUESTS = [
|
|
|
45
47
|
agents=["code_expert", "general_assistant", "fetcher"],
|
|
46
48
|
)
|
|
47
49
|
async def main() -> None:
|
|
50
|
+
console = Console()
|
|
51
|
+
console.print(
|
|
52
|
+
"\n[bright_red]Router Workflow Demo[/bright_red]\n\n"
|
|
53
|
+
"Enter a request to route it to the appropriate agent.\nEnter [bright_red]STOP[/bright_red] to run the demo, [bright_red]EXIT[/bright_red] to leave"
|
|
54
|
+
)
|
|
55
|
+
|
|
48
56
|
async with fast.run() as agent:
|
|
57
|
+
await agent.interactive(agent_name="route")
|
|
49
58
|
for request in SAMPLE_REQUESTS:
|
|
50
59
|
await agent.route(request)
|
|
51
60
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "fast-agent-mcp"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.42"
|
|
4
4
|
description = "Define, Prompt and Test MCP enabled Agents and Workflows"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -26,6 +26,7 @@ dependencies = [
|
|
|
26
26
|
"anthropic>=0.55.0",
|
|
27
27
|
"openai>=1.93.0",
|
|
28
28
|
"azure-identity>=1.14.0",
|
|
29
|
+
"boto3>=1.35.0",
|
|
29
30
|
"prompt-toolkit>=3.0.50",
|
|
30
31
|
"aiohttp>=3.11.13",
|
|
31
32
|
"opentelemetry-instrumentation-openai>=0.40.14; python_version >= '3.10' and python_version < '4.0'",
|
|
@@ -108,8 +109,8 @@ dev = [
|
|
|
108
109
|
]
|
|
109
110
|
|
|
110
111
|
[project.scripts]
|
|
111
|
-
fast-agent = "mcp_agent.cli.__main__:
|
|
112
|
-
fast-agent-mcp = "mcp_agent.cli.__main__:
|
|
112
|
+
fast-agent = "mcp_agent.cli.__main__:main"
|
|
113
|
+
fast-agent-mcp = "mcp_agent.cli.__main__:main"
|
|
113
114
|
fastagent = "mcp_agent.cli.__main__:app"
|
|
114
115
|
silsila = "mcp_agent.cli.__main__:app"
|
|
115
116
|
prompt-server = "mcp_agent.mcp.prompts.__main__:main"
|
|
@@ -6,6 +6,7 @@ and delegates operations to an attached AugmentedLLMProtocol instance.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import asyncio
|
|
9
|
+
import fnmatch
|
|
9
10
|
import uuid
|
|
10
11
|
from typing import (
|
|
11
12
|
TYPE_CHECKING,
|
|
@@ -13,6 +14,7 @@ from typing import (
|
|
|
13
14
|
Callable,
|
|
14
15
|
Dict,
|
|
15
16
|
List,
|
|
17
|
+
Mapping,
|
|
16
18
|
Optional,
|
|
17
19
|
Tuple,
|
|
18
20
|
Type,
|
|
@@ -325,9 +327,29 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
|
325
327
|
self.logger.debug("Received human input signal", data=result)
|
|
326
328
|
return result
|
|
327
329
|
|
|
330
|
+
def _matches_pattern(self, name: str, pattern: str, server_name: str) -> bool:
|
|
331
|
+
"""
|
|
332
|
+
Check if a name matches a pattern for a specific server.
|
|
333
|
+
|
|
334
|
+
Args:
|
|
335
|
+
name: The name to match (could be tool name, resource URI, or prompt name)
|
|
336
|
+
pattern: The pattern to match against (e.g., "add", "math*", "resource://math/*")
|
|
337
|
+
server_name: The server name (used for tool name prefixing)
|
|
338
|
+
|
|
339
|
+
Returns:
|
|
340
|
+
True if the name matches the pattern
|
|
341
|
+
"""
|
|
342
|
+
# For tools, build the full pattern with server prefix: server_name-pattern
|
|
343
|
+
if name.startswith(f"{server_name}-"):
|
|
344
|
+
full_pattern = f"{server_name}-{pattern}"
|
|
345
|
+
return fnmatch.fnmatch(name, full_pattern)
|
|
346
|
+
|
|
347
|
+
# For resources and prompts, match directly against the pattern
|
|
348
|
+
return fnmatch.fnmatch(name, pattern)
|
|
349
|
+
|
|
328
350
|
async def list_tools(self) -> ListToolsResult:
|
|
329
351
|
"""
|
|
330
|
-
List all tools available to this agent.
|
|
352
|
+
List all tools available to this agent, filtered by configuration.
|
|
331
353
|
|
|
332
354
|
Returns:
|
|
333
355
|
ListToolsResult with available tools
|
|
@@ -335,8 +357,26 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
|
335
357
|
if not self.initialized:
|
|
336
358
|
await self.initialize()
|
|
337
359
|
|
|
360
|
+
# Get all tools from the parent class
|
|
338
361
|
result = await super().list_tools()
|
|
339
362
|
|
|
363
|
+
# Apply filtering if tools are specified in config
|
|
364
|
+
if self.config.tools is not None:
|
|
365
|
+
filtered_tools = []
|
|
366
|
+
for tool in result.tools:
|
|
367
|
+
# Extract server name from tool name (e.g., "mathematics-add" -> "mathematics")
|
|
368
|
+
if '-' in tool.name:
|
|
369
|
+
server_name = tool.name.split('-', 1)[0]
|
|
370
|
+
|
|
371
|
+
# Check if this server has tool filters
|
|
372
|
+
if server_name in self.config.tools:
|
|
373
|
+
# Check if tool matches any pattern for this server
|
|
374
|
+
for pattern in self.config.tools[server_name]:
|
|
375
|
+
if self._matches_pattern(tool.name, pattern, server_name):
|
|
376
|
+
filtered_tools.append(tool)
|
|
377
|
+
break
|
|
378
|
+
result.tools = filtered_tools
|
|
379
|
+
|
|
340
380
|
if not self.human_input_callback:
|
|
341
381
|
return result
|
|
342
382
|
|
|
@@ -635,6 +675,76 @@ class BaseAgent(MCPAggregator, AgentProtocol):
|
|
|
635
675
|
response = await self.generate(prompts, request_params)
|
|
636
676
|
return response.first_text()
|
|
637
677
|
|
|
678
|
+
async def list_prompts(self, server_name: str | None = None) -> Mapping[str, List[Prompt]]:
|
|
679
|
+
"""
|
|
680
|
+
List all prompts available to this agent, filtered by configuration.
|
|
681
|
+
|
|
682
|
+
Args:
|
|
683
|
+
server_name: Optional server name to list prompts from
|
|
684
|
+
|
|
685
|
+
Returns:
|
|
686
|
+
Dictionary mapping server names to lists of Prompt objects
|
|
687
|
+
"""
|
|
688
|
+
if not self.initialized:
|
|
689
|
+
await self.initialize()
|
|
690
|
+
|
|
691
|
+
# Get all prompts from the parent class
|
|
692
|
+
result = await super().list_prompts(server_name)
|
|
693
|
+
|
|
694
|
+
# Apply filtering if prompts are specified in config
|
|
695
|
+
if self.config.prompts is not None:
|
|
696
|
+
filtered_result = {}
|
|
697
|
+
for server, prompts in result.items():
|
|
698
|
+
# Check if this server has prompt filters
|
|
699
|
+
if server in self.config.prompts:
|
|
700
|
+
filtered_prompts = []
|
|
701
|
+
for prompt in prompts:
|
|
702
|
+
# Check if prompt matches any pattern for this server
|
|
703
|
+
for pattern in self.config.prompts[server]:
|
|
704
|
+
if self._matches_pattern(prompt.name, pattern, server):
|
|
705
|
+
filtered_prompts.append(prompt)
|
|
706
|
+
break
|
|
707
|
+
if filtered_prompts:
|
|
708
|
+
filtered_result[server] = filtered_prompts
|
|
709
|
+
result = filtered_result
|
|
710
|
+
|
|
711
|
+
return result
|
|
712
|
+
|
|
713
|
+
async def list_resources(self, server_name: str | None = None) -> Dict[str, List[str]]:
|
|
714
|
+
"""
|
|
715
|
+
List all resources available to this agent, filtered by configuration.
|
|
716
|
+
|
|
717
|
+
Args:
|
|
718
|
+
server_name: Optional server name to list resources from
|
|
719
|
+
|
|
720
|
+
Returns:
|
|
721
|
+
Dictionary mapping server names to lists of resource URIs
|
|
722
|
+
"""
|
|
723
|
+
if not self.initialized:
|
|
724
|
+
await self.initialize()
|
|
725
|
+
|
|
726
|
+
# Get all resources from the parent class
|
|
727
|
+
result = await super().list_resources(server_name)
|
|
728
|
+
|
|
729
|
+
# Apply filtering if resources are specified in config
|
|
730
|
+
if self.config.resources is not None:
|
|
731
|
+
filtered_result = {}
|
|
732
|
+
for server, resources in result.items():
|
|
733
|
+
# Check if this server has resource filters
|
|
734
|
+
if server in self.config.resources:
|
|
735
|
+
filtered_resources = []
|
|
736
|
+
for resource in resources:
|
|
737
|
+
# Check if resource matches any pattern for this server
|
|
738
|
+
for pattern in self.config.resources[server]:
|
|
739
|
+
if self._matches_pattern(resource, pattern, server):
|
|
740
|
+
filtered_resources.append(resource)
|
|
741
|
+
break
|
|
742
|
+
if filtered_resources:
|
|
743
|
+
filtered_result[server] = filtered_resources
|
|
744
|
+
result = filtered_result
|
|
745
|
+
|
|
746
|
+
return result
|
|
747
|
+
|
|
638
748
|
@property
|
|
639
749
|
def agent_type(self) -> AgentType:
|
|
640
750
|
"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from mcp_agent.cli.constants import GO_SPECIFIC_OPTIONS, KNOWN_SUBCOMMANDS
|
|
4
|
+
from mcp_agent.cli.main import app
|
|
5
|
+
|
|
6
|
+
# if the arguments would work with "go" we'll just route to it
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def main():
|
|
10
|
+
"""Main entry point that handles auto-routing to 'go' command."""
|
|
11
|
+
# Check if we should auto-route to 'go'
|
|
12
|
+
if len(sys.argv) > 1:
|
|
13
|
+
# Check if first arg is not already a subcommand
|
|
14
|
+
first_arg = sys.argv[1]
|
|
15
|
+
|
|
16
|
+
if first_arg not in KNOWN_SUBCOMMANDS and any(
|
|
17
|
+
arg in sys.argv or any(arg.startswith(opt + "=") for opt in GO_SPECIFIC_OPTIONS)
|
|
18
|
+
for arg in sys.argv
|
|
19
|
+
):
|
|
20
|
+
# Find where to insert 'go' - before the first go-specific option
|
|
21
|
+
insert_pos = 1
|
|
22
|
+
for i, arg in enumerate(sys.argv[1:], 1):
|
|
23
|
+
if arg in GO_SPECIFIC_OPTIONS or any(arg.startswith(opt + "=") for opt in GO_SPECIFIC_OPTIONS):
|
|
24
|
+
insert_pos = i
|
|
25
|
+
break
|
|
26
|
+
# Auto-route to go command
|
|
27
|
+
sys.argv.insert(insert_pos, "go")
|
|
28
|
+
|
|
29
|
+
app()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
main()
|