Skip to content

Commit 283b5db

Browse files
authored
Merge pull request #2879 from antfin/cms/antfin/hpe-dev-portal/blog/llm-agentic-tool-mesh-orchestrating-agentic-tools-for-the-next-revolution
Create Blog “llm-agentic-tool-mesh-orchestrating-agentic-tools-for-the-next-revolution”
2 parents cac7af7 + ff61fbf commit 283b5db

File tree

4 files changed

+195
-0
lines changed

4 files changed

+195
-0
lines changed
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
title: "LLM Agentic Tool Mesh: Orchestrating agentic tools for the AI revolution"
3+
date: 2025-01-20T08:36:14.226Z
4+
author: Antonio Fin
5+
authorimage: /img/afin_photo.jpg
6+
disable: false
7+
tags:
8+
- HPE
9+
- GenAI
10+
- LAT-Mesh
11+
---
12+
<style>
13+
li {
14+
font-size: 27px !important;
15+
line-height: 33px !important;
16+
max-width: none !important;
17+
}
18+
</style>
19+
20+
In my previous blog posts, I dolve into the [Chat Service](https://developer.hpe.com/blog/ll-mesh-exploring-chat-service-and-factory-design-pattern/), [Agent Service](https://developer.hpe.com/blog/llm-agentic-tool-mesh-harnessing-agent-services-and-multi-agent-ai-for-next-level-gen-ai/), and [RAG Service](https://developer.hpe.com/blog/llm-agentic-tool-mesh-empowering-gen-ai-with-retrieval-augmented-generation-rag/) of [LLM Agentic Tool Mesh open source project](https://github.com/HewlettPackard/llmesh). Today, I'll explore the system services of LLM Agentic Tool Mesh, which are essential for managing and orchestrating the mesh of agentic tools.
21+
22+
I'll provide insights into these services, showcase an example of a Mesh available in the repository, discuss federated governance, and share our vision for the future evolution of the LLM Agentic Tool Mesh project.
23+
24+
![](/img/mesh.png)
25+
26+
# Understanding the system services
27+
28+
The system services in LLM Agentic Tool Mesh are crucial for the seamless operation and orchestration of agentic tools and web applications. These services ensure consistency, ease of use, and flexibility across the platform. They include:
29+
30+
1. **Tool Client Service**
31+
2. **Tool Server Service**
32+
33+
Let's explore each of these components in detail.
34+
35+
## Tool Client Service
36+
37+
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.
38+
39+
Key features:
40+
41+
* Decorator-based: Convert functions into tools using the `@AthonTool` decorator
42+
* Seamless integration: Decorated functions are fully integrated into the LLM Agentic Tool Mesh platform
43+
44+
Example usage:
45+
46+
```python
47+
from athon.system import AthonTool, Logger
48+
49+
config = {
50+
"greetings": "Hello World! Welcome, "
51+
}
52+
logger = Logger().get_logger()
53+
54+
@AthonTool(config, logger)
55+
def hello_world(query: str) -> str:
56+
"""Greets the user."""
57+
greeting_message = f"{config['greetings']} {query}!"
58+
return greeting_message.capitalize()
59+
```
60+
61+
## Tool Server Service
62+
63+
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.
64+
65+
Key features:
66+
67+
* Tool discovery: Automatically discover tools within the platform
68+
* Execution management: Manage the execution of tools, ensuring efficient operation
69+
70+
![](/img/tools.png)
71+
72+
Example usage:
73+
74+
```python
75+
from athon.agents import ToolRepository
76+
from athon.system import ToolDiscovery
77+
78+
projects_config = [
79+
{
80+
"name": "Simple Project",
81+
"tools": [
82+
"examples/local_tool", # A local tool path
83+
"https://127.0.0.1:5003/", # A remote tool URL
84+
]
85+
}
86+
]
87+
tools_config = {
88+
"type": "LangChainStructured"
89+
}
90+
91+
def discover_and_load_tools(projects_config, tools_config):
92+
tool_repository = ToolRepository.create(tools_config)
93+
tool_discovery = ToolDiscovery()
94+
tool_id_counter = 1
95+
96+
for project in projects_config:
97+
for tool_reference in project["tools"]:
98+
tool_info = tool_discovery.discover_tool(tool_reference)
99+
if tool_info:
100+
tool_metadata = {
101+
"id": tool_id_counter,
102+
"project": project["name"],
103+
"name": tool_info["name"],
104+
"interface": tool_info.get("interface")
105+
}
106+
tool_repository.add_tool(tool_info["tool"], tool_metadata)
107+
tool_id_counter += 1
108+
109+
return tool_repository
110+
111+
# Run the tool discovery and loading process
112+
tool_repository = discover_and_load_tools(projects_config, tools_config)
113+
114+
# Display the discovered tools
115+
for tool in tool_repository.get_tools().tools:
116+
print(f"Discovered tool: {tool['name']} from project: {tool['metadata']['project']}")
117+
```
118+
119+
# Building a mesh of LLM Agentic Tools
120+
121+
We have developed a series of web applications and tools, complete with examples, to demonstrate the capabilities of LLM Agentic Tool Mesh in our [GitHub repo](https://github.com/HewlettPackard/llmesh).
122+
123+
Web applications:
124+
125+
* **Chatbot** (`examples/app_chatbot`): This is a chatbot capable of reasoning and invoking appropriate LLM tools to perform specific actions. You can configure the chatbot using files that define LLM 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.
126+
* **Admin panel** (`examples/app_backpanel`): There's 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.
127+
128+
Tools:
129+
130+
* **Basic copywriter** (`examples/tool_copywriter`): This tool rewrites text, providing explanations for enhancements and changes.
131+
* **Temperature finder** (`examples/tool_api`): This tool fetches and displays the current temperature for a specified location by utilizing a public API.
132+
* **Temperature analyzer** (`examples/tool_analyzer`): Another tools generates code, using a language model to analyze historical temperature data and create visual charts for better understanding
133+
* **Telco expert** (`examples/tool_rag`): The RAG tool provides quick and accurate access to 5G specifications.
134+
* **OpenAPI manager** (`examples/tool_agents`): This multi-agent tool reads OpenAPI documentation and provides users with relevant information based on their queries.
135+
136+
## Running the examples
137+
138+
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:
139+
140+
* Access the chatbot at `https://127.0.0.1:5001/`
141+
* Access the admin panel at `https://127.0.0.1:5011/`
142+
143+
![](/img/mesh-apps.png)
144+
145+
# Federated governance and standards
146+
147+
In the LLM Agentic Tool Mesh platform, the management of LLM tools is decentralized, promoting flexibility and innovation. To ensure this decentralization does not compromise the platform's integrity, LLM Agentic Tool Mesh implements a unified framework of governance policies and standards.
148+
149+
Key principles:
150+
151+
* **Interoperable standards**: Ensures all tools and services work together seamlessly while adhering to best practices
152+
* **Ethical compliance**: Emphasizes minimizing biases, ensuring fairness, and upholding ethical principles across all AI tools and models
153+
* **Security and privacy**: Maintains rigorous standards to protect data and ensure compliance with privacy regulations.
154+
* **Continuous improvement**: Encourages feedback and collaboration to refine governance practices
155+
* **Automated governance**: Plans to extend code quality checks to enforce governance policies, ensuring comprehensive compliance across the platform
156+
157+
LLM Agentic Tool Mesh includes a dedicated repository containing text files that outline various policies and standards (`federated_governance/`). These documents cover essential areas such as LLM model usage, RAG processes, and more.
158+
159+
# Vision for LLM Agentic Tool Mesh project evolution
160+
161+
The LLM Agentic Tool Mesh platform is evolving into a comprehensive solution, providing several panel views tailored for various stages of the tool and application lifecycle.
162+
163+
When creating a new web app, you can build upon the existing examples. With all services fully parameterized, there is unparalleled flexibility to design diverse user experience panels. For instance, current examples include a chatbot as a user interface and an admin panel for configuring an LLM tool. Additionally, web apps can be developed to support deployment tasks or facilitate experiments aimed at optimizing service parameters for specific objectives.
164+
165+
Currently, the platform provides a user panel and a dvelopment panel.
166+
167+
**User panel**:
168+
169+
* Implemented features: This panel focuses on engaging with tools like Chat, RAG, and Agent services. It provides a user-friendly interface for interacting with these capabilities.
170+
* Future goals: We plan to enrich the existing services, offering an even more seamless and feature-rich experience for end-users.
171+
172+
**Development panel**:
173+
174+
* Implemented features: This panel has been partially tackled with the backpanel web app example, which allows users to runtime modify the basic copywriter agentic tool and the RAG tool.
175+
* Future goals: We aim to add more system services to support development, including real-time LLM tuning and configuration.
176+
177+
In the future, we hope to be able to offer a deployment panel and an experiment panel.
178+
179+
**Deployment panel (future)**:
180+
181+
* Purpose: This panel will focus on deploying the LLM Agentic Tool Mesh tools seamlessly across one or more clusters, enabling large-scale and distributed deployments.
182+
* Planned features: We hope to offer tools for monitoring deployed tools, orchestrating distributed systems, and managing deployment pipelines.
183+
184+
**Experiment Panel (Future)**:
185+
186+
* Purpose: This panel will be designed to track and manage experiments to optimize LLM tool performance and suitability.
187+
* Planned features: This panel will allow users to try different configurations and compare outcomes, helping teams evaluate the most effective settings for their use cases.
188+
189+
![](/img/usage.png)
190+
191+
# Our mission ahead
192+
193+
As LLM Agentic Tool Mesh evolves, we aim to continue enhancing the platform by enriching existing services, especially in the user panel, and expanding the development panel with more robust system services. The addition of the deployment panel and experiment panel will complete the platform's vision, enabling a fully integrated lifecycle from development to deployment and optimization.
194+
195+
Stay tuned as we advance toward democratizing Gen AI with a comprehensive, flexible, and user-centric platform!

static/img/mesh-apps.png

1.46 MB
Loading

static/img/tools.png

120 KB
Loading

static/img/usage.png

219 KB
Loading

0 commit comments

Comments
 (0)