Skip to content

Commit f208efb

Browse files
committed
Update Blog “llm-agentic-tool-mesh-orchestrating-agentic-tools-for-the-next-revolution”
1 parent 09d5c63 commit f208efb

File tree

1 file changed

+84
-49
lines changed

1 file changed

+84
-49
lines changed

content/blog/llm-agentic-tool-mesh-orchestrating-agentic-tools-for-the-next-revolution.md

Lines changed: 84 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ Let's explore each of these components in detail.
3030

3131
The Tool Client Service enables developers to transform any code function into an LLM Agentic Tool Mesh tool by applying a simple decorator. This service abstracts the complexities of tool integration, allowing for quick conversion of functions into reusable tools within the LLM Agentic Tool Mesh ecosystem.
3232

33-
Key Features:
33+
Key features:
3434

35-
* Decorator-Based: Convert functions into tools using the `@AthonTool` decorator.
36-
* Seamless Integration: Decorated functions are fully integrated into the LL-Mesh platform.
35+
* Decorator-based: Convert functions into tools using the `@AthonTool` decorator.
36+
* Seamless integration: Decorated functions are fully integrated into the LLM Agentic Tool Mesh platform.
3737

38-
Example Usage:
38+
Example usage:
3939

4040
```python
4141
from athon.system import AthonTool, Logger
@@ -56,65 +56,100 @@ def hello_world(query: str) -> str:
5656

5757
The Tool Server Service provides the necessary infrastructure to manage and run LLM Agentic Tool Mesh tools on the platform. It includes capabilities for tool discovery and execution, ensuring that tools are easily accessible and efficiently managed.
5858

59-
Key Features:
59+
Key features:
6060

61-
* Tool Discovery: Automatically discover tools within the platform.
62-
* Execution Management: Manage the execution of tools, ensuring efficient operation.
61+
* Tool discovery: Automatically discover tools within the platform.
62+
* Execution management: Manage the execution of tools, ensuring efficient operation.
6363

6464
![](/img/tools.png)
6565

66-
Example Usage:
66+
Example usage:
6767

6868
```python
69-
70-
from athon.agents import ToolRepository
69+
from athon.agents import ToolRepository
7170
from athon.system import ToolDiscovery
7271

