fast-agent-mcp 0.2.30__tar.gz → 0.2.31__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.
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/PKG-INFO +3 -3
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/README.md +1 -1
- fast_agent_mcp-0.2.31/examples/custom-agents/agent.py +25 -0
- fast_agent_mcp-0.2.31/examples/custom-agents/fastagent.config.yaml +24 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/pyproject.toml +2 -2
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/agent_app.py +20 -9
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/agent_types.py +2 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/direct_decorators.py +73 -5
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/direct_factory.py +30 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/fastagent.py +4 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/model_factory.py +1 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_google_native.py +26 -9
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/.gitignore +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/LICENSE +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/azure-openai/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/vision-examples/example1.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/vision-examples/example2.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/vision-examples/example3.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/otel/agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/otel/agent2.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/otel/docker-compose.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/otel/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/tensorzero/agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/tensorzero/image_demo.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/tensorzero/simple_agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/base_agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/chain_agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/evaluator_optimizer.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/orchestrator_agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/orchestrator_models.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/orchestrator_prompts.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/parallel_agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/router_agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/app.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/__main__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/commands/check_config.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/commands/go.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/commands/quickstart.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/commands/setup.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/commands/url_parser.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/main.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/cli/terminal.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/config.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/console.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/context.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/context_dependent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/enhanced_prompt.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/error_handling.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/exceptions.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/interactive_prompt.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/mcp_content.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/prompt.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/request_params.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/core/validation.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/event_progress.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/executor/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/executor/executor.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/executor/task_registry.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/executor/workflow_signal.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/human_input/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/human_input/handler.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/human_input/types.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/augmented_llm.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/augmented_llm_passthrough.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/augmented_llm_playback.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/augmented_llm_slow.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/memory.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/prompt_utils.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/provider_key_manager.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/provider_types.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/anthropic_utils.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_aliyun.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_anthropic.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_azure.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_deepseek.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_generic.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_google_oai.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_openai.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_openrouter.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/augmented_llm_tensorzero.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/google_converter.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/multipart_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/multipart_converter_openai.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/multipart_converter_tensorzero.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/openai_multipart.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/openai_utils.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/sampling_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/providers/sampling_converter_openai.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/sampling_converter.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/llm/sampling_format_converter.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/logging/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/logging/events.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/logging/json_serializer.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/logging/listeners.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/logging/logger.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/logging/rich_progress.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/logging/transport.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/common.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/gen_client.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/helpers/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/helpers/content_helpers.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/helpers/server_config_helpers.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/hf_auth.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/interfaces.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/logger_textio.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/mcp_agent_client_session.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/mcp_aggregator.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/mcp_connection_manager.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/mime_utils.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompt_message_multipart.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompt_render.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompt_serialization.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompts/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompts/__main__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompts/prompt_constants.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompts/prompt_helpers.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompts/prompt_load.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompts/prompt_server.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/prompts/prompt_template.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/resource_utils.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp/sampling.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp_server/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp_server/agent_server.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/mcp_server_registry.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/progress_display.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/in_dev/agent_build.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/in_dev/css-LICENSE.txt +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/in_dev/slides.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/history_transfer.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/job.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/prompt_category.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/prompt_sizing.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/simple.txt +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/sizer.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/internal/social.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/prompting/__init__.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/prompting/agent.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/prompting/delimited_prompt.txt +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/prompting/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/prompting/image_server.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/prompting/prompt1.txt +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/prompting/work_with_image.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/resources/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/tools/tool_definition.py +0 -0
- {fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/ui/console_display.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.31
|
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
|
@@ -216,7 +216,7 @@ Requires-Dist: azure-identity>=1.14.0
|
|
216
216
|
Requires-Dist: deprecated>=1.2.18
|
217
217
|
Requires-Dist: fastapi>=0.115.6
|
218
218
|
Requires-Dist: google-genai
|
219
|
-
Requires-Dist: mcp==1.9.
|
219
|
+
Requires-Dist: mcp==1.9.4
|
220
220
|
Requires-Dist: openai>=1.63.2
|
221
221
|
Requires-Dist: opentelemetry-distro>=0.50b0
|
222
222
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.29.0
|
@@ -599,7 +599,7 @@ agent["greeter"].send("Good Evening!") # Dictionary access is supported
|
|
599
599
|
use_history=False, # orchestrator doesn't maintain chat history (no effect).
|
600
600
|
human_input=False, # whether orchestrator can request human input
|
601
601
|
plan_type="full", # planning approach: "full" or "iterative"
|
602
|
-
|
602
|
+
plan_iterations=5, # maximum number of full plan attempts, or iterations
|
603
603
|
)
|
604
604
|
```
|
605
605
|
|
@@ -350,7 +350,7 @@ agent["greeter"].send("Good Evening!") # Dictionary access is supported
|
|
350
350
|
use_history=False, # orchestrator doesn't maintain chat history (no effect).
|
351
351
|
human_input=False, # whether orchestrator can request human input
|
352
352
|
plan_type="full", # planning approach: "full" or "iterative"
|
353
|
-
|
353
|
+
plan_iterations=5, # maximum number of full plan attempts, or iterations
|
354
354
|
)
|
355
355
|
```
|
356
356
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import asyncio
|
2
|
+
|
3
|
+
from mcp_agent.agents.base_agent import BaseAgent
|
4
|
+
from mcp_agent.core.fastagent import FastAgent
|
5
|
+
|
6
|
+
# Create the application
|
7
|
+
fast = FastAgent("fast-agent example")
|
8
|
+
|
9
|
+
|
10
|
+
class MyAgent(BaseAgent):
|
11
|
+
async def initialize(self):
|
12
|
+
await super().initialize()
|
13
|
+
print("it's a-me!...Mario!")
|
14
|
+
|
15
|
+
|
16
|
+
# Define the agent
|
17
|
+
@fast.custom(MyAgent, instruction="You are a helpful AI Agent")
|
18
|
+
async def main():
|
19
|
+
# use the --model command line switch or agent arguments to change model
|
20
|
+
async with fast.run() as agent:
|
21
|
+
await agent.interactive()
|
22
|
+
|
23
|
+
|
24
|
+
if __name__ == "__main__":
|
25
|
+
asyncio.run(main())
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Please edit this configuration file to match your environment (on Windows).
|
2
|
+
# Examples in comments below - check/change the paths.
|
3
|
+
#
|
4
|
+
#
|
5
|
+
|
6
|
+
execution_engine: asyncio
|
7
|
+
logger:
|
8
|
+
type: file
|
9
|
+
level: error
|
10
|
+
truncate_tools: true
|
11
|
+
|
12
|
+
mcp:
|
13
|
+
servers:
|
14
|
+
filesystem:
|
15
|
+
# On windows update the command and arguments to use `node` and the absolute path to the server.
|
16
|
+
# Use `npm i -g @modelcontextprotocol/server-filesystem` to install the server globally.
|
17
|
+
# Use `npm -g root` to find the global node_modules path.`
|
18
|
+
# command: "node"
|
19
|
+
# args: ["c:/Program Files/nodejs/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js","."]
|
20
|
+
command: "npx"
|
21
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
|
22
|
+
fetch:
|
23
|
+
command: "uvx"
|
24
|
+
args: ["mcp-server-fetch"]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "fast-agent-mcp"
|
3
|
-
version = "0.2.
|
3
|
+
version = "0.2.31"
|
4
4
|
description = "Define, Prompt and Test MCP enabled Agents and Workflows"
|
5
5
|
readme = "README.md"
|
6
6
|
license = { file = "LICENSE" }
|
@@ -15,7 +15,7 @@ classifiers = [
|
|
15
15
|
requires-python = ">=3.10"
|
16
16
|
dependencies = [
|
17
17
|
"fastapi>=0.115.6",
|
18
|
-
"mcp==1.9.
|
18
|
+
"mcp==1.9.4",
|
19
19
|
"opentelemetry-distro>=0.50b0",
|
20
20
|
"opentelemetry-exporter-otlp-proto-http>=1.29.0",
|
21
21
|
"pydantic-settings>=2.7.0",
|
@@ -69,7 +69,7 @@ class AgentApp:
|
|
69
69
|
if message:
|
70
70
|
return await self._agent(agent_name).send(message)
|
71
71
|
|
72
|
-
return await self.interactive(
|
72
|
+
return await self.interactive(agent_name=agent_name, default_prompt=default_prompt)
|
73
73
|
|
74
74
|
async def send(
|
75
75
|
self,
|
@@ -97,6 +97,10 @@ class AgentApp:
|
|
97
97
|
raise ValueError(f"Agent '{agent_name}' not found")
|
98
98
|
return self._agents[agent_name]
|
99
99
|
|
100
|
+
for agent in self._agents.values():
|
101
|
+
if agent.config.default:
|
102
|
+
return agent
|
103
|
+
|
100
104
|
return next(iter(self._agents.values()))
|
101
105
|
|
102
106
|
async def apply_prompt(
|
@@ -226,9 +230,9 @@ class AgentApp:
|
|
226
230
|
"""
|
227
231
|
Deprecated - use interactive() instead.
|
228
232
|
"""
|
229
|
-
return await self.interactive(
|
233
|
+
return await self.interactive(agent_name=agent_name, default_prompt=default_prompt)
|
230
234
|
|
231
|
-
async def interactive(self,
|
235
|
+
async def interactive(self, agent_name: str | None = None, default_prompt: str = "") -> str:
|
232
236
|
"""
|
233
237
|
Interactive prompt for sending messages with advanced features.
|
234
238
|
|
@@ -241,14 +245,21 @@ class AgentApp:
|
|
241
245
|
"""
|
242
246
|
|
243
247
|
# Get the default agent name if none specified
|
244
|
-
if
|
248
|
+
if agent_name:
|
245
249
|
# Validate that this agent exists
|
246
|
-
if
|
247
|
-
raise ValueError(f"Agent '{
|
248
|
-
target_name =
|
250
|
+
if agent_name not in self._agents:
|
251
|
+
raise ValueError(f"Agent '{agent_name}' not found")
|
252
|
+
target_name = agent_name
|
249
253
|
else:
|
250
|
-
|
251
|
-
|
254
|
+
target_name = None
|
255
|
+
for agent in self._agents.values():
|
256
|
+
if agent.config.default:
|
257
|
+
target_name = agent.config.name
|
258
|
+
break
|
259
|
+
|
260
|
+
if not target_name:
|
261
|
+
# Use the first agent's name as default
|
262
|
+
target_name = next(iter(self._agents.keys()))
|
252
263
|
|
253
264
|
# Don't delegate to the agent's own prompt method - use our implementation
|
254
265
|
# The agent's prompt method doesn't fully support switching between agents
|
@@ -15,6 +15,7 @@ class AgentType(Enum):
|
|
15
15
|
"""Enumeration of supported agent types."""
|
16
16
|
|
17
17
|
BASIC = "agent"
|
18
|
+
CUSTOM = "custom"
|
18
19
|
ORCHESTRATOR = "orchestrator"
|
19
20
|
PARALLEL = "parallel"
|
20
21
|
EVALUATOR_OPTIMIZER = "evaluator_optimizer"
|
@@ -33,6 +34,7 @@ class AgentConfig(BaseModel):
|
|
33
34
|
default_request_params: RequestParams | None = None
|
34
35
|
human_input: bool = False
|
35
36
|
agent_type: AgentType = AgentType.BASIC
|
37
|
+
default: bool = False
|
36
38
|
|
37
39
|
@model_validator(mode="after")
|
38
40
|
def ensure_default_request_params(self) -> "AgentConfig":
|
@@ -90,6 +90,7 @@ def _decorator_impl(
|
|
90
90
|
use_history: bool = True,
|
91
91
|
request_params: RequestParams | None = None,
|
92
92
|
human_input: bool = False,
|
93
|
+
default: bool = False,
|
93
94
|
**extra_kwargs,
|
94
95
|
) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
|
95
96
|
"""
|
@@ -104,6 +105,7 @@ def _decorator_impl(
|
|
104
105
|
use_history: Whether to maintain conversation history
|
105
106
|
request_params: Additional request parameters for the LLM
|
106
107
|
human_input: Whether to enable human input capabilities
|
108
|
+
default: Whether to mark this as the default agent
|
107
109
|
**extra_kwargs: Additional agent/workflow-specific parameters
|
108
110
|
"""
|
109
111
|
|
@@ -132,6 +134,7 @@ def _decorator_impl(
|
|
132
134
|
model=model,
|
133
135
|
use_history=use_history,
|
134
136
|
human_input=human_input,
|
137
|
+
default=default,
|
135
138
|
)
|
136
139
|
|
137
140
|
# Update request params if provided
|
@@ -174,6 +177,7 @@ def agent(
|
|
174
177
|
use_history: bool = True,
|
175
178
|
request_params: RequestParams | None = None,
|
176
179
|
human_input: bool = False,
|
180
|
+
default: bool = False,
|
177
181
|
) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
|
178
182
|
"""
|
179
183
|
Decorator to create and register a standard agent with type-safe signature.
|
@@ -187,6 +191,7 @@ def agent(
|
|
187
191
|
use_history: Whether to maintain conversation history
|
188
192
|
request_params: Additional request parameters for the LLM
|
189
193
|
human_input: Whether to enable human input capabilities
|
194
|
+
default: Whether to mark this as the default agent
|
190
195
|
|
191
196
|
Returns:
|
192
197
|
A decorator that registers the agent with proper type annotations
|
@@ -203,12 +208,60 @@ def agent(
|
|
203
208
|
use_history=use_history,
|
204
209
|
request_params=request_params,
|
205
210
|
human_input=human_input,
|
211
|
+
default=default,
|
212
|
+
)
|
213
|
+
|
214
|
+
|
215
|
+
def custom(
|
216
|
+
self,
|
217
|
+
cls,
|
218
|
+
name: str = "default",
|
219
|
+
instruction_or_kwarg: Optional[str] = None,
|
220
|
+
*,
|
221
|
+
instruction: str = "You are a helpful agent.",
|
222
|
+
servers: List[str] = [],
|
223
|
+
model: Optional[str] = None,
|
224
|
+
use_history: bool = True,
|
225
|
+
request_params: RequestParams | None = None,
|
226
|
+
human_input: bool = False,
|
227
|
+
default: bool = False,
|
228
|
+
) -> Callable[[AgentCallable[P, R]], DecoratedAgentProtocol[P, R]]:
|
229
|
+
"""
|
230
|
+
Decorator to create and register a standard agent with type-safe signature.
|
231
|
+
|
232
|
+
Args:
|
233
|
+
name: Name of the agent
|
234
|
+
instruction_or_kwarg: Optional positional parameter for instruction
|
235
|
+
instruction: Base instruction for the agent (keyword arg)
|
236
|
+
servers: List of server names the agent should connect to
|
237
|
+
model: Model specification string
|
238
|
+
use_history: Whether to maintain conversation history
|
239
|
+
request_params: Additional request parameters for the LLM
|
240
|
+
human_input: Whether to enable human input capabilities
|
241
|
+
|
242
|
+
Returns:
|
243
|
+
A decorator that registers the agent with proper type annotations
|
244
|
+
"""
|
245
|
+
final_instruction = instruction_or_kwarg if instruction_or_kwarg is not None else instruction
|
246
|
+
|
247
|
+
return _decorator_impl(
|
248
|
+
self,
|
249
|
+
AgentType.CUSTOM,
|
250
|
+
name=name,
|
251
|
+
instruction=final_instruction,
|
252
|
+
servers=servers,
|
253
|
+
model=model,
|
254
|
+
use_history=use_history,
|
255
|
+
request_params=request_params,
|
256
|
+
human_input=human_input,
|
257
|
+
agent_class=cls,
|
258
|
+
default=default,
|
206
259
|
)
|
207
260
|
|
208
261
|
|
209
262
|
DEFAULT_INSTRUCTION_ORCHESTRATOR = """
|
210
|
-
You are an expert planner. Given an objective task and a list of Agents
|
211
|
-
(which are collections of capabilities), your job is to break down the objective
|
263
|
+
You are an expert planner. Given an objective task and a list of Agents
|
264
|
+
(which are collections of capabilities), your job is to break down the objective
|
212
265
|
into a series of steps, which can be performed by these agents.
|
213
266
|
"""
|
214
267
|
|
@@ -225,6 +278,7 @@ def orchestrator(
|
|
225
278
|
human_input: bool = False,
|
226
279
|
plan_type: Literal["full", "iterative"] = "full",
|
227
280
|
plan_iterations: int = 5,
|
281
|
+
default: bool = False,
|
228
282
|
) -> Callable[[AgentCallable[P, R]], DecoratedOrchestratorProtocol[P, R]]:
|
229
283
|
"""
|
230
284
|
Decorator to create and register an orchestrator agent with type-safe signature.
|
@@ -238,13 +292,14 @@ def orchestrator(
|
|
238
292
|
request_params: Additional request parameters for the LLM
|
239
293
|
human_input: Whether to enable human input capabilities
|
240
294
|
plan_type: Planning approach - "full" or "iterative"
|
241
|
-
|
295
|
+
plan_iterations: Maximum number of planning iterations
|
296
|
+
default: Whether to mark this as the default agent
|
242
297
|
|
243
298
|
Returns:
|
244
299
|
A decorator that registers the orchestrator with proper type annotations
|
245
300
|
"""
|
246
301
|
|
247
|
-
# Create final request params with
|
302
|
+
# Create final request params with plan_iterations
|
248
303
|
|
249
304
|
return cast(
|
250
305
|
"Callable[[AgentCallable[P, R]], DecoratedOrchestratorProtocol[P, R]]",
|
@@ -261,6 +316,7 @@ def orchestrator(
|
|
261
316
|
child_agents=agents,
|
262
317
|
plan_type=plan_type,
|
263
318
|
plan_iterations=plan_iterations,
|
319
|
+
default=default,
|
264
320
|
),
|
265
321
|
)
|
266
322
|
|
@@ -276,6 +332,7 @@ def router(
|
|
276
332
|
use_history: bool = False,
|
277
333
|
request_params: RequestParams | None = None,
|
278
334
|
human_input: bool = False,
|
335
|
+
default: bool = False,
|
279
336
|
) -> Callable[[AgentCallable[P, R]], DecoratedRouterProtocol[P, R]]:
|
280
337
|
"""
|
281
338
|
Decorator to create and register a router agent with type-safe signature.
|
@@ -288,6 +345,7 @@ def router(
|
|
288
345
|
use_history: Whether to maintain conversation history
|
289
346
|
request_params: Additional request parameters for the LLM
|
290
347
|
human_input: Whether to enable human input capabilities
|
348
|
+
default: Whether to mark this as the default agent
|
291
349
|
|
292
350
|
Returns:
|
293
351
|
A decorator that registers the router with proper type annotations
|
@@ -309,6 +367,7 @@ def router(
|
|
309
367
|
use_history=use_history,
|
310
368
|
request_params=request_params,
|
311
369
|
human_input=human_input,
|
370
|
+
default=default,
|
312
371
|
router_agents=agents,
|
313
372
|
),
|
314
373
|
)
|
@@ -321,6 +380,7 @@ def chain(
|
|
321
380
|
sequence: List[str],
|
322
381
|
instruction: Optional[str] = None,
|
323
382
|
cumulative: bool = False,
|
383
|
+
default: bool = False,
|
324
384
|
) -> Callable[[AgentCallable[P, R]], DecoratedChainProtocol[P, R]]:
|
325
385
|
"""
|
326
386
|
Decorator to create and register a chain agent with type-safe signature.
|
@@ -330,6 +390,7 @@ def chain(
|
|
330
390
|
sequence: List of agent names in the chain, executed in sequence
|
331
391
|
instruction: Base instruction for the chain
|
332
392
|
cumulative: Whether to use cumulative mode (each agent sees all previous responses)
|
393
|
+
default: Whether to mark this as the default agent
|
333
394
|
|
334
395
|
Returns:
|
335
396
|
A decorator that registers the chain with proper type annotations
|
@@ -354,6 +415,7 @@ def chain(
|
|
354
415
|
instruction=instruction or default_instruction,
|
355
416
|
sequence=sequence,
|
356
417
|
cumulative=cumulative,
|
418
|
+
default=default,
|
357
419
|
),
|
358
420
|
)
|
359
421
|
|
@@ -366,6 +428,7 @@ def parallel(
|
|
366
428
|
fan_in: str | None = None,
|
367
429
|
instruction: Optional[str] = None,
|
368
430
|
include_request: bool = True,
|
431
|
+
default: bool = False,
|
369
432
|
) -> Callable[[AgentCallable[P, R]], DecoratedParallelProtocol[P, R]]:
|
370
433
|
"""
|
371
434
|
Decorator to create and register a parallel agent with type-safe signature.
|
@@ -376,12 +439,13 @@ def parallel(
|
|
376
439
|
fan_in: Agent to aggregate results
|
377
440
|
instruction: Base instruction for the parallel agent
|
378
441
|
include_request: Whether to include the original request when aggregating
|
442
|
+
default: Whether to mark this as the default agent
|
379
443
|
|
380
444
|
Returns:
|
381
445
|
A decorator that registers the parallel agent with proper type annotations
|
382
446
|
"""
|
383
447
|
default_instruction = """
|
384
|
-
You are a parallel processor that executes multiple agents simultaneously
|
448
|
+
You are a parallel processor that executes multiple agents simultaneously
|
385
449
|
and aggregates their results.
|
386
450
|
"""
|
387
451
|
|
@@ -396,6 +460,7 @@ def parallel(
|
|
396
460
|
fan_in=fan_in,
|
397
461
|
fan_out=fan_out,
|
398
462
|
include_request=include_request,
|
463
|
+
default=default,
|
399
464
|
),
|
400
465
|
)
|
401
466
|
|
@@ -409,6 +474,7 @@ def evaluator_optimizer(
|
|
409
474
|
instruction: Optional[str] = None,
|
410
475
|
min_rating: str = "GOOD",
|
411
476
|
max_refinements: int = 3,
|
477
|
+
default: bool = False,
|
412
478
|
) -> Callable[[AgentCallable[P, R]], DecoratedEvaluatorOptimizerProtocol[P, R]]:
|
413
479
|
"""
|
414
480
|
Decorator to create and register an evaluator-optimizer agent with type-safe signature.
|
@@ -420,6 +486,7 @@ def evaluator_optimizer(
|
|
420
486
|
instruction: Base instruction for the evaluator-optimizer
|
421
487
|
min_rating: Minimum acceptable quality rating (EXCELLENT, GOOD, FAIR, POOR)
|
422
488
|
max_refinements: Maximum number of refinement iterations
|
489
|
+
default: Whether to mark this as the default agent
|
423
490
|
|
424
491
|
Returns:
|
425
492
|
A decorator that registers the evaluator-optimizer with proper type annotations
|
@@ -442,5 +509,6 @@ def evaluator_optimizer(
|
|
442
509
|
evaluator=evaluator,
|
443
510
|
min_rating=min_rating,
|
444
511
|
max_refinements=max_refinements,
|
512
|
+
default=default,
|
445
513
|
),
|
446
514
|
)
|
@@ -153,6 +153,21 @@ async def create_agents_by_type(
|
|
153
153
|
await agent.attach_llm(llm_factory, request_params=config.default_request_params)
|
154
154
|
result_agents[name] = agent
|
155
155
|
|
156
|
+
elif agent_type == AgentType.CUSTOM:
|
157
|
+
# Get the class to instantiate
|
158
|
+
cls = agent_data["agent_class"]
|
159
|
+
# Create the custom agent
|
160
|
+
agent = cls(
|
161
|
+
config=config,
|
162
|
+
context=app_instance.context,
|
163
|
+
)
|
164
|
+
await agent.initialize()
|
165
|
+
|
166
|
+
# Attach LLM to the agent
|
167
|
+
llm_factory = model_factory_func(model=config.model)
|
168
|
+
await agent.attach_llm(llm_factory, request_params=config.default_request_params)
|
169
|
+
result_agents[name] = agent
|
170
|
+
|
156
171
|
elif agent_type == AgentType.ORCHESTRATOR:
|
157
172
|
# Get base params configured with model settings
|
158
173
|
base_params = (
|
@@ -356,6 +371,21 @@ async def create_agents_in_dependency_order(
|
|
356
371
|
)
|
357
372
|
active_agents.update(basic_agents)
|
358
373
|
|
374
|
+
# Create custom agents first
|
375
|
+
if AgentType.CUSTOM.value in [agents_dict[name]["type"] for name in group]:
|
376
|
+
basic_agents = await create_agents_by_type(
|
377
|
+
app_instance,
|
378
|
+
{
|
379
|
+
name: agents_dict[name]
|
380
|
+
for name in group
|
381
|
+
if agents_dict[name]["type"] == AgentType.CUSTOM.value
|
382
|
+
},
|
383
|
+
AgentType.CUSTOM,
|
384
|
+
active_agents,
|
385
|
+
model_factory_func,
|
386
|
+
)
|
387
|
+
active_agents.update(basic_agents)
|
388
|
+
|
359
389
|
# Create parallel agents
|
360
390
|
if AgentType.PARALLEL.value in [agents_dict[name]["type"] for name in group]:
|
361
391
|
parallel_agents = await create_agents_by_type(
|
@@ -25,6 +25,9 @@ from mcp_agent.core.direct_decorators import (
|
|
25
25
|
from mcp_agent.core.direct_decorators import (
|
26
26
|
chain as chain_decorator,
|
27
27
|
)
|
28
|
+
from mcp_agent.core.direct_decorators import (
|
29
|
+
custom as custom_decorator,
|
30
|
+
)
|
28
31
|
from mcp_agent.core.direct_decorators import (
|
29
32
|
evaluator_optimizer as evaluator_optimizer_decorator,
|
30
33
|
)
|
@@ -221,6 +224,7 @@ class FastAgent:
|
|
221
224
|
|
222
225
|
# Decorator methods with type-safe implementations
|
223
226
|
agent = agent_decorator
|
227
|
+
custom = custom_decorator
|
224
228
|
orchestrator = orchestrator_decorator
|
225
229
|
router = router_decorator
|
226
230
|
chain = chain_decorator
|
@@ -85,6 +85,7 @@ class ModelFactory:
|
|
85
85
|
"o1-mini": Provider.OPENAI,
|
86
86
|
"o1": Provider.OPENAI,
|
87
87
|
"o1-preview": Provider.OPENAI,
|
88
|
+
"o3": Provider.OPENAI,
|
88
89
|
"o3-mini": Provider.OPENAI,
|
89
90
|
"claude-3-haiku-20240307": Provider.ANTHROPIC,
|
90
91
|
"claude-3-5-haiku-20241022": Provider.ANTHROPIC,
|
@@ -29,15 +29,6 @@ from mcp_agent.mcp.prompt_message_multipart import PromptMessageMultipart
|
|
29
29
|
# Define default model and potentially other Google-specific defaults
|
30
30
|
DEFAULT_GOOGLE_MODEL = "gemini-2.0-flash"
|
31
31
|
|
32
|
-
# Suppress this warning for now
|
33
|
-
# TODO: Find out where we're passing null
|
34
|
-
# warnings.filterwarnings(
|
35
|
-
# "ignore",
|
36
|
-
# message="null is not a valid Type",
|
37
|
-
# category=UserWarning,
|
38
|
-
# module="google.genai._common",
|
39
|
-
# )
|
40
|
-
|
41
32
|
|
42
33
|
class GoogleNativeAugmentedLLM(AugmentedLLM[types.Content, types.Content]):
|
43
34
|
"""
|
@@ -55,6 +46,32 @@ class GoogleNativeAugmentedLLM(AugmentedLLM[types.Content, types.Content]):
|
|
55
46
|
"""
|
56
47
|
import json
|
57
48
|
|
49
|
+
# Check if the last message is from assistant
|
50
|
+
if multipart_messages and multipart_messages[-1].role == "assistant":
|
51
|
+
last_message = multipart_messages[-1]
|
52
|
+
|
53
|
+
# Extract text content from the assistant message
|
54
|
+
assistant_text = last_message.first_text()
|
55
|
+
|
56
|
+
if assistant_text:
|
57
|
+
try:
|
58
|
+
json_data = json.loads(assistant_text)
|
59
|
+
validated_model = model.model_validate(json_data)
|
60
|
+
|
61
|
+
# Update history with all messages including the assistant message
|
62
|
+
self.history.extend(multipart_messages, is_prompt=False)
|
63
|
+
|
64
|
+
# Return the validated model and the assistant message
|
65
|
+
return validated_model, last_message
|
66
|
+
|
67
|
+
except (json.JSONDecodeError, Exception) as e:
|
68
|
+
self.logger.warning(
|
69
|
+
f"Failed to parse assistant message as structured response: {e}"
|
70
|
+
)
|
71
|
+
# Return None and the assistant message on failure
|
72
|
+
self.history.extend(multipart_messages, is_prompt=False)
|
73
|
+
return None, last_message
|
74
|
+
|
58
75
|
# Prepare request params
|
59
76
|
request_params = self.get_request_params(request_params)
|
60
77
|
# Convert Pydantic model to schema dict for Gemini
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/data-analysis/fastagent.config.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/state-transfer/fastagent.config.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/mcp/vision-examples/fastagent.config.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/examples/tensorzero/mcp_server/mcp_server.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/chain_agent.py
RENAMED
File without changes
|
{fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/evaluator_optimizer.py
RENAMED
File without changes
|
{fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/orchestrator_agent.py
RENAMED
File without changes
|
{fast_agent_mcp-0.2.30 → fast_agent_mcp-0.2.31}/src/mcp_agent/agents/workflow/orchestrator_models.py
RENAMED
File without changes
|