fast-agent-mcp 0.3.11__tar.gz → 0.3.12__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.11 → fast_agent_mcp-0.3.12}/PKG-INFO +4 -4
- fast_agent_mcp-0.3.12/examples/new-api/fastagent.config.yaml +8 -0
- fast_agent_mcp-0.3.12/examples/new-api/simple_mcp.py +47 -0
- fast_agent_mcp-0.3.12/examples/tool-use-agent/agent.py +33 -0
- fast_agent_mcp-0.3.12/examples/tool-use-agent/fastagent.config.yaml +7 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/hatch_build.py +10 -10
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/pyproject.toml +4 -4
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/llm_decorator.py +7 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/tool_agent.py +2 -2
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/commands/quickstart.py +142 -129
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/direct_decorators.py +18 -26
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/fastagent.py +2 -1
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/interfaces.py +4 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/fastagent_llm.py +17 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/model_database.py +2 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/model_factory.py +4 -1
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompts/prompt_load.py +2 -3
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/enhanced_prompt.py +47 -16
- fast_agent_mcp-0.3.12/src/fast_agent/ui/history_display.py +555 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/interactive_prompt.py +44 -12
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/mcp_display.py +3 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/notification_tracker.py +62 -23
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/rich_progress.py +1 -1
- fast_agent_mcp-0.3.11/examples/new-api/simple_mcp.py +0 -27
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/.gitignore +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/LICENSE +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/README.md +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/a2a/agent_executor.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/a2a/server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/azure-openai/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/bedrock/fast-agent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/custom-agents/agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/custom-agents/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/fastapi/fastapi-advanced.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/fastapi/fastapi-simple.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/fastapi/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/fastapi/readme.md +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/forms_demo.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/game_character.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/elicitations/tool_call.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/mcp-filtering/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/mcp-filtering/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/mcp-filtering/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/mcp-filtering/test_mcp_filtering.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/vision-examples/cat.png +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/vision-examples/example1.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/vision-examples/example2.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/vision-examples/example3.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/mcp/vision-examples/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/new-api/display_check.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/new-api/simple_llm.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/new-api/simple_llm_advanced.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/openapi/agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/openapi/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/openapi/openapi_mcp_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/openapi/petstore.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/openapi/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/openapi/run-as-server.sh +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/otel/agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/otel/agent2.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/otel/docker-compose.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/otel/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/setup/.gitignore +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/setup/agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/setup/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/setup/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/setup/pyproject.toml.tmpl +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/.env.sample +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/Makefile +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/demo_images/clam.jpg +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/demo_images/crab.png +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/demo_images/shrimp.png +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/image_demo.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/mcp_server/Dockerfile +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/mcp_server/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/simple_agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/agent_types.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/llm_agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/mcp_agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/workflow/chain_agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/workflow/evaluator_optimizer.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/workflow/iterative_planner.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/workflow/orchestrator_models.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/workflow/orchestrator_prompts.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/workflow/parallel_agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/agents/workflow/router_agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/__main__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/commands/auth.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/commands/check_config.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/commands/go.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/commands/server_helpers.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/commands/setup.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/commands/url_parser.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/constants.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/main.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/cli/terminal.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/config.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/constants.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/context.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/context_dependent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/agent_app.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/core_app.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/direct_factory.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/error_handling.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/exceptions.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/executor/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/executor/executor.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/executor/task_registry.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/executor/workflow_signal.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/logging/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/logging/events.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/logging/json_serializer.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/logging/listeners.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/logging/logger.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/logging/transport.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/prompt.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/core/validation.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/event_progress.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/history/history_exporter.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/human_input/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/human_input/elicitation_handler.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/human_input/elicitation_state.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/human_input/form_fields.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/human_input/simple_form.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/human_input/types.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/internal/passthrough.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/internal/playback.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/internal/silent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/internal/slow.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/memory.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/model_info.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/prompt_utils.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/anthropic/anthropic_utils.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/anthropic/llm_anthropic.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/anthropic/multipart_converter_anthropic.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/bedrock/bedrock_utils.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/bedrock/llm_bedrock.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/google/google_converter.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/google/llm_google_native.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_aliyun.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_azure.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_deepseek.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_generic.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_google_oai.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_groq.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_openai.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_openrouter.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_tensorzero_openai.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/llm_xai.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/multipart_converter_openai.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/openai_multipart.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider/openai/openai_utils.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider_key_manager.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/provider_types.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/request_params.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/sampling_converter.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/llm/usage_tracking.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/common.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/elicitation_factory.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/elicitation_handlers.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/gen_client.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/helpers/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/helpers/content_helpers.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/helpers/server_config_helpers.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/hf_auth.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/interfaces.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/logger_textio.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/mcp_agent_client_session.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/mcp_aggregator.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/mcp_connection_manager.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/mcp_content.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/mime_utils.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/oauth_client.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompt.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompt_message_extended.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompt_render.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompt_serialization.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompts/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompts/__main__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompts/prompt_constants.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompts/prompt_helpers.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompts/prompt_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/prompts/prompt_template.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/resource_utils.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/sampling.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/server/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/server/agent_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/stdio_tracking_simple.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/streamable_http_tracking.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/transport_tracking.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/ui_agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp/ui_mixin.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/mcp_server_registry.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/py.typed +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/data-analysis/analysis-campaign.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/data-analysis/analysis.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/data-analysis/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/data-analysis/mount-point/WA_Fn-UseC_-HR-Employee-Attrition.csv +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_account_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_forms_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/elicitation_game_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/forms_demo.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/game_character.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/game_character_handler.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/elicitations/tool_call.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/state-transfer/agent_one.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/state-transfer/agent_two.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/state-transfer/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/mcp/state-transfer/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/researcher/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/researcher/researcher-eval.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/researcher/researcher-imp.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/researcher/researcher.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/.env.sample +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/Makefile +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/README.md +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/demo_images/clam.jpg +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/demo_images/crab.png +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/demo_images/shrimp.png +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/docker-compose.yml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/image_demo.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/mcp_server/.python-version +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/mcp_server/Dockerfile +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/mcp_server/entrypoint.sh +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/mcp_server/mcp_server.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/mcp_server/pyproject.toml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/simple_agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/system_schema.json +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/system_template.minijinja +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/tensorzero/tensorzero_config/tensorzero.toml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/chaining.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/evaluator.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/graded_report.md +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/human_input.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/orchestrator.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/parallel.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/router.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/short_story.md +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/examples/workflows/short_story.txt +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/setup/.gitignore +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/setup/agent.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/setup/fastagent.config.yaml +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/setup/fastagent.secrets.yaml.example +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/resources/setup/pyproject.toml.tmpl +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/tools/elicitation.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/types/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/types/llm_stop_reason.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/__init__.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/console.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/console_display.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/elicitation_form.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/elicitation_style.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/mcp_ui_utils.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/mermaid_utils.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/src/fast_agent/ui/progress_display.py +0 -0
- {fast_agent_mcp-0.3.11 → fast_agent_mcp-0.3.12}/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.12
|
|
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
|
|
@@ -211,7 +211,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
211
211
|
Requires-Python: >=3.13.5
|
|
212
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.69.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
|
|
@@ -219,8 +219,8 @@ Requires-Dist: email-validator>=2.2.0
|
|
|
219
219
|
Requires-Dist: fastapi>=0.115.6
|
|
220
220
|
Requires-Dist: google-genai>=1.33.0
|
|
221
221
|
Requires-Dist: keyring>=24.3.1
|
|
222
|
-
Requires-Dist: mcp==1.
|
|
223
|
-
Requires-Dist: openai>=1.
|
|
222
|
+
Requires-Dist: mcp==1.16.0
|
|
223
|
+
Requires-Dist: openai>=2.1.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,47 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Demonstration of changing MCP settings dynamically.
|
|
3
|
+
|
|
4
|
+
Technically applicable to any setting, but MCP I found to be the most difficult due to MCP Aggregation at the startup.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import asyncio
|
|
8
|
+
|
|
9
|
+
from fast_agent.agents.agent_types import AgentConfig
|
|
10
|
+
from fast_agent.agents.mcp_agent import McpAgent
|
|
11
|
+
from fast_agent.core.core_app import Core
|
|
12
|
+
from fast_agent.llm.model_factory import ModelFactory
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
async def main():
|
|
16
|
+
core: Core = Core()
|
|
17
|
+
await core.initialize()
|
|
18
|
+
|
|
19
|
+
# Create agent configuration
|
|
20
|
+
config = AgentConfig(
|
|
21
|
+
name="dynamic_bot",
|
|
22
|
+
model="gpt-4o-mini",
|
|
23
|
+
servers=[ # Do not forget to add the servers here
|
|
24
|
+
"fetch",
|
|
25
|
+
],
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
agent = McpAgent(
|
|
29
|
+
config,
|
|
30
|
+
connection_persistence=True,
|
|
31
|
+
context=core.context,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# Attach the LLM
|
|
35
|
+
await agent.attach_llm(ModelFactory.create_factory("gpt-4o-mini"))
|
|
36
|
+
await agent.initialize() # MCP Agents need to be initialized before use
|
|
37
|
+
|
|
38
|
+
# Test the agent
|
|
39
|
+
result = await agent.send(
|
|
40
|
+
"Tell me about fast-agent framework. Find info at https://fast-agent.ai/ and summarize it."
|
|
41
|
+
)
|
|
42
|
+
print(result)
|
|
43
|
+
await core.cleanup()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
if __name__ == "__main__":
|
|
47
|
+
asyncio.run(main())
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
from fast_agent import FastAgent
|
|
4
|
+
from fast_agent.agents.agent_types import AgentConfig
|
|
5
|
+
from fast_agent.agents.tool_agent import ToolAgent
|
|
6
|
+
from fast_agent.context import Context
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def get_video_call_transcript(video_id: str) -> str:
|
|
10
|
+
return "Assistant: Hi, how can I assist you today?\n\nCustomer: Hi, I wanted to ask you about last invoice I received..."
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CustomToolAgent(ToolAgent):
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
config: AgentConfig,
|
|
17
|
+
context: Context | None = None,
|
|
18
|
+
):
|
|
19
|
+
tools = [get_video_call_transcript]
|
|
20
|
+
super().__init__(config, tools, context)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
fast = FastAgent("Example Tool Use Application")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@fast.custom(CustomToolAgent)
|
|
27
|
+
async def main() -> None:
|
|
28
|
+
async with fast.run() as agent:
|
|
29
|
+
await agent.default.generate("What is the topic of the video call no.1234?")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
asyncio.run(main())
|
|
@@ -25,17 +25,17 @@ class CustomBuildHook(BuildHookInterface):
|
|
|
25
25
|
print("Fast-agent build: Cleared existing resources/setup directory")
|
|
26
26
|
|
|
27
27
|
# Define source to target mappings
|
|
28
|
+
# Examples:
|
|
29
|
+
# examples/workflows -> src/fast_agent/resources/examples/workflows
|
|
30
|
+
# examples/mcp/elicitations -> src/fast_agent/resources/examples/mcp/elicitations
|
|
31
|
+
EXAMPLES_DIR = Path("src") / "fast_agent" / "resources" / "examples"
|
|
28
32
|
example_mappings = {
|
|
29
|
-
|
|
30
|
-
"examples/
|
|
31
|
-
|
|
32
|
-
"examples/
|
|
33
|
-
|
|
34
|
-
"examples/
|
|
35
|
-
# examples/mcp/state-transfer -> src/fast_agent/resources/examples/mcp/state-transfer
|
|
36
|
-
"examples/mcp/state-transfer": "src/fast_agent/resources/examples/mcp/state-transfer",
|
|
37
|
-
"examples/mcp/elicitations": "src/fast_agent/resources/examples/mcp/elicitations",
|
|
38
|
-
"examples/tensorzero": "src/fast_agent/resources/examples/tensorzero",
|
|
33
|
+
"examples/workflows": EXAMPLES_DIR / "workflows",
|
|
34
|
+
"examples/researcher": EXAMPLES_DIR / "researcher",
|
|
35
|
+
"examples/data-analysis": EXAMPLES_DIR / "data-analysis",
|
|
36
|
+
"examples/mcp/state-transfer": EXAMPLES_DIR / "mcp" / "state-transfer",
|
|
37
|
+
"examples/mcp/elicitations": EXAMPLES_DIR / "mcp" / "elicitations",
|
|
38
|
+
"examples/tensorzero": EXAMPLES_DIR / "tensorzero",
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
# Define setup template mapping (editable templates -> packaged resources)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "fast-agent-mcp"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.12"
|
|
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.13.5"
|
|
16
16
|
dependencies = [
|
|
17
17
|
"fastapi>=0.115.6",
|
|
18
|
-
"mcp==1.
|
|
18
|
+
"mcp==1.16.0",
|
|
19
19
|
"opentelemetry-distro>=0.55b0",
|
|
20
20
|
"opentelemetry-exporter-otlp-proto-http>=1.7.0",
|
|
21
21
|
"pydantic-settings>=2.7.0",
|
|
@@ -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.69.0",
|
|
27
|
+
"openai>=2.1.0",
|
|
28
28
|
"azure-identity>=1.14.0",
|
|
29
29
|
"boto3>=1.35.0",
|
|
30
30
|
"prompt-toolkit>=3.0.52",
|
|
@@ -314,6 +314,13 @@ class LlmDecorator(AgentProtocol):
|
|
|
314
314
|
# Otherwise treat the string as plain content (ignore arguments here)
|
|
315
315
|
return await self.send(prompt)
|
|
316
316
|
|
|
317
|
+
def clear(self, *, clear_prompts: bool = False) -> None:
|
|
318
|
+
"""Reset conversation state while optionally retaining applied prompt templates."""
|
|
319
|
+
|
|
320
|
+
if not self._llm:
|
|
321
|
+
return
|
|
322
|
+
self._llm.clear(clear_prompts=clear_prompts)
|
|
323
|
+
|
|
317
324
|
async def structured(
|
|
318
325
|
self,
|
|
319
326
|
messages: Union[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any, Callable, Dict, List
|
|
1
|
+
from typing import Any, Callable, Dict, List, Sequence
|
|
2
2
|
|
|
3
3
|
from mcp.server.fastmcp.tools.base import Tool as FastMCPTool
|
|
4
4
|
from mcp.types import CallToolResult, ListToolsResult, Tool
|
|
@@ -35,7 +35,7 @@ class ToolAgent(LlmAgent):
|
|
|
35
35
|
def __init__(
|
|
36
36
|
self,
|
|
37
37
|
config: AgentConfig,
|
|
38
|
-
tools:
|
|
38
|
+
tools: Sequence[FastMCPTool | Callable] = [],
|
|
39
39
|
context: Context | None = None,
|
|
40
40
|
) -> None:
|
|
41
41
|
super().__init__(config=config, context=context)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"""Bootstrap command to create example applications."""
|
|
2
2
|
|
|
3
3
|
import shutil
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from importlib.resources import files
|
|
4
6
|
from pathlib import Path
|
|
5
7
|
|
|
6
8
|
import typer
|
|
@@ -16,12 +18,27 @@ app = typer.Typer(
|
|
|
16
18
|
)
|
|
17
19
|
console = shared_console
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
|
|
22
|
+
BASE_EXAMPLES_DIR = files("fast_agent").joinpath("resources").joinpath("examples")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@dataclass
|
|
26
|
+
class ExampleConfig:
|
|
27
|
+
description: str
|
|
28
|
+
files: list[str]
|
|
29
|
+
create_subdir: bool
|
|
30
|
+
path_in_examples: list[str]
|
|
31
|
+
mount_point_files: list[str] | None = None
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
_EXAMPLE_CONFIGS = {
|
|
35
|
+
"workflow": ExampleConfig(
|
|
36
|
+
description=(
|
|
37
|
+
"Example workflows, demonstrating each of the patterns in Anthropic's\n"
|
|
38
|
+
"'Building Effective Agents' paper. Some agents use the 'fetch'\n"
|
|
39
|
+
"and filesystem MCP Servers."
|
|
40
|
+
),
|
|
41
|
+
files=[
|
|
25
42
|
"chaining.py",
|
|
26
43
|
"evaluator.py",
|
|
27
44
|
"human_input.py",
|
|
@@ -31,41 +48,53 @@ EXAMPLE_TYPES = {
|
|
|
31
48
|
"short_story.txt",
|
|
32
49
|
"fastagent.config.yaml",
|
|
33
50
|
],
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
51
|
+
create_subdir=True,
|
|
52
|
+
path_in_examples=["workflows"],
|
|
53
|
+
),
|
|
54
|
+
"researcher": ExampleConfig(
|
|
55
|
+
description=(
|
|
56
|
+
"Research agent example with additional evaluation/optimization\n"
|
|
57
|
+
"example. Uses Brave Search and Docker MCP Servers.\n"
|
|
58
|
+
"Creates examples in a 'researcher' subdirectory."
|
|
59
|
+
),
|
|
60
|
+
files=["researcher.py", "researcher-eval.py", "fastagent.config.yaml"],
|
|
61
|
+
create_subdir=True,
|
|
62
|
+
path_in_examples=["researcher"],
|
|
63
|
+
),
|
|
64
|
+
"data-analysis": ExampleConfig(
|
|
65
|
+
description=(
|
|
66
|
+
"Data analysis agent examples that demonstrate working with\n"
|
|
67
|
+
"datasets, performing statistical analysis, and generating visualizations.\n"
|
|
68
|
+
"Creates examples in a 'data-analysis' subdirectory with mount-point for data.\n"
|
|
69
|
+
"Uses MCP 'roots' feature for mapping"
|
|
70
|
+
),
|
|
71
|
+
files=["analysis.py", "fastagent.config.yaml"],
|
|
72
|
+
mount_point_files=["WA_Fn-UseC_-HR-Employee-Attrition.csv"],
|
|
73
|
+
create_subdir=True,
|
|
74
|
+
path_in_examples=["data-analysis"],
|
|
75
|
+
),
|
|
76
|
+
"state-transfer": ExampleConfig(
|
|
77
|
+
description=(
|
|
78
|
+
"Example demonstrating state transfer between multiple agents.\n"
|
|
79
|
+
"Shows how state can be passed between agent runs to maintain context.\n"
|
|
80
|
+
"Creates examples in a 'state-transfer' subdirectory."
|
|
81
|
+
),
|
|
82
|
+
files=[
|
|
57
83
|
"agent_one.py",
|
|
58
84
|
"agent_two.py",
|
|
59
85
|
"fastagent.config.yaml",
|
|
60
86
|
"fastagent.secrets.yaml.example",
|
|
61
87
|
],
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
88
|
+
create_subdir=True,
|
|
89
|
+
path_in_examples=["mcp", "state-transfer"],
|
|
90
|
+
),
|
|
91
|
+
"elicitations": ExampleConfig(
|
|
92
|
+
description=(
|
|
93
|
+
"Interactive form examples using MCP elicitations feature.\n"
|
|
94
|
+
"Demonstrates collecting structured data with forms, AI-guided workflows,\n"
|
|
95
|
+
"and custom handlers. Creates examples in an 'elicitations' subdirectory."
|
|
96
|
+
),
|
|
97
|
+
files=[
|
|
69
98
|
"elicitation_account_server.py",
|
|
70
99
|
"elicitation_forms_server.py",
|
|
71
100
|
"elicitation_game_server.py",
|
|
@@ -76,13 +105,16 @@ EXAMPLE_TYPES = {
|
|
|
76
105
|
"game_character_handler.py",
|
|
77
106
|
"tool_call.py",
|
|
78
107
|
],
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
108
|
+
create_subdir=True,
|
|
109
|
+
path_in_examples=["mcp", "elicitations"],
|
|
110
|
+
),
|
|
111
|
+
"tensorzero": ExampleConfig(
|
|
112
|
+
description=(
|
|
113
|
+
"A complete example showcasing the TensorZero integration.\n"
|
|
114
|
+
"Includes the T0 Gateway, an MCP server, an interactive agent, and \n"
|
|
115
|
+
"multi-modal functionality."
|
|
116
|
+
),
|
|
117
|
+
files=[
|
|
86
118
|
".env.sample",
|
|
87
119
|
"Makefile",
|
|
88
120
|
"README.md",
|
|
@@ -93,105 +125,64 @@ EXAMPLE_TYPES = {
|
|
|
93
125
|
"simple_agent.py",
|
|
94
126
|
"mcp_server/",
|
|
95
127
|
"demo_images/",
|
|
96
|
-
"tensorzero_config/"
|
|
128
|
+
"tensorzero_config/",
|
|
97
129
|
],
|
|
98
|
-
|
|
99
|
-
|
|
130
|
+
create_subdir=True,
|
|
131
|
+
path_in_examples=["elicitations"],
|
|
132
|
+
),
|
|
100
133
|
}
|
|
101
134
|
|
|
102
135
|
|
|
136
|
+
def _development_mode_fallback(example_info: ExampleConfig) -> Path:
|
|
137
|
+
"""Fallback function for development mode."""
|
|
138
|
+
package_dir = Path(__file__).parent.parent.parent.parent.parent
|
|
139
|
+
for dir in example_info.path_in_examples:
|
|
140
|
+
package_dir = package_dir / dir
|
|
141
|
+
console.print(f"[blue]Using development directory: {package_dir}[/blue]")
|
|
142
|
+
return package_dir
|
|
143
|
+
|
|
144
|
+
|
|
103
145
|
def copy_example_files(example_type: str, target_dir: Path, force: bool = False) -> list[str]:
|
|
104
146
|
"""Copy example files from resources to target directory."""
|
|
105
|
-
created = []
|
|
106
|
-
|
|
107
147
|
# Determine if we should create a subdirectory for this example type
|
|
108
|
-
example_info =
|
|
109
|
-
if example_info
|
|
148
|
+
example_info = _EXAMPLE_CONFIGS.get(example_type, None)
|
|
149
|
+
if example_info is None:
|
|
150
|
+
console.print(f"Example type '{example_type}' not found.")
|
|
151
|
+
return []
|
|
152
|
+
|
|
153
|
+
if example_info.create_subdir:
|
|
110
154
|
target_dir = target_dir / example_type
|
|
111
155
|
if not target_dir.exists():
|
|
112
156
|
target_dir.mkdir(parents=True)
|
|
113
157
|
console.print(f"Created subdirectory: {target_dir}")
|
|
114
158
|
|
|
115
|
-
# Create mount-point directory if needed
|
|
116
|
-
mount_point_files = example_info.get("mount_point_files", [])
|
|
117
|
-
if mount_point_files:
|
|
118
|
-
mount_point_dir = target_dir / "mount-point"
|
|
119
|
-
if not mount_point_dir.exists():
|
|
120
|
-
mount_point_dir.mkdir(parents=True)
|
|
121
|
-
console.print(f"Created mount-point directory: {mount_point_dir}")
|
|
122
|
-
|
|
123
159
|
# Try to use examples from the installed package first, or fall back to the top-level directory
|
|
124
|
-
from importlib.resources import files
|
|
125
|
-
|
|
126
160
|
try:
|
|
127
161
|
# First try to find examples in the package resources
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
source_dir = (
|
|
131
|
-
files("fast_agent")
|
|
132
|
-
.joinpath("resources")
|
|
133
|
-
.joinpath("examples")
|
|
134
|
-
.joinpath("mcp")
|
|
135
|
-
.joinpath("state-transfer")
|
|
136
|
-
)
|
|
137
|
-
elif example_type == "elicitations":
|
|
138
|
-
# The elicitations example is in the mcp subdirectory
|
|
139
|
-
source_dir = (
|
|
140
|
-
files("fast_agent")
|
|
141
|
-
.joinpath("resources")
|
|
142
|
-
.joinpath("examples")
|
|
143
|
-
.joinpath("mcp")
|
|
144
|
-
.joinpath("elicitations")
|
|
145
|
-
)
|
|
146
|
-
else:
|
|
147
|
-
# Other examples are at the top level of examples
|
|
148
|
-
source_dir = (
|
|
149
|
-
files("fast_agent")
|
|
150
|
-
.joinpath("resources")
|
|
151
|
-
.joinpath("examples")
|
|
152
|
-
.joinpath("workflows" if example_type == "workflow" else f"{example_type}")
|
|
153
|
-
)
|
|
162
|
+
source_dir = BASE_EXAMPLES_DIR
|
|
163
|
+
for dir in example_info.path_in_examples:
|
|
164
|
+
source_dir = source_dir.joinpath(dir)
|
|
154
165
|
|
|
155
166
|
# Check if we found a valid directory
|
|
156
167
|
if not source_dir.is_dir():
|
|
157
168
|
console.print(
|
|
158
|
-
f"[yellow]Resource directory not found: {source_dir}.
|
|
169
|
+
f"[yellow]Resource directory not found: {source_dir}. "
|
|
170
|
+
"Falling back to development mode.[/yellow]"
|
|
159
171
|
)
|
|
160
172
|
# Fall back to the top-level directory for development mode
|
|
161
|
-
|
|
162
|
-
if example_type == "state-transfer":
|
|
163
|
-
source_dir = package_dir / "examples" / "mcp" / "state-transfer"
|
|
164
|
-
elif example_type == "elicitations":
|
|
165
|
-
source_dir = package_dir / "examples" / "mcp" / "elicitations"
|
|
166
|
-
else:
|
|
167
|
-
source_dir = (
|
|
168
|
-
package_dir
|
|
169
|
-
/ "examples"
|
|
170
|
-
/ ("workflows" if example_type == "workflow" else f"{example_type}")
|
|
171
|
-
)
|
|
172
|
-
console.print(f"[blue]Using development directory: {source_dir}[/blue]")
|
|
173
|
+
source_dir = _development_mode_fallback(example_info)
|
|
173
174
|
except (ImportError, ModuleNotFoundError, ValueError) as e:
|
|
174
175
|
console.print(
|
|
175
176
|
f"[yellow]Error accessing resources: {e}. Falling back to development mode.[/yellow]"
|
|
176
177
|
)
|
|
177
|
-
|
|
178
|
-
package_dir = Path(__file__).parent.parent.parent.parent.parent
|
|
179
|
-
if example_type == "state-transfer":
|
|
180
|
-
source_dir = package_dir / "examples" / "mcp" / "state-transfer"
|
|
181
|
-
elif example_type == "elicitations":
|
|
182
|
-
source_dir = package_dir / "examples" / "mcp" / "elicitations"
|
|
183
|
-
else:
|
|
184
|
-
source_dir = (
|
|
185
|
-
package_dir
|
|
186
|
-
/ "examples"
|
|
187
|
-
/ ("workflows" if example_type == "workflow" else f"{example_type}")
|
|
188
|
-
)
|
|
178
|
+
source_dir = _development_mode_fallback(example_info)
|
|
189
179
|
|
|
190
180
|
if not source_dir.exists():
|
|
191
181
|
console.print(f"[red]Error: Source directory not found: {source_dir}[/red]")
|
|
192
|
-
return
|
|
182
|
+
return []
|
|
193
183
|
|
|
194
|
-
|
|
184
|
+
created = []
|
|
185
|
+
for filename in example_info.files:
|
|
195
186
|
source = source_dir / filename
|
|
196
187
|
target = target_dir / filename
|
|
197
188
|
|
|
@@ -213,16 +204,23 @@ def copy_example_files(example_type: str, target_dir: Path, force: bool = False)
|
|
|
213
204
|
rel_path = f"{example_type}/{filename}"
|
|
214
205
|
|
|
215
206
|
created.append(rel_path)
|
|
216
|
-
console.print(f"[green]Created[/green] {
|
|
207
|
+
console.print(f"[green]Created[/green] {rel_path}")
|
|
217
208
|
|
|
218
209
|
except Exception as e:
|
|
219
210
|
console.print(f"[red]Error copying {filename}: {str(e)}[/red]")
|
|
220
211
|
|
|
221
212
|
# Copy mount-point files if any
|
|
213
|
+
mount_point_files = example_info.mount_point_files or []
|
|
222
214
|
if mount_point_files:
|
|
223
|
-
|
|
215
|
+
mount_point_dir = target_dir / "mount-point"
|
|
216
|
+
|
|
217
|
+
# Create mount-point directory if needed
|
|
218
|
+
if not mount_point_dir.exists():
|
|
219
|
+
mount_point_dir.mkdir(parents=True)
|
|
220
|
+
console.print(f"Created mount-point directory: {mount_point_dir}")
|
|
221
|
+
|
|
224
222
|
for filename in mount_point_files:
|
|
225
|
-
source =
|
|
223
|
+
source = source_dir / "mount-point" / filename
|
|
226
224
|
target = mount_point_dir / filename
|
|
227
225
|
|
|
228
226
|
try:
|
|
@@ -253,10 +251,14 @@ def copy_project_template(source_dir: Path, dest_dir: Path, console: Console, fo
|
|
|
253
251
|
"""
|
|
254
252
|
if dest_dir.exists():
|
|
255
253
|
if force:
|
|
256
|
-
console.print(
|
|
254
|
+
console.print(
|
|
255
|
+
f"[yellow]--force specified. Removing existing directory: {dest_dir}[/yellow]"
|
|
256
|
+
)
|
|
257
257
|
shutil.rmtree(dest_dir)
|
|
258
258
|
else:
|
|
259
|
-
console.print(
|
|
259
|
+
console.print(
|
|
260
|
+
f"[bold yellow]Directory '{dest_dir.name}' already exists.[/bold yellow] Use --force to overwrite."
|
|
261
|
+
)
|
|
260
262
|
return False
|
|
261
263
|
|
|
262
264
|
try:
|
|
@@ -278,14 +280,14 @@ def show_overview() -> None:
|
|
|
278
280
|
table.add_column("Description")
|
|
279
281
|
table.add_column("Files")
|
|
280
282
|
|
|
281
|
-
for name, info in
|
|
283
|
+
for name, info in _EXAMPLE_CONFIGS.items():
|
|
282
284
|
# Just show file count instead of listing all files
|
|
283
|
-
file_count = len(info
|
|
285
|
+
file_count = len(info.files)
|
|
284
286
|
files_summary = f"{file_count} files"
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
files_summary += f"\n+ {
|
|
288
|
-
table.add_row(f"[green]{name}[/green]", info
|
|
287
|
+
mount_files = info.mount_point_files
|
|
288
|
+
if mount_files:
|
|
289
|
+
files_summary += f"\n+ {len(mount_files)} data files"
|
|
290
|
+
table.add_row(f"[green]{name}[/green]", info.description, files_summary)
|
|
289
291
|
|
|
290
292
|
console.print(table)
|
|
291
293
|
|
|
@@ -445,7 +447,9 @@ def tensorzero(
|
|
|
445
447
|
Path("."),
|
|
446
448
|
help="Directory where the 'tensorzero' project folder will be created.",
|
|
447
449
|
),
|
|
448
|
-
force: bool = typer.Option(
|
|
450
|
+
force: bool = typer.Option(
|
|
451
|
+
False, "--force", "-f", help="Force overwrite if project directory exists"
|
|
452
|
+
),
|
|
449
453
|
):
|
|
450
454
|
"""Create the TensorZero project example."""
|
|
451
455
|
console.print("[bold green]Setting up the TensorZero quickstart example...[/bold green]")
|
|
@@ -454,13 +458,18 @@ def tensorzero(
|
|
|
454
458
|
|
|
455
459
|
# --- Find Source Directory ---
|
|
456
460
|
from importlib.resources import files
|
|
461
|
+
|
|
457
462
|
try:
|
|
458
463
|
# This path MUST match the "to" path from hatch_build.py
|
|
459
|
-
source_dir =
|
|
464
|
+
source_dir = (
|
|
465
|
+
files("fast_agent").joinpath("resources").joinpath("examples").joinpath("tensorzero")
|
|
466
|
+
)
|
|
460
467
|
if not source_dir.is_dir():
|
|
461
468
|
raise FileNotFoundError # Fallback to dev mode if resource isn't a dir
|
|
462
469
|
except (ImportError, ModuleNotFoundError, FileNotFoundError):
|
|
463
|
-
console.print(
|
|
470
|
+
console.print(
|
|
471
|
+
"[yellow]Package resources not found. Falling back to development mode.[/yellow]"
|
|
472
|
+
)
|
|
464
473
|
# This path is relative to the project root in a development environment
|
|
465
474
|
source_dir = Path(__file__).parent.parent.parent.parent / "examples" / "tensorzero"
|
|
466
475
|
|
|
@@ -486,7 +495,9 @@ def tensorzero(
|
|
|
486
495
|
" [dim]Then, open the new '.env' file and add your OpenAI or Anthropic API key.[/dim]"
|
|
487
496
|
)
|
|
488
497
|
|
|
489
|
-
console.print(
|
|
498
|
+
console.print(
|
|
499
|
+
"\n3. [bold]Start the required services (TensorZero Gateway & MCP Server):[/bold]"
|
|
500
|
+
)
|
|
490
501
|
console.print(" [cyan]docker compose up --build -d[/cyan]")
|
|
491
502
|
console.print(
|
|
492
503
|
" [dim](This builds and starts the necessary containers in the background)[/dim]"
|
|
@@ -499,7 +510,9 @@ def tensorzero(
|
|
|
499
510
|
|
|
500
511
|
@app.command(name="t0", help="Alias for the TensorZero quickstart.", hidden=True)
|
|
501
512
|
def t0_alias(
|
|
502
|
-
directory: Path = typer.Argument(
|
|
513
|
+
directory: Path = typer.Argument(
|
|
514
|
+
Path("."), help="Directory for the 'tensorzero' project folder."
|
|
515
|
+
),
|
|
503
516
|
force: bool = typer.Option(False, "--force", "-f", help="Force overwrite"),
|
|
504
517
|
):
|
|
505
518
|
"""Alias for the `tensorzero` command."""
|