forked from lastmile-ai/mcp-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAgent_Core_LLM_Integration.json
More file actions
141 lines (141 loc) · 7.1 KB
/
Agent_Core_LLM_Integration.json
File metadata and controls
141 lines (141 loc) · 7.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
"description": "This subsystem defines the fundamental interface and capabilities of an AI agent, encapsulating interactions with Large Language Models (LLMs), external tools, prompts, and resources. It provides a consistent and extensible model for agent behavior and offers a standardized, augmented interface for interacting with various LLM providers.",
"components": [
{
"name": "Agent Core",
"description": "This is the foundational interface for all AI agents within the `mcp-agent` framework. It defines the core capabilities and interaction points of an agent, serving as the base for more specialized agent types. It encapsulates the agent's logic, its interaction with LLMs, and its ability to utilize external tools and resources.",
"referenced_source_code": [
{
"qualified_name": "mcp_agent.agents.agent.Agent",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/agents/agent.py",
"reference_start_line": 56,
"reference_end_line": 934
}
]
},
{
"name": "Augmented LLM Interface",
"description": "This abstract component provides a unified and enhanced interface for interacting with different LLM providers. It abstracts away the vendor-specific details of LLM APIs, allowing the rest of the framework to interact with LLMs in a consistent manner, regardless of the underlying provider. It supports various LLM operations, including completion and structured completion requests.",
"referenced_source_code": [
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm.AugmentedLLM",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm.py",
"reference_start_line": 218,
"reference_end_line": 668
}
]
},
{
"name": "LLM Selector",
"description": "This component is responsible for intelligently selecting the most suitable LLM model for a given task. It considers various criteria such as cost, latency, and performance benchmarks to make informed decisions, optimizing resource utilization and response quality.",
"referenced_source_code": [
{
"qualified_name": "mcp_agent.workflows.llm.llm_selector.ModelSelector",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/llm_selector.py",
"reference_start_line": 96,
"reference_end_line": 413
}
]
},
{
"name": "LLM Provider Implementations",
"description": "These are concrete implementations of the `Augmented LLM Interface`, providing the actual connectivity and interaction logic for specific LLM providers (e.g., Anthropic, Azure, Bedrock, Google, OpenAI, Ollama). Each implementation handles the nuances of its respective LLM API and translates requests and responses to and from the framework's internal format.",
"referenced_source_code": [
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_anthropic.AnthropicAugmentedLLM",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_anthropic.py",
"reference_start_line": 110,
"reference_end_line": 722
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_azure.AzureAugmentedLLM",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_azure.py",
"reference_start_line": 82,
"reference_end_line": 491
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_bedrock.BedrockAugmentedLLM",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_bedrock.py",
"reference_start_line": 48,
"reference_end_line": 349
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_google.GoogleAugmentedLLM",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_google.py",
"reference_start_line": 34,
"reference_end_line": 319
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_ollama.OllamaAugmentedLLM",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_ollama.py",
"reference_start_line": 16,
"reference_end_line": 78
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_openai.OpenAIAugmentedLLM",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_openai.py",
"reference_start_line": 80,
"reference_end_line": 845
}
]
},
{
"name": "Provider to MCP Converters",
"description": "These utility classes are crucial for ensuring data consistency and interoperability across different LLM providers. They are responsible for converting provider-specific data structures (e.g., Anthropic's messages, OpenAI's chat completions) into the framework's standardized Model Context Protocol (MCP) types.",
"referenced_source_code": [
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_anthropic.AnthropicMCPTypeConverter",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_anthropic.py",
"reference_start_line": 777,
"reference_end_line": 886
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_azure.MCPAzureTypeConverter",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_azure.py",
"reference_start_line": 524,
"reference_end_line": 614
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_bedrock.BedrockMCPTypeConverter",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_bedrock.py",
"reference_start_line": 437,
"reference_end_line": 499
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_google.GoogleMCPTypeConverter",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_google.py",
"reference_start_line": 403,
"reference_end_line": 518
},
{
"qualified_name": "mcp_agent.workflows.llm.augmented_llm_openai.MCPOpenAITypeConverter",
"reference_file": "/mnt/e/StartUp/mcp-agent/src/mcp_agent/workflows/llm/augmented_llm_openai.py",
"reference_start_line": 949,
"reference_end_line": 1055
}
]
}
],
"components_relations": [
{
"relation": "uses",
"src_name": "Agent Core",
"dst_name": "Augmented LLM Interface"
},
{
"relation": "uses",
"src_name": "Augmented LLM Interface",
"dst_name": "LLM Selector"
},
{
"relation": "implements",
"src_name": "LLM Provider Implementations",
"dst_name": "Augmented LLM Interface"
},
{
"relation": "uses",
"src_name": "LLM Provider Implementations",
"dst_name": "Provider to MCP Converters"
}
]
}