|
1 | 1 | { |
2 | | - "description": "The `Agent Core` subsystem is the central orchestrator within the `mcp-use` framework, responsible for the agent's decision-making, lifecycle, and overall execution flow. It integrates various components to interact with the external environment and manage its operational state.", |
| 2 | + "description": "The Agent Core subsystem is the central intelligence unit responsible for orchestrating AI agent behavior, managing conversation flow, and coordinating tool usage within the mcp_use project. It is primarily encapsulated within the mcp_use.agents package.", |
3 | 3 | "components": [ |
4 | 4 | { |
5 | | - "name": "Agent Core", |
6 | | - "description": "The primary intelligence and orchestration unit. It manages the agent's lifecycle, decision-making processes, and coordinates interactions with other components to execute tasks and communicate with external services.", |
| 5 | + "name": "MCPAgent", |
| 6 | + "description": "The central orchestrator and concrete implementation of an AI agent. It manages the agent's reasoning loop, maintains conversation history, integrates with Large Language Models (LLMs), handles tool execution, and processes structured outputs. It embodies the core intelligence and operational flow of the agent.", |
7 | 7 | "referenced_source_code": [ |
8 | 8 | { |
9 | 9 | "qualified_name": "mcp_use.agents.mcpagent.MCPAgent", |
10 | | - "reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/agents/mcpagent.py", |
11 | | - "reference_start_line": 1, |
12 | | - "reference_end_line": 1 |
| 10 | + "reference_file": "/home/ubuntu/CodeBoarding/repo/mcp-use/mcp_use/agents/mcpagent.py", |
| 11 | + "reference_start_line": 44, |
| 12 | + "reference_end_line": 1011 |
13 | 13 | } |
14 | | - ] |
| 14 | + ], |
| 15 | + "can_expand": true |
15 | 16 | }, |
16 | 17 | { |
17 | | - "name": "Base Agent", |
18 | | - "description": "Provides the foundational structure and common functionalities for all agents within the framework. It serves as an abstract base class that `Agent Core` extends.", |
| 18 | + "name": "BaseAgent", |
| 19 | + "description": "An abstract base class that defines the foundational interface and common behaviors for all agents within the framework. It establishes a contract for agent lifecycle management (e.g., initialization, execution, querying) and state tracking (e.g., maximum steps, previous steps).", |
19 | 20 | "referenced_source_code": [ |
20 | 21 | { |
21 | 22 | "qualified_name": "mcp_use.agents.base.BaseAgent", |
22 | | - "reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/agents/base.py", |
23 | | - "reference_start_line": 1, |
24 | | - "reference_end_line": 1 |
| 23 | + "reference_file": "/home/ubuntu/CodeBoarding/repo/mcp-use/mcp_use/agents/base.py", |
| 24 | + "reference_start_line": 13, |
| 25 | + "reference_end_line": 61 |
25 | 26 | } |
26 | | - ] |
| 27 | + ], |
| 28 | + "can_expand": true |
27 | 29 | }, |
28 | 30 | { |
29 | | - "name": "MCP Server Registry/Connector", |
30 | | - "description": "Manages connections and interactions with various MCP (Multi-Agent Communication Protocol) servers. It acts as an interface for the `Agent Core` to discover and communicate with available services.", |
| 31 | + "name": "SystemPromptBuilder", |
| 32 | + "description": "A utility component responsible for dynamically constructing the system prompt provided to the LLM. It incorporates descriptions of available tools, additional instructions, and selects appropriate prompt templates based on the agent's configuration.", |
31 | 33 | "referenced_source_code": [ |
32 | 34 | { |
33 | | - "qualified_name": "mcp_use.managers.server_manager.ServerManager", |
34 | | - "reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/managers/server_manager.py", |
35 | | - "reference_start_line": 16, |
36 | | - "reference_end_line": 89 |
37 | | - } |
38 | | - ] |
39 | | - }, |
40 | | - { |
41 | | - "name": "LLM Integration Layer", |
42 | | - "description": "Facilitates the processing of outputs from Large Language Models (LLMs) and integrates with LangChain-based tools. It acts as an adapter, translating agent requests into LLM-compatible formats and vice-versa.", |
43 | | - "referenced_source_code": [ |
44 | | - { |
45 | | - "qualified_name": "mcp_use.adapters.langchain_adapter.LangChainAdapter", |
46 | | - "reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/adapters/langchain_adapter.py", |
| 35 | + "qualified_name": "mcp_use.agents.prompts.system_prompt_builder.SystemPromptBuilder", |
| 36 | + "reference_file": "/home/ubuntu/CodeBoarding/repo/mcp-use/mcp_use/agents/prompts/system_prompt_builder.py", |
47 | 37 | "reference_start_line": 1, |
48 | | - "reference_end_line": 1 |
| 38 | + "reference_end_line": 1000 |
49 | 39 | } |
50 | | - ] |
| 40 | + ], |
| 41 | + "can_expand": true |
51 | 42 | }, |
52 | 43 | { |
53 | | - "name": "Telemetry", |
54 | | - "description": "Responsible for emitting telemetry events, providing insights into the agent's operational status, performance, and interactions. This component supports observability within the `Agent Core` subsystem.", |
| 44 | + "name": "RemoteAgent", |
| 45 | + "description": "A specialized agent implementation or a component that facilitates communication with external, remotely hosted agent services. It handles the serialization of requests, deserialization of responses, and manages underlying network interactions (e.g., API keys, base URLs). It also includes logic for parsing structured output received from remote services.", |
55 | 46 | "referenced_source_code": [ |
56 | 47 | { |
57 | | - "qualified_name": "mcp_use.telemetry.telemetry.Telemetry", |
58 | | - "reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/telemetry/telemetry.py", |
59 | | - "reference_start_line": 55, |
60 | | - "reference_end_line": 305 |
| 48 | + "qualified_name": "mcp_use.agents.remote.RemoteAgent", |
| 49 | + "reference_file": "/home/ubuntu/CodeBoarding/repo/mcp-use/mcp_use/agents/remote.py", |
| 50 | + "reference_start_line": 18, |
| 51 | + "reference_end_line": 239 |
61 | 52 | } |
62 | | - ] |
63 | | - }, |
64 | | - { |
65 | | - "name": "MCP Session", |
66 | | - "description": "Manages the state and context of an agent's session. It encapsulates session-specific data and provides mechanisms for maintaining continuity across interactions.", |
67 | | - "referenced_source_code": [ |
68 | | - { |
69 | | - "qualified_name": "mcp_use.session.MCPSession", |
70 | | - "reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/session.py", |
71 | | - "reference_start_line": 1, |
72 | | - "reference_end_line": 1 |
73 | | - } |
74 | | - ] |
| 53 | + ], |
| 54 | + "can_expand": true |
75 | 55 | } |
76 | 56 | ], |
77 | 57 | "components_relations": [ |
78 | 58 | { |
79 | | - "relation": "uses", |
80 | | - "src_name": "Agent Core", |
81 | | - "dst_name": "MCP Server Registry/Connector" |
82 | | - }, |
83 | | - { |
84 | | - "relation": "uses", |
85 | | - "src_name": "Agent Core", |
86 | | - "dst_name": "LLM Integration Layer" |
| 59 | + "relation": "inherits from", |
| 60 | + "src_name": "MCPAgent", |
| 61 | + "dst_name": "BaseAgent" |
87 | 62 | }, |
88 | 63 | { |
89 | 64 | "relation": "uses", |
90 | | - "src_name": "Agent Core", |
91 | | - "dst_name": "Telemetry" |
| 65 | + "src_name": "MCPAgent", |
| 66 | + "dst_name": "SystemPromptBuilder" |
92 | 67 | }, |
93 | 68 | { |
94 | | - "relation": "is related to", |
95 | | - "src_name": "Agent Core", |
96 | | - "dst_name": "MCP Session" |
97 | | - }, |
98 | | - { |
99 | | - "relation": "inherits from", |
100 | | - "src_name": "Agent Core", |
101 | | - "dst_name": "Base Agent" |
| 69 | + "relation": "delegates to", |
| 70 | + "src_name": "MCPAgent", |
| 71 | + "dst_name": "RemoteAgent" |
102 | 72 | } |
103 | 73 | ] |
104 | 74 | } |
0 commit comments