solace-agent-mesh 1.4.12__py3-none-any.whl → 1.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solace-agent-mesh might be problematic. Click here for more details.
- solace_agent_mesh/agent/adk/adk_llm.txt +3 -4
- solace_agent_mesh/agent/adk/adk_llm_detail.txt +566 -0
- solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +1 -1
- solace_agent_mesh/agent/adk/callbacks.py +51 -2
- solace_agent_mesh/agent/adk/models/lite_llm.py +1 -0
- solace_agent_mesh/agent/adk/models/models_llm.txt +1 -2
- solace_agent_mesh/agent/agent_llm.txt +1 -1
- solace_agent_mesh/agent/agent_llm_detail.txt +1702 -0
- solace_agent_mesh/agent/protocol/event_handlers.py +2 -13
- solace_agent_mesh/agent/protocol/protocol_llm.txt +15 -2
- solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +92 -0
- solace_agent_mesh/agent/sac/component.py +51 -21
- solace_agent_mesh/agent/sac/sac_llm.txt +15 -1
- solace_agent_mesh/agent/sac/sac_llm_detail.txt +200 -0
- solace_agent_mesh/agent/sac/task_execution_context.py +73 -0
- solace_agent_mesh/agent/testing/testing_llm_detail.txt +68 -0
- solace_agent_mesh/agent/tools/tools_llm.txt +148 -154
- solace_agent_mesh/agent/tools/tools_llm_detail.txt +274 -0
- solace_agent_mesh/agent/utils/utils_llm.txt +1 -1
- solace_agent_mesh/agent/utils/utils_llm_detail.txt +149 -0
- solace_agent_mesh/assets/docs/404.html +3 -3
- solace_agent_mesh/assets/docs/assets/js/483cef9a.bf9398af.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{main.f67fc9f4.js → main.0c149855.js} +2 -2
- solace_agent_mesh/assets/docs/assets/js/{runtime~main.40527046.js → runtime~main.c66557e4.js} +1 -1
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/installation/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/rbac-setup-guilde/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/single-sign-on/index.html +8 -4
- solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-technical-migration-map/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/concepts/cli/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/litellm_models/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/bedrock-agents/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/custom-agent/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/event-mesh-gateway/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/mcp-integration/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/mongodb-integration/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/rag-integration/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/rest-gateway/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/sql-database/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/artifact-management/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/audio-tools/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/data-analysis-tools/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/embeds/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-agents/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-gateways/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-python-tools/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +3 -3
- solace_agent_mesh/assets/docs/lunr-index-1760032255022.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1760032255022.json +1 -0
- solace_agent_mesh/assets/docs/search-doc.json +1 -1
- solace_agent_mesh/cli/__init__.py +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-j1LW-wlq.js → authCallback-DwrxZE0E.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{client-B9p_nFNA.js → client-DarGQzyw.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-CZbpmwfA.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-C__uuUkB.js +339 -0
- solace_agent_mesh/client/webui/frontend/static/assets/{vendor-CS5YMf8a.js → vendor-BKIeiHj_.js} +80 -70
- solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
- solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
- solace_agent_mesh/common/a2a/a2a_llm.txt +1 -1
- solace_agent_mesh/common/a2a/a2a_llm_detail.txt +193 -0
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +1 -1
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +736 -0
- solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +23 -0
- solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +93 -15
- solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +23 -0
- solace_agent_mesh/common/common_llm.txt +24 -39
- solace_agent_mesh/common/common_llm_detail.txt +2562 -0
- solace_agent_mesh/common/data_parts.py +9 -1
- solace_agent_mesh/common/middleware/middleware_llm_detail.txt +185 -0
- solace_agent_mesh/common/sac/sac_llm.txt +1 -1
- solace_agent_mesh/common/sac/sac_llm_detail.txt +82 -0
- solace_agent_mesh/common/sam_events/sam_events_llm.txt +104 -0
- solace_agent_mesh/common/sam_events/sam_events_llm_detail.txt +115 -0
- solace_agent_mesh/common/services/services_llm.txt +57 -6
- solace_agent_mesh/common/services/services_llm_detail.txt +459 -0
- solace_agent_mesh/common/utils/embeds/embeds_llm.txt +1 -1
- solace_agent_mesh/common/utils/utils_llm.txt +75 -87
- solace_agent_mesh/common/utils/utils_llm_detail.txt +572 -0
- solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +101 -0
- solace_agent_mesh/gateway/base/app.py +1 -1
- solace_agent_mesh/gateway/base/base_llm.txt +1 -1
- solace_agent_mesh/gateway/base/base_llm_detail.txt +235 -0
- solace_agent_mesh/gateway/gateway_llm.txt +242 -235
- solace_agent_mesh/gateway/gateway_llm_detail.txt +3885 -0
- solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +295 -0
- solace_agent_mesh/gateway/http_sse/alembic/env.py +10 -1
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251006_98882922fa59_add_tasks_events_feedback_chat_tasks.py +190 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +155 -0
- solace_agent_mesh/gateway/http_sse/alembic.ini +1 -1
- solace_agent_mesh/gateway/http_sse/app.py +148 -2
- solace_agent_mesh/gateway/http_sse/component.py +368 -60
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +46 -6
- solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +108 -0
- solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +1 -1
- solace_agent_mesh/gateway/http_sse/dependencies.py +116 -26
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +172 -172
- solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +3278 -0
- solace_agent_mesh/gateway/http_sse/main.py +146 -41
- solace_agent_mesh/gateway/http_sse/repository/__init__.py +3 -12
- solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +103 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/__init__.py +5 -3
- solace_agent_mesh/gateway/http_sse/repository/entities/chat_task.py +75 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +263 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/feedback.py +20 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/session_history.py +0 -16
- solace_agent_mesh/gateway/http_sse/repository/entities/task.py +25 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/task_event.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +81 -0
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +73 -18
- solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -5
- solace_agent_mesh/gateway/http_sse/repository/models/chat_task_model.py +31 -0
- solace_agent_mesh/gateway/http_sse/repository/models/feedback_model.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +266 -0
- solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +3 -3
- solace_agent_mesh/gateway/http_sse/repository/models/task_event_model.py +25 -0
- solace_agent_mesh/gateway/http_sse/repository/models/task_model.py +32 -0
- solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +340 -0
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +4 -53
- solace_agent_mesh/gateway/http_sse/repository/task_repository.py +173 -0
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +1 -1
- solace_agent_mesh/gateway/http_sse/routers/config.py +26 -4
- solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +346 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/__init__.py +3 -3
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +83 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +2 -10
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/task_requests.py +58 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/__init__.py +5 -3
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +107 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +1 -15
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/task_responses.py +30 -0
- solace_agent_mesh/gateway/http_sse/routers/feedback.py +37 -0
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +255 -204
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +220 -40
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +168 -42
- solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +272 -0
- solace_agent_mesh/gateway/http_sse/services/feedback_service.py +241 -0
- solace_agent_mesh/gateway/http_sse/services/people_service.py +0 -80
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +177 -13
- solace_agent_mesh/gateway/http_sse/services/session_service.py +151 -84
- solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +317 -0
- solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +25 -14
- solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +285 -0
- solace_agent_mesh/gateway/http_sse/shared/types.py +7 -0
- solace_agent_mesh/gateway/http_sse/utils/__init__.py +1 -0
- solace_agent_mesh/gateway/http_sse/utils/stim_utils.py +32 -0
- solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +47 -0
- solace_agent_mesh/solace_agent_mesh_llm.txt +1 -1
- solace_agent_mesh/solace_agent_mesh_llm_detail.txt +8599 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.0.dist-info}/METADATA +1 -1
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.0.dist-info}/RECORD +172 -124
- solace_agent_mesh/agent/adk/invocation_monitor.py +0 -295
- solace_agent_mesh/assets/docs/assets/js/483cef9a.4736f2d8.js +0 -1
- solace_agent_mesh/assets/docs/lunr-index-1759936913198.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1759936913198.json +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-ChRwcV89.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-DnnE01OM.js +0 -339
- solace_agent_mesh/gateway/http_sse/repository/entities/message.py +0 -41
- solace_agent_mesh/gateway/http_sse/repository/message_repository.py +0 -84
- solace_agent_mesh/gateway/http_sse/repository/models/message_model.py +0 -45
- /solace_agent_mesh/assets/docs/assets/js/{main.f67fc9f4.js.LICENSE.txt → main.0c149855.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.0.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.0.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,269 +1,263 @@
|
|
|
1
|
-
# DEVELOPER GUIDE
|
|
1
|
+
# DEVELOPER GUIDE: tools
|
|
2
2
|
|
|
3
3
|
## Quick Summary
|
|
4
|
-
The `tools` directory contains the
|
|
4
|
+
The `tools` directory contains the complete tool system for the Solace Agent Mesh, providing built-in tools for artifact management, data analysis, audio/image processing, web interactions, and dynamic tool creation. It includes a registry system for tool discovery and management, with support for declarative YAML-based configurations and multiple tool types including built-in, custom Python, and MCP tools.
|
|
5
5
|
|
|
6
6
|
## Files Overview
|
|
7
|
-
- `__init__.py` -
|
|
8
|
-
- `audio_tools.py` -
|
|
9
|
-
- `builtin_artifact_tools.py` -
|
|
10
|
-
- `builtin_data_analysis_tools.py` -
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
7
|
+
- `__init__.py` - Ensures all built-in tool modules are imported for declarative registration
|
|
8
|
+
- `audio_tools.py` - Audio processing tools including TTS, transcription, and audio manipulation
|
|
9
|
+
- `builtin_artifact_tools.py` - Core artifact management tools for CRUD operations and content processing
|
|
10
|
+
- `builtin_data_analysis_tools.py` - Data analysis tools for creating charts from Plotly configurations
|
|
11
|
+
- `dynamic_tool.py` - Base classes for creating dynamic, programmatically-defined tools
|
|
12
|
+
- `general_agent_tools.py` - General-purpose tools for file conversion and diagram generation
|
|
13
|
+
- `image_tools.py` - Image generation, editing, and multimodal content analysis tools
|
|
14
|
+
- `peer_agent_tool.py` - Tool for delegating tasks to peer agents over Solace messaging
|
|
14
15
|
- `registry.py` - Singleton registry for tool discovery and management
|
|
15
|
-
- `test_tools.py` - Testing utilities
|
|
16
|
-
- `
|
|
16
|
+
- `test_tools.py` - Testing utilities for timeouts and error handling
|
|
17
|
+
- `tool_config_types.py` - Pydantic models for YAML-based tool configurations
|
|
18
|
+
- `tool_definition.py` - Base tool definition classes and structures
|
|
17
19
|
- `web_tools.py` - Web scraping and content extraction tools
|
|
18
20
|
|
|
19
21
|
## Developer API Reference
|
|
20
22
|
|
|
21
23
|
### __init__.py
|
|
22
|
-
**Purpose:**
|
|
23
|
-
**Import:** `from solace_agent_mesh.agent.tools import *`
|
|
24
|
+
**Purpose:** Triggers tool registration by importing all tool modules
|
|
25
|
+
**Import:** `from solace_agent_mesh.agent.tools import *`
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
```python
|
|
27
|
-
# Import triggers registration of all tools
|
|
28
|
-
from solace_agent_mesh.agent.tools import *
|
|
29
|
-
|
|
30
|
-
# Or import the package to register all tools
|
|
31
|
-
import solace_agent_mesh.agent.tools
|
|
32
|
-
|
|
33
|
-
# Access the registry to see all registered tools
|
|
34
|
-
from solace_agent_mesh.agent.tools.registry import tool_registry
|
|
35
|
-
all_tools = tool_registry.get_all_tools()
|
|
36
|
-
print(f"Registered {len(all_tools)} tools")
|
|
37
|
-
```
|
|
27
|
+
No public classes or functions - this is an initialization module.
|
|
38
28
|
|
|
39
29
|
### audio_tools.py
|
|
40
|
-
**Purpose:**
|
|
30
|
+
**Purpose:** Provides comprehensive audio processing capabilities
|
|
41
31
|
**Import:** `from solace_agent_mesh.agent.tools.audio_tools import select_voice, text_to_speech, multi_speaker_text_to_speech, concatenate_audio, transcribe_audio`
|
|
42
32
|
|
|
43
33
|
**Functions:**
|
|
44
|
-
- `select_voice(gender: Optional[str] = None, tone: Optional[str] = None, exclude_voices: Optional[List[str]] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Selects a voice based on gender
|
|
45
|
-
- `text_to_speech(text: str, output_filename: Optional[str] = None, voice_name: Optional[str] = None, gender: Optional[str] = None, tone: Optional[str] = None, language: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Converts text to speech using Gemini TTS
|
|
46
|
-
- `multi_speaker_text_to_speech(conversation_text: str, output_filename: Optional[str] = None, speaker_configs: Optional[List[Dict[str, str]]] = None, language: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` -
|
|
47
|
-
- `concatenate_audio(clips_to_join: List[Dict[str, Any]], output_filename: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Combines multiple audio clips with custom
|
|
34
|
+
- `select_voice(gender: Optional[str] = None, tone: Optional[str] = None, exclude_voices: Optional[List[str]] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Selects a suitable voice based on gender and tone criteria
|
|
35
|
+
- `text_to_speech(text: str, output_filename: Optional[str] = None, voice_name: Optional[str] = None, gender: Optional[str] = None, tone: Optional[str] = None, language: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Converts text to speech using Gemini TTS API
|
|
36
|
+
- `multi_speaker_text_to_speech(conversation_text: str, output_filename: Optional[str] = None, speaker_configs: Optional[List[Dict[str, str]]] = None, language: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Creates multi-speaker audio from conversation text
|
|
37
|
+
- `concatenate_audio(clips_to_join: List[Dict[str, Any]], output_filename: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Combines multiple audio clips with custom pause durations
|
|
48
38
|
- `transcribe_audio(audio_filename: str, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Transcribes audio using OpenAI-compatible API
|
|
49
39
|
|
|
50
40
|
**Constants/Variables:**
|
|
51
|
-
- `VOICE_TONE_MAPPING: Dict[str, List[str]]` - Maps
|
|
52
|
-
- `GENDER_TO_VOICE_MAPPING: Dict[str, List[str]]` - Maps
|
|
41
|
+
- `VOICE_TONE_MAPPING: Dict[str, List[str]]` - Maps tone preferences to available voices
|
|
42
|
+
- `GENDER_TO_VOICE_MAPPING: Dict[str, List[str]]` - Maps gender preferences to available voices
|
|
53
43
|
- `ALL_AVAILABLE_VOICES: List[str]` - Complete list of available voice names
|
|
54
44
|
- `SUPPORTED_LANGUAGES: Dict[str, str]` - Maps language names to BCP-47 codes
|
|
55
|
-
- `DEFAULT_VOICE: str` - Default voice name ("Kore")
|
|
56
45
|
|
|
57
46
|
**Usage Examples:**
|
|
58
47
|
```python
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
voice_result = await select_voice(
|
|
64
|
-
gender="female",
|
|
65
|
-
tone="friendly",
|
|
48
|
+
# Basic text-to-speech
|
|
49
|
+
result = await text_to_speech(
|
|
50
|
+
text="Hello, world!",
|
|
51
|
+
voice_name="Kore",
|
|
66
52
|
tool_context=context
|
|
67
53
|
)
|
|
68
54
|
|
|
69
|
-
#
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
55
|
+
# Multi-speaker conversation
|
|
56
|
+
conversation = "Speaker1: Hello there!\nSpeaker2: Hi, how are you?"
|
|
57
|
+
result = await multi_speaker_text_to_speech(
|
|
58
|
+
conversation_text=conversation,
|
|
59
|
+
speaker_configs=[
|
|
60
|
+
{"name": "Speaker1", "gender": "female", "tone": "friendly"},
|
|
61
|
+
{"name": "Speaker2", "gender": "male", "tone": "casual"}
|
|
62
|
+
],
|
|
63
|
+
tool_context=context
|
|
76
64
|
)
|
|
77
65
|
```
|
|
78
66
|
|
|
79
67
|
### builtin_artifact_tools.py
|
|
80
|
-
**Purpose:**
|
|
68
|
+
**Purpose:** Core artifact management and content processing tools
|
|
81
69
|
**Import:** `from solace_agent_mesh.agent.tools.builtin_artifact_tools import list_artifacts, load_artifact, signal_artifact_for_return, apply_embed_and_create_artifact, extract_content_from_artifact, append_to_artifact, delete_artifact`
|
|
82
70
|
|
|
83
71
|
**Functions:**
|
|
84
|
-
- `list_artifacts(tool_context: ToolContext = None) -> Dict[str, Any]` - Lists all artifacts with metadata summaries
|
|
72
|
+
- `list_artifacts(tool_context: ToolContext = None) -> Dict[str, Any]` - Lists all available artifacts with metadata summaries
|
|
85
73
|
- `load_artifact(filename: str, version: int, load_metadata_only: bool = False, max_content_length: Optional[int] = None, tool_context: ToolContext = None) -> Dict[str, Any]` - Loads artifact content or metadata
|
|
86
|
-
- `signal_artifact_for_return(filename: str, version: int, tool_context: ToolContext = None) -> Dict[str, Any]` - Signals artifact
|
|
87
|
-
- `apply_embed_and_create_artifact(output_filename: str, embed_directive: str, output_metadata: Optional[Dict[str, Any]] = None, tool_context: ToolContext = None) -> Dict[str, Any]` - Resolves
|
|
74
|
+
- `signal_artifact_for_return(filename: str, version: int, tool_context: ToolContext = None) -> Dict[str, Any]` - Signals artifact to be returned to caller
|
|
75
|
+
- `apply_embed_and_create_artifact(output_filename: str, embed_directive: str, output_metadata: Optional[Dict[str, Any]] = None, tool_context: ToolContext = None) -> Dict[str, Any]` - Resolves embed directives and creates new artifacts
|
|
88
76
|
- `extract_content_from_artifact(filename: str, extraction_goal: str, version: Optional[str] = "latest", output_filename_base: Optional[str] = None, tool_context: ToolContext = None) -> Dict[str, Any]` - Uses LLM to extract/transform artifact content
|
|
89
77
|
- `append_to_artifact(filename: str, content_chunk: str, mime_type: str, tool_context: ToolContext = None) -> Dict[str, Any]` - Appends content to existing artifacts
|
|
90
78
|
- `delete_artifact(filename: str, version: Optional[int] = None, tool_context: ToolContext = None) -> Dict[str, Any]` - Deletes artifact versions
|
|
91
79
|
|
|
92
80
|
**Usage Examples:**
|
|
93
81
|
```python
|
|
94
|
-
from solace_agent_mesh.agent.tools.builtin_artifact_tools import load_artifact, list_artifacts
|
|
95
|
-
|
|
96
82
|
# List all artifacts
|
|
97
83
|
artifacts = await list_artifacts(tool_context=context)
|
|
98
84
|
|
|
99
|
-
# Load
|
|
100
|
-
|
|
85
|
+
# Load specific artifact version
|
|
86
|
+
content = await load_artifact(
|
|
101
87
|
filename="data.csv",
|
|
102
88
|
version=1,
|
|
103
|
-
load_metadata_only=False,
|
|
104
89
|
tool_context=context
|
|
105
90
|
)
|
|
106
91
|
|
|
107
92
|
# Extract content using LLM
|
|
108
|
-
|
|
109
|
-
filename="
|
|
110
|
-
extraction_goal="Extract all
|
|
93
|
+
result = await extract_content_from_artifact(
|
|
94
|
+
filename="report.pdf",
|
|
95
|
+
extraction_goal="Extract all financial figures and create a summary table",
|
|
111
96
|
tool_context=context
|
|
112
97
|
)
|
|
113
98
|
```
|
|
114
99
|
|
|
115
100
|
### builtin_data_analysis_tools.py
|
|
116
|
-
**Purpose:** Data
|
|
101
|
+
**Purpose:** Data analysis and visualization tools
|
|
117
102
|
**Import:** `from solace_agent_mesh.agent.tools.builtin_data_analysis_tools import create_chart_from_plotly_config`
|
|
118
103
|
|
|
119
104
|
**Functions:**
|
|
120
|
-
- `create_chart_from_plotly_config(config_content: str, config_format: Literal["json", "yaml"], output_filename: str, output_format: Optional[str] = "png", tool_context: ToolContext = None) -> Dict[str, Any]` - Generates
|
|
105
|
+
- `create_chart_from_plotly_config(config_content: str, config_format: Literal["json", "yaml"], output_filename: str, output_format: Optional[str] = "png", tool_context: ToolContext = None) -> Dict[str, Any]` - Generates static chart images from Plotly configurations
|
|
121
106
|
|
|
122
107
|
**Usage Examples:**
|
|
123
108
|
```python
|
|
124
|
-
from solace_agent_mesh.agent.tools.builtin_data_analysis_tools import create_chart_from_plotly_config
|
|
125
|
-
|
|
126
109
|
# Create chart from JSON config
|
|
110
|
+
plotly_config = '{"data": [{"x": [1,2,3], "y": [4,5,6], "type": "scatter"}]}'
|
|
127
111
|
result = await create_chart_from_plotly_config(
|
|
128
|
-
config_content=
|
|
112
|
+
config_content=plotly_config,
|
|
129
113
|
config_format="json",
|
|
130
|
-
output_filename="
|
|
114
|
+
output_filename="my_chart.png",
|
|
131
115
|
tool_context=context
|
|
132
116
|
)
|
|
133
117
|
```
|
|
134
118
|
|
|
119
|
+
### dynamic_tool.py
|
|
120
|
+
**Purpose:** Base classes for creating dynamic, programmatically-defined tools
|
|
121
|
+
**Import:** `from solace_agent_mesh.agent.tools.dynamic_tool import DynamicTool, DynamicToolProvider`
|
|
122
|
+
|
|
123
|
+
**Classes:**
|
|
124
|
+
- `DynamicTool(tool_config: Optional[Union[dict, BaseModel]] = None)` - Base class for dynamic tools with programmatic definitions
|
|
125
|
+
- `tool_name: str` - Property returning the function name for LLM calls
|
|
126
|
+
- `tool_description: str` - Property returning tool description
|
|
127
|
+
- `parameters_schema: adk_types.Schema` - Property returning parameter schema
|
|
128
|
+
- `raw_string_args: List[str]` - Property listing args that skip embed resolution
|
|
129
|
+
- `resolution_type: Literal["early", "all"]` - Property determining embed resolution scope
|
|
130
|
+
- `run_async(*, args: Dict[str, Any], tool_context: ToolContext) -> Dict[str, Any]` - Executes the tool with embed resolution
|
|
131
|
+
- `_run_async_impl(args: dict, tool_context: ToolContext, credential: Optional[str] = None) -> dict` - Abstract method for tool implementation
|
|
132
|
+
|
|
133
|
+
- `DynamicToolProvider()` - Base class for tool providers that generate multiple tools
|
|
134
|
+
- `register_tool(func: Callable) -> Callable` - Class method decorator for registering functions as tools
|
|
135
|
+
- `create_tools(tool_config: Optional[Union[dict, BaseModel]] = None) -> List[DynamicTool]` - Abstract method for creating custom tools
|
|
136
|
+
- `get_all_tools_for_framework(tool_config: Optional[Union[dict, BaseModel]] = None) -> List[DynamicTool]` - Framework method combining decorated and custom tools
|
|
137
|
+
|
|
138
|
+
**Usage Examples:**
|
|
139
|
+
```python
|
|
140
|
+
# Create a custom dynamic tool
|
|
141
|
+
class MyCustomTool(DynamicTool):
|
|
142
|
+
@property
|
|
143
|
+
def tool_name(self) -> str:
|
|
144
|
+
return "my_custom_tool"
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def tool_description(self) -> str:
|
|
148
|
+
return "Does something custom"
|
|
149
|
+
|
|
150
|
+
@property
|
|
151
|
+
def parameters_schema(self) -> adk_types.Schema:
|
|
152
|
+
return adk_types.Schema(
|
|
153
|
+
type=adk_types.Type.OBJECT,
|
|
154
|
+
properties={
|
|
155
|
+
"input": adk_types.Schema(type=adk_types.Type.STRING)
|
|
156
|
+
},
|
|
157
|
+
required=["input"]
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
async def _run_async_impl(self, args: dict, tool_context: ToolContext, credential: Optional[str] = None) -> dict:
|
|
161
|
+
return {"result": f"Processed: {args['input']}"}
|
|
162
|
+
|
|
163
|
+
# Create a tool provider with decorated methods
|
|
164
|
+
class MyToolProvider(DynamicToolProvider):
|
|
165
|
+
@DynamicToolProvider.register_tool
|
|
166
|
+
async def my_decorated_tool(self, param1: str, tool_context: ToolContext) -> dict:
|
|
167
|
+
"""This tool does something useful."""
|
|
168
|
+
return {"status": "success", "input": param1}
|
|
169
|
+
|
|
170
|
+
def create_tools(self, tool_config: Optional[Union[dict, BaseModel]] = None) -> List[DynamicTool]:
|
|
171
|
+
return [MyCustomTool(tool_config)]
|
|
172
|
+
```
|
|
173
|
+
|
|
135
174
|
### general_agent_tools.py
|
|
136
|
-
**Purpose:** General utility tools for file conversion and diagram generation
|
|
175
|
+
**Purpose:** General-purpose utility tools for file conversion and diagram generation
|
|
137
176
|
**Import:** `from solace_agent_mesh.agent.tools.general_agent_tools import convert_file_to_markdown, mermaid_diagram_generator`
|
|
138
177
|
|
|
139
178
|
**Functions:**
|
|
140
|
-
- `convert_file_to_markdown(input_filename: str, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Converts files to Markdown using MarkItDown
|
|
141
|
-
- `mermaid_diagram_generator(mermaid_syntax: str, output_filename: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Generates PNG
|
|
179
|
+
- `convert_file_to_markdown(input_filename: str, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Converts files to Markdown using MarkItDown library
|
|
180
|
+
- `mermaid_diagram_generator(mermaid_syntax: str, output_filename: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Generates PNG images from Mermaid diagram syntax
|
|
142
181
|
|
|
143
182
|
**Usage Examples:**
|
|
144
183
|
```python
|
|
145
|
-
from solace_agent_mesh.agent.tools.general_agent_tools import mermaid_diagram_generator, convert_file_to_markdown
|
|
146
|
-
|
|
147
184
|
# Convert PDF to Markdown
|
|
148
|
-
|
|
185
|
+
result = await convert_file_to_markdown(
|
|
149
186
|
input_filename="document.pdf",
|
|
150
187
|
tool_context=context
|
|
151
188
|
)
|
|
152
189
|
|
|
153
|
-
# Generate
|
|
190
|
+
# Generate Mermaid diagram
|
|
191
|
+
mermaid_code = """
|
|
192
|
+
graph TD
|
|
193
|
+
A[Start] --> B[Process]
|
|
194
|
+
B --> C[End]
|
|
195
|
+
"""
|
|
154
196
|
result = await mermaid_diagram_generator(
|
|
155
|
-
mermaid_syntax=
|
|
156
|
-
output_filename="
|
|
197
|
+
mermaid_syntax=mermaid_code,
|
|
198
|
+
output_filename="flowchart.png",
|
|
157
199
|
tool_context=context
|
|
158
200
|
)
|
|
159
201
|
```
|
|
160
202
|
|
|
161
203
|
### image_tools.py
|
|
162
|
-
**Purpose:** Image generation,
|
|
204
|
+
**Purpose:** Image generation, editing, and multimodal content analysis
|
|
163
205
|
**Import:** `from solace_agent_mesh.agent.tools.image_tools import create_image_from_description, describe_image, describe_audio, edit_image_with_gemini`
|
|
164
206
|
|
|
165
207
|
**Functions:**
|
|
166
208
|
- `create_image_from_description(image_description: str, output_filename: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Generates images from text descriptions
|
|
167
209
|
- `describe_image(image_filename: str, prompt: str = "What is in this image?", tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Describes images using vision APIs
|
|
168
210
|
- `describe_audio(audio_filename: str, prompt: str = "What is in this recording?", tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Describes audio using multimodal APIs
|
|
169
|
-
- `edit_image_with_gemini(image_filename: str, edit_prompt: str, output_filename: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Edits images using Gemini
|
|
211
|
+
- `edit_image_with_gemini(image_filename: str, edit_prompt: str, output_filename: Optional[str] = None, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Edits images using Gemini 2.0 Flash
|
|
170
212
|
|
|
171
213
|
**Usage Examples:**
|
|
172
214
|
```python
|
|
173
|
-
from solace_agent_mesh.agent.tools.image_tools import create_image_from_description, describe_image
|
|
174
|
-
|
|
175
215
|
# Generate image from description
|
|
176
216
|
result = await create_image_from_description(
|
|
177
|
-
image_description="A sunset over mountains",
|
|
217
|
+
image_description="A sunset over mountains with a lake in the foreground",
|
|
178
218
|
output_filename="sunset.png",
|
|
179
|
-
tool_context=context
|
|
180
|
-
tool_config={"model": "dall-e-3", "api_key": "key", "api_base": "url"}
|
|
219
|
+
tool_context=context
|
|
181
220
|
)
|
|
182
221
|
|
|
183
|
-
# Describe an image
|
|
184
|
-
|
|
222
|
+
# Describe an existing image
|
|
223
|
+
result = await describe_image(
|
|
185
224
|
image_filename="photo.jpg",
|
|
186
|
-
prompt="What objects are in this image?",
|
|
187
|
-
tool_context=context
|
|
188
|
-
tool_config={"model": "gpt-4-vision", "api_key": "key", "api_base": "url"}
|
|
225
|
+
prompt="What objects are visible in this image?",
|
|
226
|
+
tool_context=context
|
|
189
227
|
)
|
|
190
|
-
```
|
|
191
228
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
**Classes:**
|
|
197
|
-
- `ArtifactIdentifier(filename: str, version: Union[str, int] = "latest")` - Identifies specific artifact versions
|
|
198
|
-
- `PeerAgentTool(target_agent_name: str, host_component)` - Tool for delegating to specific peer agents
|
|
199
|
-
- `run_async(args: Dict[str, Any], tool_context: ToolContext) -> Any` - Executes peer delegation
|
|
200
|
-
- `is_long_running: bool` - Always True for async delegation
|
|
201
|
-
|
|
202
|
-
**Usage Examples:**
|
|
203
|
-
```python
|
|
204
|
-
from solace_agent_mesh.agent.tools.peer_agent_tool import PeerAgentTool, ArtifactIdentifier
|
|
205
|
-
|
|
206
|
-
# Create tool for specific peer agent (typically done automatically)
|
|
207
|
-
peer_tool = PeerAgentTool("data_analyst", host_component)
|
|
208
|
-
|
|
209
|
-
# Use in agent tool registry
|
|
210
|
-
result = await peer_tool.run_async(
|
|
211
|
-
args={"task_description": "Analyze this data", "artifacts": [{"filename": "data.csv"}]},
|
|
229
|
+
# Edit an image
|
|
230
|
+
result = await edit_image_with_gemini(
|
|
231
|
+
image_filename="original.jpg",
|
|
232
|
+
edit_prompt="Add a rainbow in the sky",
|
|
212
233
|
tool_context=context
|
|
213
234
|
)
|
|
214
|
-
|
|
215
|
-
# Artifact identifier usage
|
|
216
|
-
artifact_id = ArtifactIdentifier("report.pdf", version=2)
|
|
217
235
|
```
|
|
218
236
|
|
|
219
|
-
###
|
|
220
|
-
**Purpose:**
|
|
221
|
-
**Import:** `from solace_agent_mesh.agent.tools.
|
|
237
|
+
### peer_agent_tool.py
|
|
238
|
+
**Purpose:** Enables task delegation to peer agents over Solace messaging
|
|
239
|
+
**Import:** `from solace_agent_mesh.agent.tools.peer_agent_tool import PeerAgentTool`
|
|
222
240
|
|
|
223
241
|
**Classes:**
|
|
224
|
-
- `
|
|
225
|
-
- `
|
|
226
|
-
- `
|
|
227
|
-
- `
|
|
228
|
-
- `
|
|
229
|
-
- `clear() -> None` - Clears registry (testing only)
|
|
230
|
-
|
|
231
|
-
**Constants/Variables:**
|
|
232
|
-
- `tool_registry: _ToolRegistry` - Global singleton instance
|
|
242
|
+
- `PeerAgentTool(target_agent_name: str, host_component)` - Tool for delegating tasks to peer agents
|
|
243
|
+
- `target_agent_name: str` - Name of the peer agent
|
|
244
|
+
- `host_component` - Reference to the SamAgentComponent
|
|
245
|
+
- `is_long_running: bool` - Always True for async delegation
|
|
246
|
+
- `run_async(*, args: Dict[str, Any], tool_context: ToolContext) -> Any` - Delegates task to peer agent
|
|
233
247
|
|
|
234
248
|
**Usage Examples:**
|
|
235
249
|
```python
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
#
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
#
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
# Get tool by name
|
|
247
|
-
tool = tool_registry.get_tool_by_name("my_tool")
|
|
248
|
-
|
|
249
|
-
# Get all audio tools
|
|
250
|
-
audio_tools = tool_registry.get_tools_by_category("audio")
|
|
250
|
+
# Create peer agent tool (typically done by framework)
|
|
251
|
+
peer_tool = PeerAgentTool("data_analyst_agent", host_component)
|
|
252
|
+
|
|
253
|
+
# Tool is called by LLM with these parameters:
|
|
254
|
+
# {
|
|
255
|
+
# "task_description": "Analyze the sales data and create a summary report",
|
|
256
|
+
# "user_query": "What were our top performing products last quarter?",
|
|
257
|
+
# "artifacts": [{"filename": "sales_data.csv", "version": "latest"}]
|
|
258
|
+
# }
|
|
251
259
|
```
|
|
252
260
|
|
|
253
|
-
###
|
|
254
|
-
**Purpose:** Testing utilities for tool behavior validation
|
|
255
|
-
**Import:** `from solace_agent_mesh.agent.tools.test_tools import time_delay, always_fail_tool, dangling_tool_call_test_tool`
|
|
256
|
-
|
|
257
|
-
**Functions:**
|
|
258
|
-
- `time_delay(seconds: float, tool_context: ToolContext = None, tool_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]` - Pauses execution for testing
|
|
259
|
-
- `always_fail_tool() -> dict` - Always raises exception for error testing
|
|
260
|
-
- `dangling_tool_call_test_tool() -> None` - Returns None to test history repair
|
|
261
|
-
|
|
262
|
-
**Usage Examples:**
|
|
263
|
-
```python
|
|
264
|
-
from solace_agent_mesh.agent.tools.test_tools import time_delay
|
|
265
|
-
|
|
266
|
-
# Add delay for testing
|
|
267
|
-
result = await time_delay(
|
|
261
|
+
### registry.py
|
|
268
262
|
|
|
269
|
-
# content_hash:
|
|
263
|
+
# content_hash: 20fa34bab0871d388e46728669b40fe53f763aeff295c72c42aba81729cabab4
|