Skip to content

Commit c8577a0

Browse files
committed
udpate
1 parent 082b4ab commit c8577a0

File tree

2 files changed

+114
-173
lines changed

2 files changed

+114
-173
lines changed

markdown/ai-bootcamp/ai-bootcamp.md

Lines changed: 114 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,15 @@ This step is involved with running SAM enterprise with the new files generated.
288288
> aside positive
289289
> Note that the specific model identifier that the endpoint expects in the format of `provider/model` (e.g., `openai/gpt-4`, `anthropic/claude-3-opus-20240229`).
290290
291+
1. Make sure the database type for the session properties of the webUI gateway is set to `sqlite`
292+
```
293+
artifact_service: *default_artifact_service
294+
session_service:
295+
type: "sqlite"
296+
database_url: "${WEB_UI_GATEWAY_DATABASE_URL}"
297+
default_behavior: "PERSISTENT"
298+
```
299+
291300
1. Run docker compose
292301
```
293302
docker compose up
@@ -332,9 +341,12 @@ When SAM runs, it configures a couple of queues with subscriptions.
332341
## Adding agents with built-in tools
333342
Duration: 00:10:00
334343
335-
Now that you have a docker image running the enterprise edition of SAM, lets go ahead and add configuration files.
344+
Now that you have a docker image running the enterprise edition of SAM, lets go ahead and add two different configuration files.
345+
346+
1. A file with multiple agent configurations
347+
1. Multimodal Agent
336348
337-
### Basic Agents
349+
### 1. Basic Agents
338350
339351
1. From a new terminal window, navigate to your configs directory
340352
```
@@ -450,7 +462,21 @@ Notes:
450462
There is no need to provide a preview of the content in the response.
451463
```
452464
453-
### Adding a multimodal agent
465+
466+
Now go ahead and restart your docker
467+
468+
```
469+
docker restart sam-ent
470+
```
471+
```
472+
podman restart sam-ent
473+
```
474+
475+
Navigate to your SAM WebUI Gateway at [http://localhost:8001/](http://localhost:8001/) and observe new agents in the Agents tab
476+
477+
![more](./img/more_agents.png)
478+
479+
### 2. Adding a multimodal agent
454480
Lets add another multi-modal agent. This agent is capable of generating and processing content in both audio and visual formats. It includes features like text-to-speech with tone-based voice selection, multi-speaker conversations, audio transcription, image generation, and image analysis, while providing detailed guidelines for using these features effectively.
455481

456482
In the `configs/agents` directory
@@ -460,7 +486,12 @@ In the `configs/agents` directory
460486
curl https://raw.githubusercontent.com/SolaceLabs/solace-agent-mesh/refs/heads/main/examples/agents/a2a_multimodal_example.yaml -o multimodal.yaml
461487
```
462488
463-
1. Navigate to `shared_config.yaml` file and update add the following
489+
1. Open the multimodal.yaml and remove the "src." part before "solace_agent_mesh" in the `app_module` on lines 20 & 250
490+
```
491+
app_module: solace_agent_mesh.agent.sac.app
492+
```
493+
494+
1. Navigate to `shared_config.yaml` file and add the following under the `models` section
464495
```
465496
image_describe: &image_description_model
466497
# This dictionary structure tells ADK to use the LiteLlm wrapper.
@@ -505,7 +536,12 @@ In the `configs/agents` directory
505536
## Adding MCP Agent
506537
Duration: 00:05:00
507538
508-
To add an MCP agent, we will simply define an agent yaml file with the basic configuration. In this step, we will go ahead and add a [Google Maps MCP Agent](https://github.com/cablate/mcp-google-map).
539+
540+
Adding an MCP agent is done in one of two ways
541+
1. Using the agent (community edition) builder
542+
1. Adding yaml file configuration
543+
544+
In this hands-on, we will simply define an agent yaml file with the basic configuration. In this step, we will go ahead and add a [Google Maps MCP Agent](https://github.com/cablate/mcp-google-map).
509545
510546
### Add Agent File
511547
@@ -516,208 +552,113 @@ To add an MCP agent, we will simply define an agent yaml file with the basic con
516552
```
517553
1. Open that file and place the following content in the file
518554
```yaml
519-
# Solace AI Connector: Agent Configuration Template
520555
log:
521556
stdout_log_level: INFO
522557
log_file_level: DEBUG
523-
log_file: a2a_agent.log
558+
log_file: google_maps_mcp.log
524559
525560
!include ../shared_config.yaml
526561
527562
apps:
528-
- name: "GoogleMaps__app"
563+
- name: "GoogleMaps__app"
529564
app_base_path: .
530565
app_module: solace_agent_mesh.agent.sac.app
531566
broker:
532-
<<: *broker_connection
567+
<<: *broker_connection
533568
534569
# App Level Config
535570
app_config:
536-
namespace: "${NAMESPACE}" # Your A2A topic namespace
537-
supports_streaming: true # Host capability flag
538-
agent_name: "GoogleMaps"
539-
# The model will be an alias like *planning_model, *general_model etc.
540-
# The python script will replace *general_model with the correct alias string.
541-
model: *general_model
542-
543-
instruction: | # User-provided instruction
544-
TO BE FILLED
545-
546-
tools:
547-
## TO BE FILLED
548-
549-
session_service: *default_session_service
550-
artifact_service: *default_artifact_service
551-
552-
artifact_handling_mode: "embed" # How to handle artifacts
553-
enable_embed_resolution: true # Enable embed feature and instruction injection
554-
enable_artifact_content_instruction: true # Enable instruction for late-stage embed
555-
enable_builtin_artifact_tools: # Enable artifact tools and instruction injection
571+
namespace: "${NAMESPACE}" # Your A2A topic namespace
572+
supports_streaming: true # Host capability flag
573+
agent_name: "GoogleMaps"
574+
# The model will be an alias like *planning_model, *general_model etc.
575+
# The python script will replace *general_model with the correct alias string.
576+
model: *general_model
577+
578+
instruction: | # User-provided instruction
579+
You are a Google Maps MCP server with the following capabilities:
580+
581+
1. retrieve-instructions: A helper tool used by the client to get crucial system instructions on how to best reason about user intent and formulate effective calls to the retrieve-google-maps-platform-docs tool.
582+
2. retrieve-google-maps-platform-docs: The primary tool. It takes a natural language query and submits it to a hosted Retrieval Augmented Generation (RAG) engine. The RAG engine searches fresh versions of offici
583+
584+
tools:
585+
- group_name: artifact_management
586+
tool_type: builtin-group
587+
- group_name: general
588+
tool_type: builtin-group
589+
- connection_params:
590+
args:
591+
- -y
592+
- '@googlemaps/code-assist-mcp@latest'
593+
command: npx
594+
type: stdio
595+
#environment_variables:
596+
# GOOGLE_MAPS_API_KEY: ${GOOGLE_MAPS_API_KEY}
597+
tool_type: mcp
598+
599+
session_service: *default_session_service
600+
artifact_service: *default_artifact_service
601+
602+
artifact_handling_mode: "reference" # How to handle artifacts
603+
enable_embed_resolution: true # Enable embed feature and instruction injection
604+
enable_artifact_content_instruction: true # Enable instruction for late-stage embed
605+
enable_builtin_artifact_tools: # Enable artifact tools and instruction injection
556606
enabled: true
557-
enable_builtin_data_tools: # Enable data analysis tools and instruction injection
607+
enable_builtin_data_tools: # Enable data analysis tools and instruction injection
558608
enabled: false
559-
data_tools_config: *default_data_tools_config # Use the default data tools config
609+
data_tools_config: *default_data_tools_config # Use the default data tools config
560610
561-
# Agent Card Definition
562-
agent_card:
563-
description: "TO BE FILLED"
611+
# Agent Card Definition
612+
agent_card:
613+
description: "Google Maps MCP server with the following capabilities: Location Search, Geocoding Services, Distance & Directions, Elevation Data."
564614
defaultInputModes: [text]
565615
defaultOutputModes: [text, file]
566616
skills: []
567-
568-
# Discovery & Communication
569-
agent_card_publishing:
617+
618+
# Discovery & Communication
619+
agent_card_publishing:
570620
interval_seconds: 10
571-
agent_discovery:
621+
agent_discovery:
572622
enabled: true
573-
inter_agent_communication:
574-
allow_list: [""]
623+
inter_agent_communication:
624+
allow_list: []
575625
deny_list: []
576626
request_timeout_seconds: 180
577-
```
578627
579-
1. Update the `instruction` section with the following
580-
```yaml
581-
You are a Google Maps MCP server with the following capabilities:
628+
```
582629
583-
1. Location Search
584-
- Search for places near a specific location with customizable radius and filters
585-
- Get detailed place information including ratings, opening hours, and contact details
586630
587-
2. Geocoding Services
588-
- Convert addresses to coordinates (geocoding)
589-
- Convert coordinates to addresses (reverse geocoding)
631+
A couple of notes to point out:
590632
591-
3. Distance & Directions
592-
- Calculate distances and travel times between multiple origins and destinations
593-
- Get detailed directions between two points with step-by-step instructions
594-
- Support for different travel modes (driving, walking, bicycling, transit)
633+
1. The `instruction` section has the following
634+
```yaml
635+
You are a Google Maps MCP server with the following capabilities:
595636
596-
4. Elevation Data
597-
- Retrieve elevation data for specific locations
637+
1. retrieve-instructions: A helper tool used by the client to get crucial system instructions on how to best reason about user intent and formulate effective calls to the retrieve-google-maps-platform-docs tool.
638+
2. retrieve-google-maps-platform-docs: The primary tool. It takes a natural language query and submits it to a hosted Retrieval Augmented Generation (RAG) engine. The RAG engine searches fresh versions of offici
598639
```
599640
600-
1. Update the tools section with the following:
641+
1. The tools section has the following:
601642
```yaml
602643
tools:
603-
- group_name: artifact_management
604-
tool_type: builtin-group
605-
- group_name: general
606-
tool_type: builtin-group
607-
- connection_params:
608-
args:
609-
- -y
610-
- '@cablate/mcp-google-map'
611-
command: npx
612-
type: stdio
613-
environment_variables:
614-
GOOGLE_MAPS_API_KEY: ${GOOGLE_MAPS_API_KEY}
615-
tool_type: mcp
616-
```
617-
618-
A couple of things to point out:
644+
- group_name: artifact_management
645+
tool_type: builtin-group
646+
- group_name: general
647+
tool_type: builtin-group
648+
- connection_params:
649+
args:
650+
- -y
651+
- '@googlemaps/code-assist-mcp@latest'
652+
command: npx
653+
type: stdio
654+
#environment_variables:
655+
# GOOGLE_MAPS_API_KEY: ${GOOGLE_MAPS_API_KEY}
656+
tool_type: mcp
657+
```
658+
619659
- This Agent leverages two built-in tools `artifact_management` and the `general` builtin-group
620660
- Also uses tools exposed by a local MCP server as configured via `tool_type: mcp`
621-
- The MCP server runs locally as per the [Google Maps MCP Agent Documentation](https://github.com/cablate/mcp-google-map)
622-
- An env var is required for this MCP server as defined in `environment_variables`
623-
624-
The final config file looks like this
625-
```yaml
626-
627-
log:
628-
stdout_log_level: INFO
629-
log_file_level: DEBUG
630-
log_file: a2a_agent.log
631-
632-
!include ../shared_config.yaml
633-
634-
apps:
635-
- name: "GoogleMaps__app"
636-
app_base_path: .
637-
app_module: solace_agent_mesh.agent.sac.app
638-
broker:
639-
<<: *broker_connection
640-
641-
# App Level Config
642-
app_config:
643-
namespace: "${NAMESPACE}" # Your A2A topic namespace
644-
supports_streaming: true # Host capability flag
645-
agent_name: "GoogleMaps"
646-
# The model will be an alias like *planning_model, *general_model etc.
647-
# The python script will replace *general_model with the correct alias string.
648-
model: *general_model
649-
650-
instruction: | # User-provided instruction
651-
You are a Google Maps MCP server with the following capabilities:
652-
653-
1. Location Search
654-
- Search for places near a specific location with customizable radius and filters
655-
- Get detailed place information including ratings, opening hours, and contact details
656-
657-
2. Geocoding Services
658-
- Convert addresses to coordinates (geocoding)
659-
- Convert coordinates to addresses (reverse geocoding)
660-
661-
3. Distance & Directions
662-
- Calculate distances and travel times between multiple origins and destinations
663-
- Get detailed directions between two points with step-by-step instructions
664-
- Support for different travel modes (driving, walking, bicycling, transit)
665-
666-
4. Elevation Data
667-
- Retrieve elevation data for specific locations
668-
669-
tools:
670-
- group_name: artifact_management
671-
tool_type: builtin-group
672-
- group_name: general
673-
tool_type: builtin-group
674-
- connection_params:
675-
args:
676-
- -y
677-
- '@cablate/mcp-google-map'
678-
command: npx
679-
type: stdio
680-
environment_variables:
681-
GOOGLE_MAPS_API_KEY: ${GOOGLE_MAPS_API_KEY}
682-
tool_type: mcp
683-
684-
session_service: *default_session_service
685-
artifact_service: *default_artifact_service
686-
687-
artifact_handling_mode: "embed" # How to handle artifacts
688-
enable_embed_resolution: true # Enable embed feature and instruction injection
689-
enable_artifact_content_instruction: true # Enable instruction for late-stage embed
690-
enable_builtin_artifact_tools: # Enable artifact tools and instruction injection
691-
enabled: true
692-
enable_builtin_data_tools: # Enable data analysis tools and instruction injection
693-
enabled: false
694-
data_tools_config: *default_data_tools_config # Use the default data tools config
695-
696-
# Agent Card Definition
697-
agent_card:
698-
description: "Google Maps MCP server with the following capabilities: Location Search, Geocoding Services, Distance & Directions, Elevation Data."
699-
defaultInputModes: [text]
700-
defaultOutputModes: [text, file]
701-
skills: []
702-
703-
# Discovery & Communication
704-
agent_card_publishing:
705-
interval_seconds: 10
706-
agent_discovery:
707-
enabled: true
708-
inter_agent_communication:
709-
allow_list: []
710-
deny_list: []
711-
request_timeout_seconds: 180
712-
```
713-
714-
### Add Env var
715-
716-
Edit your .env file to add a `GOOGLE_MAPS_API_KEY`
717-
718-
```yaml
719-
GOOGLE_MAPS_API_KEY="YOUR_API_KEY"
720-
```
661+
- The MCP server runs locally as per the [Google Maps MCP Agent Documentation](https://developers.google.com/maps/ai/mcp#%F0%9F%94%A7-tools-provided)
721662
722663
### Restart SAM Enterprise container
723664
```
477 KB
Loading

0 commit comments

Comments
 (0)