-
Notifications
You must be signed in to change notification settings - Fork 707
Fixing diagram on README for Financial Analyzer #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe ASCII diagram in the MCP Financial Analyzer example's README was revised for improved clarity and consistency. Component names were updated, box sizes and alignments were adjusted, and arrow directions were refined to better represent workflow relationships. No changes were made to the textual content or operational sequence. Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (3)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
* fix: correct final response generation logic in AnthropicAugmentedLLM * fix: update parameter name for async mode in GoogleAugmentedLLM (#224) * Add mcp_financial_analyzer use case to examples (#199) * Add mcp_financial_analyzer use case to examples * Fix lint errors: removed unused import and variable * Fix: remove unused imports and variables * Fix: remove unused imports and variables * Fix linting errors in financial analyzer example * Add .DS_Store to gitignore * Add styled README for financial analyzer * Remove pyproject.toml from version control * Move mcp_financial_analyzer to examples/usecases * Update main.py and config with improvements * Refactor: updated main.py with retry handling and cleanup * Update README with usage details and agent description * Refactor: updated main.py with retry handling and cleanup * Refactor: updated main.py with Evaluator Workflow and cleanup * Refactor: updated main.py with Evaluator Workflow and cleanup * Refactor: updated main.py with working Evaluator Workflow and cleanup * Updated readme * Secres file added * Update README with demo video and instructions (#229) * Feat: Add Temporal support for durable execution, and expose MCP Agents as MCP servers (#226) * Initial CLAUDE.md (#97) * Expose mcp-agent apps (MCPApp) as MCP servers (#112) * WIP app server changes * Some more WIP to get app server set up for workflows * WIP update app server * Updates to workflow * Simplify workflows to remove pause functionality. * The app server kinda sorta works! * Agent server is operational * Comment out cancellation * Update readme * feat: add max_concurrent_activities field to TemporalSettings * Adds Temporal workflow example and configuration Introduces an example demonstrating the use of Temporal as the execution engine for workflows. Enhances the MCPApp to support workflow registration and execution with Temporal. Add start_workflow and update start_worker in TemporalExecutor * fix: Run outside temporal sandbox environment to silence non-determinism errors * refactor: Rename list_workflows to list_workflow_statuses for clarity and add new list_workflows method * refactor: Register workflow in workflow registry even if not Temporal * refactor: Update SimpleWorkflow to inherit from Workflow class and clean up imports * feat: Add example secrets configuration for OpenAI and Anthropic APIs * feat: Add README example for Temporal workflow integration * fix: Handle event loop methods in Temporal workflow environment * feat: Initialise OpenAI client in init. Move completion api to separate function so it can be wrapped as activity * feat: Add timeout_seconds parameter to TemporalSettings for configurable timeouts * feat: Run basic agent in temporal example * feat: WIP to register essential acitivites in start_worker method and execute task as activities. * Promptify updates * feat: Make calling create_response activity work * feat: Update TemporalExecutor to handlie coroutines. Update logic to handle activity methods * WIP Pass agents to start_worker * minor restructurings to move files from root directory * feat: Refactor agent initialization and workflow execution in Temporal example * fix: Use same agent for run_worker.py and main.py in temporal_workflow_example so temporal workflow runs properly * fix: Adjust argument unpacking in TemporalExecutor to ensure proper function calls * feat: Add MCP server configurations for fetch and filesystem commands in Temporal workflow example * fix: Remove unused import of Agent in run_worker.py * Update MCPApp init and initialization to simplify decorator registration * Fixes for workflow_task decorator * Move gemini-specific helper into augmented_llm_google.py * minor updates * fix: Update input handling in temporal example * feat: Add Temporal workflow example with configuration, secrets, and worker script * fix: fix non-activity task execution handling in TemporalExecutor and update agent error handling in Orchestrator * Temp Checkpoint * Temp Checkpoint 2 * Temp Checkpoint 3 * Convert Agent to temporal-compliant version * feat: Add synthesizer agent to orchestrator * fix: Fix idling issues when running orchestrator with temporal. Update workflow task in example. * Convert AugmentedLLM and base implementations to temporal-compliant version * Basic temporal workflow works e2e! * Fix typo in activities list print statement * refactor: Simplify task execution checks in TemporalExecutor * fix: Fix 'Unable to serialize unknown type' issue when executing request_structured_completion_task * fix: fix Orchestrator initialization and set default value for server_names in AugmentedLLM * chore: Format lambda function and clean up deprecated comments in OpenAIAugmentedLLM * refactor: Move orchestrator initialization into the workflow and update worker setup in run_worker.py * fix: Update response model handling in OpenAIAugmentedLLM to use model path * fix: Validate structured response model in OpenAIAugmentedLLM * Add global workflow_task registry for unbound functions in places where MCPApp isn't available * Fix orchestrator workflow * Make orchestrator work for advanced example * fix: fix non-activity task execution handling in TemporalExecutor * fix: fix non-determinism error in Orchestrator when executing tasks in parallel * fix: update task execution in Temporal execute_many method to use list comprehension * Add lock to agent initialization * Revert orchestrator back to point that it works in temporal * refactor: move agents into the SimpleWorkflow example to fix non-determinism errors * Get all workflow patterns working, and consolidate all examples into temporal_workflow_example * MCP-Agent: MCP Puppeteer to enable Console based browsing (#137) * Creating an example mcp-agent using puppeteer * Add files via upload Adding the example browser mcp-agent * Adding gif to the README * Removing extra f for string without variables * feat: mcp_playwright_agent example - Updated (#156) * feat: add cleaned mcp_playwright_agent example * fix: remove unused result variable to pass linter * Restructuring the examples directory (#144) * Restructure examples directory into logical categories Organize examples into distinct categories: - basic: simple agents and basic examples - mcp: advanced capabilities of MCP-Agent - usecases: examples of use cases with MCP-Agent - model_providers: Azure, Bedrock, Google, Ollama connections - workflows: workflow patterns like router, swarm, etc. * Remove .DS_Store files from commits * Update paths in README and fix schema references in config files Fix relative paths in: - README.md: Update all example paths to point to new directory structure - Config files: Update schema references to point to the correct location - Test fixtures: Update README references to match new structure * Update scripts/example.py to work with new directory structure - Update list command to display examples by category - Modify run command to use path-style format (category/example_name) - Fix path resolution to ensure script runs from any directory - Update clean command to use path-style format as well * Updated restructuring of examples directory (#166) * Restructure examples directory with organized categories and fix config paths * Remove .DS_Store files from examples directory * Fixing broken links in the README (#167) * mv temporal_workflow_example -> temporal * Update session ID generation * fix: replace uuid with workflow.uuid4() for deterministic uuid * feat: add temporal basic agent server example * fix: await _execute_task in AsyncioExecutor for proper async execution * feat: Enable app_server to run temporal workflow * fix: Correct argument passing in temporal start_workflow and execute_workflow methods * fix: Update start_workflow and execute_workflow methods to use 'input' parameter; add UUID fallback in TemporalExecutor for generating UUID outside workflow. * refactor: Update BasicAgentWorkflow to use RunParams for input handling; clean up unused imports and commented code * Get basic agent server working in Claude Desktop, plus various fixes to orchestrator * Default uuid and random to regular implementation if there's any issue using the Temporal ones * feat: Update execute_workflow method to accept variable arguments; adjust workflow execution in Workflow class * feat: Implement SignalRegistry for centralized signal management; update workflow signal handling capabilities * feat: Add resume signal handling to BasicAgentWorkflow; simplify run method for testing purpose * Fix workflow registry usage for temporal * Fix workflow_mcp_server tool names * Fix OllamaAugmentedLLM impl * minor updates to workflow_mcp_server * fixing absolute path of server in basic/decorator/yaml (#181) * Upgrade mcp-agent to mcp v1.8.0, plus a few fixes * fix: Make LLMIntentClassifier.initialize() asynchronous (#184) * Fix parallel workflow schema (#188) * fix: Update _get_next_step method in orchestrator.py (#187) * add support for Azure Identity instead of keys (#190) * add support for Azure Identity instead of keys * make credential_scopes configurable, but with a default to `https://cognitiveservices.azure.com/.default` --------- Co-authored-by: Brian Caswell <[email protected]> * Add streamable HTTP support to mcp-agent (#193) * Add streamable HTTP support to mcp-agent * Session ID support for session resumption * Example to showcase streamable HTTP server support * fix: Conditionally include toolConfig in BedrockAugmentedLLM arguments (#192) * fix get prompt no return (#194) * Fix Azure client constructor * temp wip * Misc fixes * More misc fixes * More fixes * Add pydantic model type serializer * Add Pydantic type serializer and update structured output processing to use it * Clean up TODOs * Add agent.close method for backwards compat, and also explicitly initialize the ContextDependent mixin constructor for MCPAgentClientSession * Add agent.get_server_session for returning server session info for specific servers the agent is connected to * Clean up name silliness * Fix intent classifier workflow and example * Fix router workflow example * Significantly simplified app_server * Delete CLAUDE.md from PR * Clean up READMEs and fix examples --------- Co-authored-by: James Sedgwick <[email protected]> Co-authored-by: StreetLamb <[email protected]> Co-authored-by: Andrew Hoh <[email protected]> Co-authored-by: Haniehz1 <[email protected]> Co-authored-by: Romain Egele <[email protected]> Co-authored-by: cookabc <[email protected]> Co-authored-by: Dan Lester <[email protected]> Co-authored-by: jingx8885 <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: zmetry <[email protected]> * Fix aggregator rename in orchestrator workflow * Clean up requirements.txt in financial analyzer example (#231) * Update README.md * Update README.md * Distributed Tracing for Key Features: Agents, (asyncio) Workflows, AugmentedLLMs (#233) * Initial CLAUDE.md (#97) * Expose mcp-agent apps (MCPApp) as MCP servers (#112) * WIP app server changes * Some more WIP to get app server set up for workflows * WIP update app server * Updates to workflow * Simplify workflows to remove pause functionality. * The app server kinda sorta works! * Agent server is operational * Comment out cancellation * Update readme * feat: add max_concurrent_activities field to TemporalSettings * Adds Temporal workflow example and configuration Introduces an example demonstrating the use of Temporal as the execution engine for workflows. Enhances the MCPApp to support workflow registration and execution with Temporal. Add start_workflow and update start_worker in TemporalExecutor * fix: Run outside temporal sandbox environment to silence non-determinism errors * refactor: Rename list_workflows to list_workflow_statuses for clarity and add new list_workflows method * refactor: Register workflow in workflow registry even if not Temporal * refactor: Update SimpleWorkflow to inherit from Workflow class and clean up imports * feat: Add example secrets configuration for OpenAI and Anthropic APIs * feat: Add README example for Temporal workflow integration * fix: Handle event loop methods in Temporal workflow environment * feat: Initialise OpenAI client in init. Move completion api to separate function so it can be wrapped as activity * feat: Add timeout_seconds parameter to TemporalSettings for configurable timeouts * feat: Run basic agent in temporal example * feat: WIP to register essential acitivites in start_worker method and execute task as activities. * Promptify updates * feat: Make calling create_response activity work * feat: Update TemporalExecutor to handlie coroutines. Update logic to handle activity methods * WIP Pass agents to start_worker * minor restructurings to move files from root directory * feat: Refactor agent initialization and workflow execution in Temporal example * fix: Use same agent for run_worker.py and main.py in temporal_workflow_example so temporal workflow runs properly * fix: Adjust argument unpacking in TemporalExecutor to ensure proper function calls * feat: Add MCP server configurations for fetch and filesystem commands in Temporal workflow example * fix: Remove unused import of Agent in run_worker.py * Update MCPApp init and initialization to simplify decorator registration * Fixes for workflow_task decorator * Move gemini-specific helper into augmented_llm_google.py * minor updates * fix: Update input handling in temporal example * feat: Add Temporal workflow example with configuration, secrets, and worker script * fix: fix non-activity task execution handling in TemporalExecutor and update agent error handling in Orchestrator * Temp Checkpoint * Temp Checkpoint 2 * Temp Checkpoint 3 * Convert Agent to temporal-compliant version * feat: Add synthesizer agent to orchestrator * fix: Fix idling issues when running orchestrator with temporal. Update workflow task in example. * Convert AugmentedLLM and base implementations to temporal-compliant version * Basic temporal workflow works e2e! * Fix typo in activities list print statement * refactor: Simplify task execution checks in TemporalExecutor * fix: Fix 'Unable to serialize unknown type' issue when executing request_structured_completion_task * fix: fix Orchestrator initialization and set default value for server_names in AugmentedLLM * chore: Format lambda function and clean up deprecated comments in OpenAIAugmentedLLM * refactor: Move orchestrator initialization into the workflow and update worker setup in run_worker.py * fix: Update response model handling in OpenAIAugmentedLLM to use model path * fix: Validate structured response model in OpenAIAugmentedLLM * Add global workflow_task registry for unbound functions in places where MCPApp isn't available * Fix orchestrator workflow * Make orchestrator work for advanced example * fix: fix non-activity task execution handling in TemporalExecutor * fix: fix non-determinism error in Orchestrator when executing tasks in parallel * fix: update task execution in Temporal execute_many method to use list comprehension * Add lock to agent initialization * Revert orchestrator back to point that it works in temporal * refactor: move agents into the SimpleWorkflow example to fix non-determinism errors * Get all workflow patterns working, and consolidate all examples into temporal_workflow_example * MCP-Agent: MCP Puppeteer to enable Console based browsing (#137) * Creating an example mcp-agent using puppeteer * Add files via upload Adding the example browser mcp-agent * Adding gif to the README * Removing extra f for string without variables * feat: mcp_playwright_agent example - Updated (#156) * feat: add cleaned mcp_playwright_agent example * fix: remove unused result variable to pass linter * Restructuring the examples directory (#144) * Restructure examples directory into logical categories Organize examples into distinct categories: - basic: simple agents and basic examples - mcp: advanced capabilities of MCP-Agent - usecases: examples of use cases with MCP-Agent - model_providers: Azure, Bedrock, Google, Ollama connections - workflows: workflow patterns like router, swarm, etc. * Remove .DS_Store files from commits * Update paths in README and fix schema references in config files Fix relative paths in: - README.md: Update all example paths to point to new directory structure - Config files: Update schema references to point to the correct location - Test fixtures: Update README references to match new structure * Update scripts/example.py to work with new directory structure - Update list command to display examples by category - Modify run command to use path-style format (category/example_name) - Fix path resolution to ensure script runs from any directory - Update clean command to use path-style format as well * Updated restructuring of examples directory (#166) * Restructure examples directory with organized categories and fix config paths * Remove .DS_Store files from examples directory * Fixing broken links in the README (#167) * mv temporal_workflow_example -> temporal * Update session ID generation * fix: replace uuid with workflow.uuid4() for deterministic uuid * feat: add temporal basic agent server example * fix: await _execute_task in AsyncioExecutor for proper async execution * feat: Enable app_server to run temporal workflow * fix: Correct argument passing in temporal start_workflow and execute_workflow methods * fix: Update start_workflow and execute_workflow methods to use 'input' parameter; add UUID fallback in TemporalExecutor for generating UUID outside workflow. * refactor: Update BasicAgentWorkflow to use RunParams for input handling; clean up unused imports and commented code * Get basic agent server working in Claude Desktop, plus various fixes to orchestrator * Default uuid and random to regular implementation if there's any issue using the Temporal ones * feat: Update execute_workflow method to accept variable arguments; adjust workflow execution in Workflow class * feat: Implement SignalRegistry for centralized signal management; update workflow signal handling capabilities * feat: Add resume signal handling to BasicAgentWorkflow; simplify run method for testing purpose * Fix workflow registry usage for temporal * Fix workflow_mcp_server tool names * Fix OllamaAugmentedLLM impl * minor updates to workflow_mcp_server * fixing absolute path of server in basic/decorator/yaml (#181) * Upgrade mcp-agent to mcp v1.8.0, plus a few fixes * fix: Make LLMIntentClassifier.initialize() asynchronous (#184) * Fix parallel workflow schema (#188) * fix: Update _get_next_step method in orchestrator.py (#187) * add support for Azure Identity instead of keys (#190) * add support for Azure Identity instead of keys * make credential_scopes configurable, but with a default to `https://cognitiveservices.azure.com/.default` --------- Co-authored-by: Brian Caswell <[email protected]> * Add streamable HTTP support to mcp-agent (#193) * Add streamable HTTP support to mcp-agent * Session ID support for session resumption * Example to showcase streamable HTTP server support * fix: Conditionally include toolConfig in BedrockAugmentedLLM arguments (#192) * fix get prompt no return (#194) * Fix Azure client constructor * feature/distributed_tracing * Tracing logging to console and endpoint with example * [WIP] Adding tracing to agent * Human input * Call tool * Rename example to agent * Add image to example readme * Add tracing to mcp_aggregator * Augmented LLM starting point * Model selector * Fix openai instrumentation import * OpenAI LLM starting point * Openai llm generate * openai llm generate_structured * Anthropic LLM starting point * Anthropic generate request and otel gen_ai spec * Semconv for incubated gen ai * finish reasons * More semconv * Pull tracer config out of context, prep for file exporter * Implement and use SpanFileExporter * Distinguish jsonl filename patter for trace file * Proper jsonl file exporting for spans * Gen schema * Fix openai llm response message serialization * Finish anthropic llm tracing * Azure llm tracing. TODO for serialization * Comment out azure for now * Fix up @telemetry.traced() and use for executor * Wrap completion tasks for openai and anthropic * Pull _annotate_span_for_generation_message into AugmentedLLM * Remove unnecessary context import * Reusable attribute serialization & client session send_request * Fix MCPAgentClientSession ContextDependent init * Finish MCPAgentClientSession tracing * EvaluatorOptimizer generate * Finish evaluator optimizer * Intent classifier testing * Hold off on intent_classifier for now * Pull otlp endpoint into otlp_settings.endpoint for future extensibility * Workflow orchestrator test * Workflow orchestrator * LLM Intent classifier * Intent classifier embeddings * Parallel workflow * Router workflow start * Router workflow starting point * Don't shutdown proxy tracer provider (tracing disabled) * Delete old examples * Delete CLAUDE.md * Delete old example * Remove temporal dependency * Remove some old stuff * Minor updates for PR * Remove tracing cleanup * Fix optional agent instruction * Record exception for tool result exceptions * Changes from review; context_enabled flag and avoid some overhead using the flag * Another tracing_enabled check * Serialize available agents as list of string * fix lint * Address coderabbitai review comments * Remaining review comments --------- Co-authored-by: James Sedgwick <[email protected]> Co-authored-by: Sarmad Qadri <[email protected]> Co-authored-by: StreetLamb <[email protected]> Co-authored-by: Andrew Hoh <[email protected]> Co-authored-by: Haniehz1 <[email protected]> Co-authored-by: Romain Egele <[email protected]> Co-authored-by: cookabc <[email protected]> Co-authored-by: Dan Lester <[email protected]> Co-authored-by: jingx8885 <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: zmetry <[email protected]> * Adding a LLMS.txt for developers (#234) * Add MCP Supabase Migration Agent example (#235) Add MCP Supabase Migration Agent example * Propagate Trace Context to MCP SSE Servers (#241) * Propagate traceparent in ClientRequest and ClientNotification params._meta * Working example * Don't set notification params if not needed * Improve code coverage of mcp-agent (#215) * fix: Rename and update content conversion functions for OpenAI integration * Refactor LLM provider tests and remove outdated event progress test - Deleted the `test_event_progress.py` file as it is no longer needed. - Added a new README.md file in the LLM tests directory to document test coverage and usage. - Created a `conftest.py` file for shared fixtures used across LLM provider tests. - Implemented comprehensive tests for the `OpenAIAugmentedLLM` class, covering various functionalities including text generation, structured output, tool usage, error handling, and request parameter merging. * add support for Azure Identity instead of keys (#190) * add support for Azure Identity instead of keys * make credential_scopes configurable, but with a default to `https://cognitiveservices.azure.com/.default` --------- Co-authored-by: Brian Caswell <[email protected]> * Add streamable HTTP support to mcp-agent (#193) * Add streamable HTTP support to mcp-agent * Session ID support for session resumption * Example to showcase streamable HTTP server support * fix: Conditionally include toolConfig in BedrockAugmentedLLM arguments (#192) * fix get prompt no return (#194) * fix: Remove unused imports from test_augmented_llm_openai.py * test: Add comprehensive tests for AzureAugmentedLLM functionality * feat: Add pytest-cov for test coverage reporting * fix: Update installation instructions in README * fix: Set model to an empty string in MCPAzureTypeConverter * fix: Update coverage command examples in README for clarity * fix: Correct bedrock content and mcp message param handling in BedrockMCPTypeConverter * test: Add comprehensive tests for BedrockAugmentedLLM functionality * fix: correct role handling and set model to empty string in GoogleMCPTypeConverter * test: Add comprehensive tests for GoogleAugmentedLLM functionality * refactor: Update import statement for OpenAI in OllamaAugmentedLLM * test: Add unit tests for OllamaAugmentedLLM functionality * fix: enable content conversion handling for pydantic models and dict blocks in anthropic_content_to_mcp_content * test: Enhance tests for AnthropicAugmentedLLM * test: Add unit tests for Agent class and mock fixtures * test: Add comprehensive unit tests for MCPApp class functionality * test: Add unit tests for OpenAIEmbeddingIntentClassifier and CohereEmbeddingIntentClassifier * test: Add unit tests for OpenAILLMIntentClassifier and AnthropicLLMIntentClassifier functionality * test: Add tests for orchestrator workflow module - Created test package for orchestrator workflow module. - Implemented unit tests for orchestrator methods, including initialization and execution of plans. - Added integration tests for full and iterative workflow executions. - Developed tests for orchestrator data models and prompt templates. - Ensured comprehensive coverage of task, step, and plan result formatting. * fix: Validate plan_type in Orchestrator constructor to ensure it is either 'full' or 'iterative' * test: Add unit tests for FanOut and ParallelLLM classes * test: Add tests for embedding routers and llm routers * fix: Await embedding computation in EmbeddingRouter and fix EmeddingRouter initialize method. Awaits the embedding computation to ensure proper asynchronous handling. Updates the initialization of EmbeddingRouterCategory to use model_dump for correct category representation. * test: Add unit tests for swarm workflows * fix: Change AgentFunctionResult to AgentFunctionResultResource in Swarm post_tool_call method * test: Add tests for workflow signals * fix: Generate unique signal name in AsyncioSignalHandler * test: Add tests for MCPAggregator * fix: Reset initialized flag in MCPAggregator when connection persistence is disabled. Fix ListToolsResult in list_tools method. Ensure order of server names in _parse_capability_name method * fix: Add trio dependency for 'dev' * test: Add tests for MCPConnectionManager * fix: Improve error handling and tool call execution in AzureAugmentedLLM * test: Add additional tests for AzureAugmentedLLM * fix: Update import paths for Context and ServerRegistry * fix: Update validators in NestedLocation and ComplexModel to use class methods * fix: Update agent tests due to changes in agents.py * fix: Initialize event queue in AsyncEventBus constructor * fix: Update MCPApp tests * fix: Improve PydanticTypeSerializer serializing and deserializing logic * fix: Update PydanticTypeSerializer tests * fix: Remove unused AsyncMock import and update LLM instantiation in tests * fix: Fix broken AzureAugmentedLLM tests * fix: Conditionally pass instruction to Agent only if not None * fix: fix broken AnthropicAugmentedLLM tests * fix: fix broken openai and google tests * fix: fix broken BedrockAugmentedLLM tests * fix: update broken OllamaAugmentedLLM tests * fix: initialize synthesizer in Orchestrator and correct typo in generate_str call * fix: update broken orchestrator tests * fix: update broken orchestrator and fan out tests * fix: update mocks to fix router tests * fix: remove unused imports and clean up test files * fix: update broken swarm tests * fix: set default values for server_names and functions in SwarmAgent * test: add unit tests for TemporalSignalHandler, TemporalExecutor, and TemporalWorkflowRegistry * test: add unit tests for WorkflowState, WorkflowResult and Workflow classes * test: add unit tests for EvaluatorOptimizerLLM and related components * test: update mock_context to include tracer attributes in various tests * fix: Ensure private attributes are initialized in PydanticTypeSerializer * fix: Update response usage access to dictionary format in AzureAugmentedLLM * fix: Correct typo in synthesizer method call in Orchestrator class * fix: Append ToolMessage results to responses in AzureAugmentedLLM * refactor: Remove unused imports from test fixtures in conftest.py and test_parallel_llm.py * fix: Move pytest-cov dependency to the correct section in pyproject.toml * refactor: Improve embedding generation in MockEmbeddingModel for better randomness * fix: Update default parameters for server_names and functions in SwarmAgent to avoid mutable default arguments * fix: Update import paths in test_mcp_connection_manager.py to remove 'src.' prefix * test: Add test_resume_workflow_signal_error test case * fix: Add explicit assertions for workflow state transitions in test_run_async_asyncio * refactor: Simplify ParallelLLM fixture setup and improve assertions in tests * fix: Improve randomness in mock embedding generation and enhance assertion for result validation * fix: Make embed_side_effect an async coroutine to honour the protocol * fix: Await asynchronous mock methods in MockAugmentedLLM class * fix: Add agent_name to CallToolRequest in test_swarm for improved context * fix: Refactor test_call_tool methods to use real SwarmAgent instance and improve context handling * fix: Initialize context in TestSwarmAgent * fix: Update content formatting in OpenAIAugmentedLLM to use list comprehension * fix: Remove unused mock_aggregator fixture from LLM test classes * fix: Handle non-JSON-serialisable Literal values in PydanticTypeSerializer to avoid runtime TypeError * fix: Preserve compatibility with Pydantic v1 for handling of required field information in PydanticTypeSerializer * fix: Remove mock_context fixture and update tests to use Context directly * fix: Refactor initialization tests for OllamaAugmentedLLM to improve clarity and structure * fix: Refactor DummyClient to DummyRegistry for non-persistent session handling in tests --------- Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Sarmad Qadri <[email protected]> Co-authored-by: zmetry <[email protected]> * Update uv.lock * feat: Add additional OpenAI LLM config options (#242) * Update config schema * Get rid of example.py * Get rid of goosehints (unused) * formatter updates * Update gitignore * Update promptify script * Add a makefile for common commands * Update CONTRIBUTING.md * Add tests to GH workflows * Fix local mcp-agent reference in mcp_agent_server examples * update model benchmarks for dynamic model selection * Add uv sync to example readme instructions * Fix trace span creation for openai * Implement Reliable Conversation Manager: Research-based multi-turn conversation quality control (#243) * phase 1 with basic e2e test working * lots of ux for test_basic.py * main.py REPL and doc cleanup * cleanup; * lint/format * move paper * remove problematic __init__.py breaking tests * convert basic reliable conversation test to pytest for coverage * lint --------- Co-authored-by: James Sedgwick <[email protected]> * Update mcp-agent logo * Move reliable_conversation example into usecases * Bump pyproject version * Remove unnecessary call to init_queue in AsyncEventBus constructor (#249) * Add TLS to temporal settings (#251) * Bump pyproject version * Update README.md for financial analyzer example * fixing mcp_browser_agent readme (#254) * Fix BedrockAugmentedLLM config and generate_structured() (#253) * Fixing diagram on README for Financial Analyzer (#246) * Make MCPConnectionManager and MCPAggregator close/exit more resilient to distributed environments * Remove MCPAgentDecorator (unused) * Adapters for LangChain and CrewAI tools (#260) * Create sample_report.md (#262) * fix(google): Exclude 'additionalProperties' from tool schema (#263) * Update pyproject.toml * Set llm agent to self in attach llm (#266) * Update pyproject.toml * Set llm instruction in attach llm (#268) * feat: Support mcp resources and prompts (#244) * Add resource management to MCPAggregator and Agent classes - Introduced methods for listing and reading resources from MCP servers. - Enhanced MCPAggregator to handle resource mapping and initialization. - Updated Agent class to utilize new resource functionalities. * Update MCPAggregator to fetch resources using URI * Add utility modules for content and resource handling * Add resource URI parameter to LLM generation methods in AugmentedLLM and OpenAIAugmentedLLM * Fix type conversion for resource URI in MCPAggregator * Add basic example to showcase using mcp resources * Refactor resource URI handling in AugmentedLLM and OpenAIAugmentedLLM to support multiple URIs * Enhance MCP Primitives example to demonstrate resource usage and server setup * Add OpenAIConverter class for converting MCP message types to OpenAI API format * Add AnthropicConverter for converting MCP message types to Anthropic API format * Add PromptMessageMultipart class for handling multiple content parts in messages * Add resource_uris parameter to generate_str and related methods in AnthropicAugmentedLLM * Add resource_uris parameter to generate methods in BedrockAugmentedLLM and implement resource handling * Add resource handling in AzureAugmentedLLM and implement AzureConverter for multipart message conversion * Add resource handling and GoogleConverter for multipart message conversion in GoogleAugmentedLLM * Add resource_uris parameter to generate_structured method in OllamaAugmentedLLM * Refactor resource handling in LLM classes to use attached resources instead of resource_uris * Add prompt attachment functionality to LLM classes and update message handling * Add demo server implementation with resource and prompt handling * Update README to include prompts in MCP primitives example * Refactor settings in main.py * Refactor LLM message handling to integrate PromptMessage support and remove unused prompt/resource attachment methods * Remove unused settings and health status resources from demo server; add weather report functionality and update main.py to handle resource and prompt messages. * Refactor and add comments in example * Refactor assertion in TestAnthropicAugmentedLLM to improve readability * Add create_prompt method to generate prompt messages from names and resources; remove get_resource_messages and get_prompt_messages methods * Update README and main.py to reflect changes in resource and prompt retrieval using create_prompt method * Enhance MCPAggregator to return resources alongside tools and prompts; update tests to validate resource handling. * Add comprehensive tests for MIME utilities and multipart converters * Refactor resource URI handling to use AnyUrl for improved type safety in create_embedded_resource, create_blob_resource, and create_text_resource functions. * Fix exception class docstring and update file tags in OpenAIConverter to use mcp-agent prefix * Add comprehensive tests for Azure, Bedrock, and Google multipart converters * Minor code formatting * Add tests for generating responses with various input types in AugmentedLLMs * Refactor message conversion methods to use unified mixed message handling across Anthropic, Azure, Bedrock, Google, and OpenAI converters * Refactor message tracing logic in AugmentedLLM to simplify attribute extraction for different message types * Minor formatting * Refactor AzureConverter tests to assert list content structure for text and image conversions * Fix potential issues raised by coderabbitai * Refactor URI handling to use str() for better compatibility and clarity; update example usage and tests accordingly. * Refactor URI handling in Azure and Google converters to use str() for improved compatibility; update tests to reflect changes in role assignments and message structures. * Remove unnecessary import of AnyUrl in test_create_fallback_text_with_uri * Refactor server name handling in Agent class to support multiple server names; update related logic for prompt and resource retrieval. Enhance MIME utilities docstring for clarity; * Update resource handling in Agent class; clear and update namespaced resource map. Modify read_resource method signature to include return type. * Guard concurrent writes in MCPAggregator with consistent lock usage * Format and lint tests * fix: Correct ordering of parameter handling in _create_function_from_schema (#271) * Add LangChain and CrewAI tool adapter example (#270) * feat: Add langchain tool integration example with Serper API * feat: Add CrewAI tools integration example * fix: Correct schema path in mcp_agent configuration and secrets example * Update examples/langchain/README.md Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * Update examples/langchain/main.py Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * fix: Remove unnecessary API key initialization for GoogleSerperAPIWrapper --------- Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> --------- Co-authored-by: HaniehZ <[email protected]> Co-authored-by: Sarmad Qadri <[email protected]> Co-authored-by: James Sedgwick <[email protected]> Co-authored-by: Andrew Hoh <[email protected]> Co-authored-by: Romain Egele <[email protected]> Co-authored-by: cookabc <[email protected]> Co-authored-by: Dan Lester <[email protected]> Co-authored-by: jingx8885 <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: zmetry <[email protected]> Co-authored-by: Ryan Holinshead <[email protected]> Co-authored-by: Torben Tretau <[email protected]> Co-authored-by: James Sedgwick <[email protected]> Co-authored-by: kawolum <[email protected]> Co-authored-by: JunHo, Jeon <[email protected]> Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* fix: correct final response generation logic in AnthropicAugmentedLLM * fix: update parameter name for async mode in GoogleAugmentedLLM (#224) * Add mcp_financial_analyzer use case to examples (#199) * Add mcp_financial_analyzer use case to examples * Fix lint errors: removed unused import and variable * Fix: remove unused imports and variables * Fix: remove unused imports and variables * Fix linting errors in financial analyzer example * Add .DS_Store to gitignore * Add styled README for financial analyzer * Remove pyproject.toml from version control * Move mcp_financial_analyzer to examples/usecases * Update main.py and config with improvements * Refactor: updated main.py with retry handling and cleanup * Update README with usage details and agent description * Refactor: updated main.py with retry handling and cleanup * Refactor: updated main.py with Evaluator Workflow and cleanup * Refactor: updated main.py with Evaluator Workflow and cleanup * Refactor: updated main.py with working Evaluator Workflow and cleanup * Updated readme * Secres file added * Update README with demo video and instructions (#229) * Feat: Add Temporal support for durable execution, and expose MCP Agents as MCP servers (#226) * Initial CLAUDE.md (#97) * Expose mcp-agent apps (MCPApp) as MCP servers (#112) * WIP app server changes * Some more WIP to get app server set up for workflows * WIP update app server * Updates to workflow * Simplify workflows to remove pause functionality. * The app server kinda sorta works! * Agent server is operational * Comment out cancellation * Update readme * feat: add max_concurrent_activities field to TemporalSettings * Adds Temporal workflow example and configuration Introduces an example demonstrating the use of Temporal as the execution engine for workflows. Enhances the MCPApp to support workflow registration and execution with Temporal. Add start_workflow and update start_worker in TemporalExecutor * fix: Run outside temporal sandbox environment to silence non-determinism errors * refactor: Rename list_workflows to list_workflow_statuses for clarity and add new list_workflows method * refactor: Register workflow in workflow registry even if not Temporal * refactor: Update SimpleWorkflow to inherit from Workflow class and clean up imports * feat: Add example secrets configuration for OpenAI and Anthropic APIs * feat: Add README example for Temporal workflow integration * fix: Handle event loop methods in Temporal workflow environment * feat: Initialise OpenAI client in init. Move completion api to separate function so it can be wrapped as activity * feat: Add timeout_seconds parameter to TemporalSettings for configurable timeouts * feat: Run basic agent in temporal example * feat: WIP to register essential acitivites in start_worker method and execute task as activities. * Promptify updates * feat: Make calling create_response activity work * feat: Update TemporalExecutor to handlie coroutines. Update logic to handle activity methods * WIP Pass agents to start_worker * minor restructurings to move files from root directory * feat: Refactor agent initialization and workflow execution in Temporal example * fix: Use same agent for run_worker.py and main.py in temporal_workflow_example so temporal workflow runs properly * fix: Adjust argument unpacking in TemporalExecutor to ensure proper function calls * feat: Add MCP server configurations for fetch and filesystem commands in Temporal workflow example * fix: Remove unused import of Agent in run_worker.py * Update MCPApp init and initialization to simplify decorator registration * Fixes for workflow_task decorator * Move gemini-specific helper into augmented_llm_google.py * minor updates * fix: Update input handling in temporal example * feat: Add Temporal workflow example with configuration, secrets, and worker script * fix: fix non-activity task execution handling in TemporalExecutor and update agent error handling in Orchestrator * Temp Checkpoint * Temp Checkpoint 2 * Temp Checkpoint 3 * Convert Agent to temporal-compliant version * feat: Add synthesizer agent to orchestrator * fix: Fix idling issues when running orchestrator with temporal. Update workflow task in example. * Convert AugmentedLLM and base implementations to temporal-compliant version * Basic temporal workflow works e2e! * Fix typo in activities list print statement * refactor: Simplify task execution checks in TemporalExecutor * fix: Fix 'Unable to serialize unknown type' issue when executing request_structured_completion_task * fix: fix Orchestrator initialization and set default value for server_names in AugmentedLLM * chore: Format lambda function and clean up deprecated comments in OpenAIAugmentedLLM * refactor: Move orchestrator initialization into the workflow and update worker setup in run_worker.py * fix: Update response model handling in OpenAIAugmentedLLM to use model path * fix: Validate structured response model in OpenAIAugmentedLLM * Add global workflow_task registry for unbound functions in places where MCPApp isn't available * Fix orchestrator workflow * Make orchestrator work for advanced example * fix: fix non-activity task execution handling in TemporalExecutor * fix: fix non-determinism error in Orchestrator when executing tasks in parallel * fix: update task execution in Temporal execute_many method to use list comprehension * Add lock to agent initialization * Revert orchestrator back to point that it works in temporal * refactor: move agents into the SimpleWorkflow example to fix non-determinism errors * Get all workflow patterns working, and consolidate all examples into temporal_workflow_example * MCP-Agent: MCP Puppeteer to enable Console based browsing (#137) * Creating an example mcp-agent using puppeteer * Add files via upload Adding the example browser mcp-agent * Adding gif to the README * Removing extra f for string without variables * feat: mcp_playwright_agent example - Updated (#156) * feat: add cleaned mcp_playwright_agent example * fix: remove unused result variable to pass linter * Restructuring the examples directory (#144) * Restructure examples directory into logical categories Organize examples into distinct categories: - basic: simple agents and basic examples - mcp: advanced capabilities of MCP-Agent - usecases: examples of use cases with MCP-Agent - model_providers: Azure, Bedrock, Google, Ollama connections - workflows: workflow patterns like router, swarm, etc. * Remove .DS_Store files from commits * Update paths in README and fix schema references in config files Fix relative paths in: - README.md: Update all example paths to point to new directory structure - Config files: Update schema references to point to the correct location - Test fixtures: Update README references to match new structure * Update scripts/example.py to work with new directory structure - Update list command to display examples by category - Modify run command to use path-style format (category/example_name) - Fix path resolution to ensure script runs from any directory - Update clean command to use path-style format as well * Updated restructuring of examples directory (#166) * Restructure examples directory with organized categories and fix config paths * Remove .DS_Store files from examples directory * Fixing broken links in the README (#167) * mv temporal_workflow_example -> temporal * Update session ID generation * fix: replace uuid with workflow.uuid4() for deterministic uuid * feat: add temporal basic agent server example * fix: await _execute_task in AsyncioExecutor for proper async execution * feat: Enable app_server to run temporal workflow * fix: Correct argument passing in temporal start_workflow and execute_workflow methods * fix: Update start_workflow and execute_workflow methods to use 'input' parameter; add UUID fallback in TemporalExecutor for generating UUID outside workflow. * refactor: Update BasicAgentWorkflow to use RunParams for input handling; clean up unused imports and commented code * Get basic agent server working in Claude Desktop, plus various fixes to orchestrator * Default uuid and random to regular implementation if there's any issue using the Temporal ones * feat: Update execute_workflow method to accept variable arguments; adjust workflow execution in Workflow class * feat: Implement SignalRegistry for centralized signal management; update workflow signal handling capabilities * feat: Add resume signal handling to BasicAgentWorkflow; simplify run method for testing purpose * Fix workflow registry usage for temporal * Fix workflow_mcp_server tool names * Fix OllamaAugmentedLLM impl * minor updates to workflow_mcp_server * fixing absolute path of server in basic/decorator/yaml (#181) * Upgrade mcp-agent to mcp v1.8.0, plus a few fixes * fix: Make LLMIntentClassifier.initialize() asynchronous (#184) * Fix parallel workflow schema (#188) * fix: Update _get_next_step method in orchestrator.py (#187) * add support for Azure Identity instead of keys (#190) * add support for Azure Identity instead of keys * make credential_scopes configurable, but with a default to `https://cognitiveservices.azure.com/.default` --------- Co-authored-by: Brian Caswell <[email protected]> * Add streamable HTTP support to mcp-agent (#193) * Add streamable HTTP support to mcp-agent * Session ID support for session resumption * Example to showcase streamable HTTP server support * fix: Conditionally include toolConfig in BedrockAugmentedLLM arguments (#192) * fix get prompt no return (#194) * Fix Azure client constructor * temp wip * Misc fixes * More misc fixes * More fixes * Add pydantic model type serializer * Add Pydantic type serializer and update structured output processing to use it * Clean up TODOs * Add agent.close method for backwards compat, and also explicitly initialize the ContextDependent mixin constructor for MCPAgentClientSession * Add agent.get_server_session for returning server session info for specific servers the agent is connected to * Clean up name silliness * Fix intent classifier workflow and example * Fix router workflow example * Significantly simplified app_server * Delete CLAUDE.md from PR * Clean up READMEs and fix examples --------- Co-authored-by: James Sedgwick <[email protected]> Co-authored-by: StreetLamb <[email protected]> Co-authored-by: Andrew Hoh <[email protected]> Co-authored-by: Haniehz1 <[email protected]> Co-authored-by: Romain Egele <[email protected]> Co-authored-by: cookabc <[email protected]> Co-authored-by: Dan Lester <[email protected]> Co-authored-by: jingx8885 <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: zmetry <[email protected]> * Fix aggregator rename in orchestrator workflow * Clean up requirements.txt in financial analyzer example (#231) * Update README.md * Update README.md * Distributed Tracing for Key Features: Agents, (asyncio) Workflows, AugmentedLLMs (#233) * Initial CLAUDE.md (#97) * Expose mcp-agent apps (MCPApp) as MCP servers (#112) * WIP app server changes * Some more WIP to get app server set up for workflows * WIP update app server * Updates to workflow * Simplify workflows to remove pause functionality. * The app server kinda sorta works! * Agent server is operational * Comment out cancellation * Update readme * feat: add max_concurrent_activities field to TemporalSettings * Adds Temporal workflow example and configuration Introduces an example demonstrating the use of Temporal as the execution engine for workflows. Enhances the MCPApp to support workflow registration and execution with Temporal. Add start_workflow and update start_worker in TemporalExecutor * fix: Run outside temporal sandbox environment to silence non-determinism errors * refactor: Rename list_workflows to list_workflow_statuses for clarity and add new list_workflows method * refactor: Register workflow in workflow registry even if not Temporal * refactor: Update SimpleWorkflow to inherit from Workflow class and clean up imports * feat: Add example secrets configuration for OpenAI and Anthropic APIs * feat: Add README example for Temporal workflow integration * fix: Handle event loop methods in Temporal workflow environment * feat: Initialise OpenAI client in init. Move completion api to separate function so it can be wrapped as activity * feat: Add timeout_seconds parameter to TemporalSettings for configurable timeouts * feat: Run basic agent in temporal example * feat: WIP to register essential acitivites in start_worker method and execute task as activities. * Promptify updates * feat: Make calling create_response activity work * feat: Update TemporalExecutor to handlie coroutines. Update logic to handle activity methods * WIP Pass agents to start_worker * minor restructurings to move files from root directory * feat: Refactor agent initialization and workflow execution in Temporal example * fix: Use same agent for run_worker.py and main.py in temporal_workflow_example so temporal workflow runs properly * fix: Adjust argument unpacking in TemporalExecutor to ensure proper function calls * feat: Add MCP server configurations for fetch and filesystem commands in Temporal workflow example * fix: Remove unused import of Agent in run_worker.py * Update MCPApp init and initialization to simplify decorator registration * Fixes for workflow_task decorator * Move gemini-specific helper into augmented_llm_google.py * minor updates * fix: Update input handling in temporal example * feat: Add Temporal workflow example with configuration, secrets, and worker script * fix: fix non-activity task execution handling in TemporalExecutor and update agent error handling in Orchestrator * Temp Checkpoint * Temp Checkpoint 2 * Temp Checkpoint 3 * Convert Agent to temporal-compliant version * feat: Add synthesizer agent to orchestrator * fix: Fix idling issues when running orchestrator with temporal. Update workflow task in example. * Convert AugmentedLLM and base implementations to temporal-compliant version * Basic temporal workflow works e2e! * Fix typo in activities list print statement * refactor: Simplify task execution checks in TemporalExecutor * fix: Fix 'Unable to serialize unknown type' issue when executing request_structured_completion_task * fix: fix Orchestrator initialization and set default value for server_names in AugmentedLLM * chore: Format lambda function and clean up deprecated comments in OpenAIAugmentedLLM * refactor: Move orchestrator initialization into the workflow and update worker setup in run_worker.py * fix: Update response model handling in OpenAIAugmentedLLM to use model path * fix: Validate structured response model in OpenAIAugmentedLLM * Add global workflow_task registry for unbound functions in places where MCPApp isn't available * Fix orchestrator workflow * Make orchestrator work for advanced example * fix: fix non-activity task execution handling in TemporalExecutor * fix: fix non-determinism error in Orchestrator when executing tasks in parallel * fix: update task execution in Temporal execute_many method to use list comprehension * Add lock to agent initialization * Revert orchestrator back to point that it works in temporal * refactor: move agents into the SimpleWorkflow example to fix non-determinism errors * Get all workflow patterns working, and consolidate all examples into temporal_workflow_example * MCP-Agent: MCP Puppeteer to enable Console based browsing (#137) * Creating an example mcp-agent using puppeteer * Add files via upload Adding the example browser mcp-agent * Adding gif to the README * Removing extra f for string without variables * feat: mcp_playwright_agent example - Updated (#156) * feat: add cleaned mcp_playwright_agent example * fix: remove unused result variable to pass linter * Restructuring the examples directory (#144) * Restructure examples directory into logical categories Organize examples into distinct categories: - basic: simple agents and basic examples - mcp: advanced capabilities of MCP-Agent - usecases: examples of use cases with MCP-Agent - model_providers: Azure, Bedrock, Google, Ollama connections - workflows: workflow patterns like router, swarm, etc. * Remove .DS_Store files from commits * Update paths in README and fix schema references in config files Fix relative paths in: - README.md: Update all example paths to point to new directory structure - Config files: Update schema references to point to the correct location - Test fixtures: Update README references to match new structure * Update scripts/example.py to work with new directory structure - Update list command to display examples by category - Modify run command to use path-style format (category/example_name) - Fix path resolution to ensure script runs from any directory - Update clean command to use path-style format as well * Updated restructuring of examples directory (#166) * Restructure examples directory with organized categories and fix config paths * Remove .DS_Store files from examples directory * Fixing broken links in the README (#167) * mv temporal_workflow_example -> temporal * Update session ID generation * fix: replace uuid with workflow.uuid4() for deterministic uuid * feat: add temporal basic agent server example * fix: await _execute_task in AsyncioExecutor for proper async execution * feat: Enable app_server to run temporal workflow * fix: Correct argument passing in temporal start_workflow and execute_workflow methods * fix: Update start_workflow and execute_workflow methods to use 'input' parameter; add UUID fallback in TemporalExecutor for generating UUID outside workflow. * refactor: Update BasicAgentWorkflow to use RunParams for input handling; clean up unused imports and commented code * Get basic agent server working in Claude Desktop, plus various fixes to orchestrator * Default uuid and random to regular implementation if there's any issue using the Temporal ones * feat: Update execute_workflow method to accept variable arguments; adjust workflow execution in Workflow class * feat: Implement SignalRegistry for centralized signal management; update workflow signal handling capabilities * feat: Add resume signal handling to BasicAgentWorkflow; simplify run method for testing purpose * Fix workflow registry usage for temporal * Fix workflow_mcp_server tool names * Fix OllamaAugmentedLLM impl * minor updates to workflow_mcp_server * fixing absolute path of server in basic/decorator/yaml (#181) * Upgrade mcp-agent to mcp v1.8.0, plus a few fixes * fix: Make LLMIntentClassifier.initialize() asynchronous (#184) * Fix parallel workflow schema (#188) * fix: Update _get_next_step method in orchestrator.py (#187) * add support for Azure Identity instead of keys (#190) * add support for Azure Identity instead of keys * make credential_scopes configurable, but with a default to `https://cognitiveservices.azure.com/.default` --------- Co-authored-by: Brian Caswell <[email protected]> * Add streamable HTTP support to mcp-agent (#193) * Add streamable HTTP support to mcp-agent * Session ID support for session resumption * Example to showcase streamable HTTP server support * fix: Conditionally include toolConfig in BedrockAugmentedLLM arguments (#192) * fix get prompt no return (#194) * Fix Azure client constructor * feature/distributed_tracing * Tracing logging to console and endpoint with example * [WIP] Adding tracing to agent * Human input * Call tool * Rename example to agent * Add image to example readme * Add tracing to mcp_aggregator * Augmented LLM starting point * Model selector * Fix openai instrumentation import * OpenAI LLM starting point * Openai llm generate * openai llm generate_structured * Anthropic LLM starting point * Anthropic generate request and otel gen_ai spec * Semconv for incubated gen ai * finish reasons * More semconv * Pull tracer config out of context, prep for file exporter * Implement and use SpanFileExporter * Distinguish jsonl filename patter for trace file * Proper jsonl file exporting for spans * Gen schema * Fix openai llm response message serialization * Finish anthropic llm tracing * Azure llm tracing. TODO for serialization * Comment out azure for now * Fix up @telemetry.traced() and use for executor * Wrap completion tasks for openai and anthropic * Pull _annotate_span_for_generation_message into AugmentedLLM * Remove unnecessary context import * Reusable attribute serialization & client session send_request * Fix MCPAgentClientSession ContextDependent init * Finish MCPAgentClientSession tracing * EvaluatorOptimizer generate * Finish evaluator optimizer * Intent classifier testing * Hold off on intent_classifier for now * Pull otlp endpoint into otlp_settings.endpoint for future extensibility * Workflow orchestrator test * Workflow orchestrator * LLM Intent classifier * Intent classifier embeddings * Parallel workflow * Router workflow start * Router workflow starting point * Don't shutdown proxy tracer provider (tracing disabled) * Delete old examples * Delete CLAUDE.md * Delete old example * Remove temporal dependency * Remove some old stuff * Minor updates for PR * Remove tracing cleanup * Fix optional agent instruction * Record exception for tool result exceptions * Changes from review; context_enabled flag and avoid some overhead using the flag * Another tracing_enabled check * Serialize available agents as list of string * fix lint * Address coderabbitai review comments * Remaining review comments --------- Co-authored-by: James Sedgwick <[email protected]> Co-authored-by: Sarmad Qadri <[email protected]> Co-authored-by: StreetLamb <[email protected]> Co-authored-by: Andrew Hoh <[email protected]> Co-authored-by: Haniehz1 <[email protected]> Co-authored-by: Romain Egele <[email protected]> Co-authored-by: cookabc <[email protected]> Co-authored-by: Dan Lester <[email protected]> Co-authored-by: jingx8885 <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: zmetry <[email protected]> * Adding a LLMS.txt for developers (#234) * Add MCP Supabase Migration Agent example (#235) Add MCP Supabase Migration Agent example * Propagate Trace Context to MCP SSE Servers (#241) * Propagate traceparent in ClientRequest and ClientNotification params._meta * Working example * Don't set notification params if not needed * Improve code coverage of mcp-agent (#215) * fix: Rename and update content conversion functions for OpenAI integration * Refactor LLM provider tests and remove outdated event progress test - Deleted the `test_event_progress.py` file as it is no longer needed. - Added a new README.md file in the LLM tests directory to document test coverage and usage. - Created a `conftest.py` file for shared fixtures used across LLM provider tests. - Implemented comprehensive tests for the `OpenAIAugmentedLLM` class, covering various functionalities including text generation, structured output, tool usage, error handling, and request parameter merging. * add support for Azure Identity instead of keys (#190) * add support for Azure Identity instead of keys * make credential_scopes configurable, but with a default to `https://cognitiveservices.azure.com/.default` --------- Co-authored-by: Brian Caswell <[email protected]> * Add streamable HTTP support to mcp-agent (#193) * Add streamable HTTP support to mcp-agent * Session ID support for session resumption * Example to showcase streamable HTTP server support * fix: Conditionally include toolConfig in BedrockAugmentedLLM arguments (#192) * fix get prompt no return (#194) * fix: Remove unused imports from test_augmented_llm_openai.py * test: Add comprehensive tests for AzureAugmentedLLM functionality * feat: Add pytest-cov for test coverage reporting * fix: Update installation instructions in README * fix: Set model to an empty string in MCPAzureTypeConverter * fix: Update coverage command examples in README for clarity * fix: Correct bedrock content and mcp message param handling in BedrockMCPTypeConverter * test: Add comprehensive tests for BedrockAugmentedLLM functionality * fix: correct role handling and set model to empty string in GoogleMCPTypeConverter * test: Add comprehensive tests for GoogleAugmentedLLM functionality * refactor: Update import statement for OpenAI in OllamaAugmentedLLM * test: Add unit tests for OllamaAugmentedLLM functionality * fix: enable content conversion handling for pydantic models and dict blocks in anthropic_content_to_mcp_content * test: Enhance tests for AnthropicAugmentedLLM * test: Add unit tests for Agent class and mock fixtures * test: Add comprehensive unit tests for MCPApp class functionality * test: Add unit tests for OpenAIEmbeddingIntentClassifier and CohereEmbeddingIntentClassifier * test: Add unit tests for OpenAILLMIntentClassifier and AnthropicLLMIntentClassifier functionality * test: Add tests for orchestrator workflow module - Created test package for orchestrator workflow module. - Implemented unit tests for orchestrator methods, including initialization and execution of plans. - Added integration tests for full and iterative workflow executions. - Developed tests for orchestrator data models and prompt templates. - Ensured comprehensive coverage of task, step, and plan result formatting. * fix: Validate plan_type in Orchestrator constructor to ensure it is either 'full' or 'iterative' * test: Add unit tests for FanOut and ParallelLLM classes * test: Add tests for embedding routers and llm routers * fix: Await embedding computation in EmbeddingRouter and fix EmeddingRouter initialize method. Awaits the embedding computation to ensure proper asynchronous handling. Updates the initialization of EmbeddingRouterCategory to use model_dump for correct category representation. * test: Add unit tests for swarm workflows * fix: Change AgentFunctionResult to AgentFunctionResultResource in Swarm post_tool_call method * test: Add tests for workflow signals * fix: Generate unique signal name in AsyncioSignalHandler * test: Add tests for MCPAggregator * fix: Reset initialized flag in MCPAggregator when connection persistence is disabled. Fix ListToolsResult in list_tools method. Ensure order of server names in _parse_capability_name method * fix: Add trio dependency for 'dev' * test: Add tests for MCPConnectionManager * fix: Improve error handling and tool call execution in AzureAugmentedLLM * test: Add additional tests for AzureAugmentedLLM * fix: Update import paths for Context and ServerRegistry * fix: Update validators in NestedLocation and ComplexModel to use class methods * fix: Update agent tests due to changes in agents.py * fix: Initialize event queue in AsyncEventBus constructor * fix: Update MCPApp tests * fix: Improve PydanticTypeSerializer serializing and deserializing logic * fix: Update PydanticTypeSerializer tests * fix: Remove unused AsyncMock import and update LLM instantiation in tests * fix: Fix broken AzureAugmentedLLM tests * fix: Conditionally pass instruction to Agent only if not None * fix: fix broken AnthropicAugmentedLLM tests * fix: fix broken openai and google tests * fix: fix broken BedrockAugmentedLLM tests * fix: update broken OllamaAugmentedLLM tests * fix: initialize synthesizer in Orchestrator and correct typo in generate_str call * fix: update broken orchestrator tests * fix: update broken orchestrator and fan out tests * fix: update mocks to fix router tests * fix: remove unused imports and clean up test files * fix: update broken swarm tests * fix: set default values for server_names and functions in SwarmAgent * test: add unit tests for TemporalSignalHandler, TemporalExecutor, and TemporalWorkflowRegistry * test: add unit tests for WorkflowState, WorkflowResult and Workflow classes * test: add unit tests for EvaluatorOptimizerLLM and related components * test: update mock_context to include tracer attributes in various tests * fix: Ensure private attributes are initialized in PydanticTypeSerializer * fix: Update response usage access to dictionary format in AzureAugmentedLLM * fix: Correct typo in synthesizer method call in Orchestrator class * fix: Append ToolMessage results to responses in AzureAugmentedLLM * refactor: Remove unused imports from test fixtures in conftest.py and test_parallel_llm.py * fix: Move pytest-cov dependency to the correct section in pyproject.toml * refactor: Improve embedding generation in MockEmbeddingModel for better randomness * fix: Update default parameters for server_names and functions in SwarmAgent to avoid mutable default arguments * fix: Update import paths in test_mcp_connection_manager.py to remove 'src.' prefix * test: Add test_resume_workflow_signal_error test case * fix: Add explicit assertions for workflow state transitions in test_run_async_asyncio * refactor: Simplify ParallelLLM fixture setup and improve assertions in tests * fix: Improve randomness in mock embedding generation and enhance assertion for result validation * fix: Make embed_side_effect an async coroutine to honour the protocol * fix: Await asynchronous mock methods in MockAugmentedLLM class * fix: Add agent_name to CallToolRequest in test_swarm for improved context * fix: Refactor test_call_tool methods to use real SwarmAgent instance and improve context handling * fix: Initialize context in TestSwarmAgent * fix: Update content formatting in OpenAIAugmentedLLM to use list comprehension * fix: Remove unused mock_aggregator fixture from LLM test classes * fix: Handle non-JSON-serialisable Literal values in PydanticTypeSerializer to avoid runtime TypeError * fix: Preserve compatibility with Pydantic v1 for handling of required field information in PydanticTypeSerializer * fix: Remove mock_context fixture and update tests to use Context directly * fix: Refactor initialization tests for OllamaAugmentedLLM to improve clarity and structure * fix: Refactor DummyClient to DummyRegistry for non-persistent session handling in tests --------- Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Sarmad Qadri <[email protected]> Co-authored-by: zmetry <[email protected]> * Update uv.lock * feat: Add additional OpenAI LLM config options (#242) * Update config schema * Get rid of example.py * Get rid of goosehints (unused) * formatter updates * Update gitignore * Update promptify script * Add a makefile for common commands * Update CONTRIBUTING.md * Add tests to GH workflows * Fix local mcp-agent reference in mcp_agent_server examples * update model benchmarks for dynamic model selection * Add uv sync to example readme instructions * Fix trace span creation for openai * Implement Reliable Conversation Manager: Research-based multi-turn conversation quality control (#243) * phase 1 with basic e2e test working * lots of ux for test_basic.py * main.py REPL and doc cleanup * cleanup; * lint/format * move paper * remove problematic __init__.py breaking tests * convert basic reliable conversation test to pytest for coverage * lint --------- Co-authored-by: James Sedgwick <[email protected]> * Update mcp-agent logo * Move reliable_conversation example into usecases * Bump pyproject version * Remove unnecessary call to init_queue in AsyncEventBus constructor (#249) * Add TLS to temporal settings (#251) * Bump pyproject version * Update README.md for financial analyzer example * fixing mcp_browser_agent readme (#254) * Fix BedrockAugmentedLLM config and generate_structured() (#253) * Fixing diagram on README for Financial Analyzer (#246) * Make MCPConnectionManager and MCPAggregator close/exit more resilient to distributed environments * Remove MCPAgentDecorator (unused) * Adapters for LangChain and CrewAI tools (#260) * Create sample_report.md (#262) * fix(google): Exclude 'additionalProperties' from tool schema (#263) * Update pyproject.toml * Set llm agent to self in attach llm (#266) * Update pyproject.toml * Set llm instruction in attach llm (#268) * feat: Support mcp resources and prompts (#244) * Add resource management to MCPAggregator and Agent classes - Introduced methods for listing and reading resources from MCP servers. - Enhanced MCPAggregator to handle resource mapping and initialization. - Updated Agent class to utilize new resource functionalities. * Update MCPAggregator to fetch resources using URI * Add utility modules for content and resource handling * Add resource URI parameter to LLM generation methods in AugmentedLLM and OpenAIAugmentedLLM * Fix type conversion for resource URI in MCPAggregator * Add basic example to showcase using mcp resources * Refactor resource URI handling in AugmentedLLM and OpenAIAugmentedLLM to support multiple URIs * Enhance MCP Primitives example to demonstrate resource usage and server setup * Add OpenAIConverter class for converting MCP message types to OpenAI API format * Add AnthropicConverter for converting MCP message types to Anthropic API format * Add PromptMessageMultipart class for handling multiple content parts in messages * Add resource_uris parameter to generate_str and related methods in AnthropicAugmentedLLM * Add resource_uris parameter to generate methods in BedrockAugmentedLLM and implement resource handling * Add resource handling in AzureAugmentedLLM and implement AzureConverter for multipart message conversion * Add resource handling and GoogleConverter for multipart message conversion in GoogleAugmentedLLM * Add resource_uris parameter to generate_structured method in OllamaAugmentedLLM * Refactor resource handling in LLM classes to use attached resources instead of resource_uris * Add prompt attachment functionality to LLM classes and update message handling * Add demo server implementation with resource and prompt handling * Update README to include prompts in MCP primitives example * Refactor settings in main.py * Refactor LLM message handling to integrate PromptMessage support and remove unused prompt/resource attachment methods * Remove unused settings and health status resources from demo server; add weather report functionality and update main.py to handle resource and prompt messages. * Refactor and add comments in example * Refactor assertion in TestAnthropicAugmentedLLM to improve readability * Add create_prompt method to generate prompt messages from names and resources; remove get_resource_messages and get_prompt_messages methods * Update README and main.py to reflect changes in resource and prompt retrieval using create_prompt method * Enhance MCPAggregator to return resources alongside tools and prompts; update tests to validate resource handling. * Add comprehensive tests for MIME utilities and multipart converters * Refactor resource URI handling to use AnyUrl for improved type safety in create_embedded_resource, create_blob_resource, and create_text_resource functions. * Fix exception class docstring and update file tags in OpenAIConverter to use mcp-agent prefix * Add comprehensive tests for Azure, Bedrock, and Google multipart converters * Minor code formatting * Add tests for generating responses with various input types in AugmentedLLMs * Refactor message conversion methods to use unified mixed message handling across Anthropic, Azure, Bedrock, Google, and OpenAI converters * Refactor message tracing logic in AugmentedLLM to simplify attribute extraction for different message types * Minor formatting * Refactor AzureConverter tests to assert list content structure for text and image conversions * Fix potential issues raised by coderabbitai * Refactor URI handling to use str() for better compatibility and clarity; update example usage and tests accordingly. * Refactor URI handling in Azure and Google converters to use str() for improved compatibility; update tests to reflect changes in role assignments and message structures. * Remove unnecessary import of AnyUrl in test_create_fallback_text_with_uri * Refactor server name handling in Agent class to support multiple server names; update related logic for prompt and resource retrieval. Enhance MIME utilities docstring for clarity; * Update resource handling in Agent class; clear and update namespaced resource map. Modify read_resource method signature to include return type. * Guard concurrent writes in MCPAggregator with consistent lock usage * Format and lint tests * fix: Correct ordering of parameter handling in _create_function_from_schema (#271) * Add LangChain and CrewAI tool adapter example (#270) * feat: Add langchain tool integration example with Serper API * feat: Add CrewAI tools integration example * fix: Correct schema path in mcp_agent configuration and secrets example * Update examples/langchain/README.md Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * Update examples/langchain/main.py Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * fix: Remove unnecessary API key initialization for GoogleSerperAPIWrapper --------- Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> --------- Co-authored-by: HaniehZ <[email protected]> Co-authored-by: Sarmad Qadri <[email protected]> Co-authored-by: James Sedgwick <[email protected]> Co-authored-by: Andrew Hoh <[email protected]> Co-authored-by: Romain Egele <[email protected]> Co-authored-by: cookabc <[email protected]> Co-authored-by: Dan Lester <[email protected]> Co-authored-by: jingx8885 <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: Brian Caswell <[email protected]> Co-authored-by: zmetry <[email protected]> Co-authored-by: Ryan Holinshead <[email protected]> Co-authored-by: Torben Tretau <[email protected]> Co-authored-by: James Sedgwick <[email protected]> Co-authored-by: kawolum <[email protected]> Co-authored-by: JunHo, Jeon <[email protected]> Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Updated the diagram for the README
Summary by CodeRabbit