73-
74-
75-
projects_config = [
76-
{
77-
"name": "Simple Project",
78-
"tools": [
79-
"examples/local_tool", # A local tool path
80-
"https://127.0.0.1:5003/", # A remote tool URL
81-
]
82-
}
83-
]
84-
tools_config = {
85-
"type": "LangChainStructured"
72+
projects_config = [
73+
{
74+
"name": "Simple Project",
75+
"tools": [
76+
"examples/local_tool", # A local tool path
77+
"https://127.0.0.1:5003/", # A remote tool URL
78+
]
79+
}
80+
]
81+
tools_config = {
82+
"type": "LangChainStructured"
8683
}
8784

88-
89-
90-
def discover_and_load_tools(projects_config, tools_config):
91-
tool_repository = ToolRepository.create(tools_config)
92-
tool_discovery = ToolDiscovery()
93-
tool_id_counter = 1
94-
95-
for project in projects_config:
96-
for tool_reference in project["tools"]:
97-
tool_info = tool_discovery.discover_tool(tool_reference)
98-
if tool_info:
99-
tool_metadata = {
100-
"id": tool_id_counter,
101-
"project": project["name"],
102-
"name": tool_info["name"],
103-
"interface": tool_info.get("interface")
104-
}
105-
tool_repository.add_tool(tool_info["tool"], tool_metadata)
106-
tool_id_counter += 1
107-
85+
def discover_and_load_tools(projects_config, tools_config):
86+
tool_repository = ToolRepository.create(tools_config)
87+
tool_discovery = ToolDiscovery()
88+
tool_id_counter = 1
89+
90+
for project in projects_config:
91+
for tool_reference in project["tools"]:
92+
tool_info = tool_discovery.discover_tool(tool_reference)
93+
if tool_info:
94+
tool_metadata = {
95+
"id": tool_id_counter,
96+
"project": project["name"],
97+
"name": tool_info["name"],
98+
"interface": tool_info.get("interface")
99+
}
100+
tool_repository.add_tool(tool_info["tool"], tool_metadata)
101+
tool_id_counter += 1
102+
108103
return tool_repository
109104

105+
# Run the tool discovery and loading process
106+
tool_repository = discover_and_load_tools(projects_config, tools_config)
107+
108+
# Display the discovered tools
109+
for tool in tool_repository.get_tools().tools:
110+
print(f"Discovered tool: {tool['name']} from project: {tool['metadata']['project']}")
111+
```
112+
113+
# LLM Agentic Tool Mesh in action: Building a mesh of LLM Agentic Tools
114+
110115

116+
We have developed a series of web applications and tools, complete with examples, to demonstrate the capabilities of LLM Agentic Tool Mesh.
117+
111118

112-
# Run the tool discovery and loading process
113-
tool_repository = discover_and_load_tools(projects_config, tools_config)
119+
Web Applications
120+
121+
* Chatbot (`examples/app_chatbot`): A chatbot capable of reasoning and invoking appropriate LLM tools to perform specific actions. You can configure the chatbot using files that define LM Agentic Tool Mesh platform services, project settings, toolkits, and memory configurations. The web app orchestrates both local and remote LLM tools, allowing them to define their own HTML interfaces, supporting text, images, and code presentations.
122+
* Admin panel (`examples/app_backpanel`): An admin panel that enables the configuration of basic LLM tools to perform actions via LLM calls. It allows you to set the system prompt, select the LLM model, and define the LLM tool interface, simplifying the process of configuring LLM tool interfaces.
123+
124+
Tools
114125

115126

127+
* Basic Copywriter (`examples/tool_copywriter`): A tool that rewrites text, providing explanations for enhancements and changes.
128+
* Temperature Finder (`examples/tool_api`): Fetches and displays the current temperature for a specified location by utilizing a public API.
129+
* Temperature Analyzer (examples/tool_analyzer): Generates code using a language model to analyze historical temperature data and create visual charts for better understanding.
130+
* Telco Expert (`examples/tool_rag`): A RAG tool that provides quick and accurate access to 5G specifications.
131+
* OpenAPI Manager (`examples/tool_agents`): A multi-agent tool that reads OpenAPI documentation and provides users with relevant information based on their queries.
132+
116133

117-
# Display the discovered tools
118-
for tool in tool_repository.get_tools().tools:
119-
print(f"Discovered tool: {tool['name']} from project: {tool['metadata']['project']}")
120-
```
134+
Running the Examples:
135+
You can run the tools and web applications individually or use the provided run_examples.sh script to run them all together. Once everything is started:
136+
• Access the Chatbot App at https://127.0.0.1:5001/.
137+
• Access the Admin Panel at https://127.0.0.1:5011/.
138+
Configuring the LLM Model:
139+
Depending on the LLM you are using, update the configuration files accordingly.
140+
• For OpenAI's ChatGPT:
141+
• # LLM settings
142+
• type: LangChainChatOpenAI
143+
• model_name: gpt-4
144+
• api_key: $ENV{OPENAI_API_KEY}
145+
• temperature: 0
146+
• seed: 42
147+
• For Internal Models:
148+
• # LLM settings
149+
• type: LangChainAzureChatOpenAI
150+
• azure_deployment: $ENV{HPE_DEPLOYMENT}
151+
• api_version: "2023-10-01-preview"
152+
• endpoint: $ENV{HPE_ENDPOINT}
153+
• api_key: $ENV{HPE_API_KEY}
154+
• temperature: 0
155+
• seed: 42

0 commit comments

Comments
 (0)