-
Notifications
You must be signed in to change notification settings - Fork 106
initial-version-sam-kong-ai codelab #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
195858
wants to merge
10
commits into
SolaceDev:master
Choose a base branch
from
195858:codelab-kong-sam-ai
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bd9f8e6
initial-version-sam-kong-ai
195858 497a56e
update to main markdown
195858 09561ee
updated agent config
195858 7285d71
moved static files to assets folder
195858 6d25fe9
changed base path of LLM proxy
195858 2e16bce
small fixes
195858 dea42de
Update markdown/solace-agent-mesh-kong-ai/solace-agent-mesh-kong-ai.md
195858 325e55d
Merge branch 'master' into codelab-kong-sam-ai
195858 33aa6c2
Changes SAM references to Solace Agent Mesh
Chaymee eb432f0
fixed file download URLs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
markdown/solace-agent-mesh-kong-ai/files/marketplace_agent.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Solace Agent Mesh Agent Configuration | ||
|
|
||
| log: | ||
| stdout_log_level: INFO | ||
| log_file_level: DEBUG | ||
| log_file: marketplace_agent.log | ||
|
|
||
| # Shared SAM config | ||
| !include ../shared_config.yaml | ||
|
|
||
| apps: | ||
| - name: "MarketplaceAgent_app" | ||
| app_base_path: . | ||
| app_module: solace_agent_mesh.agent.sac.app | ||
| broker: | ||
| <<: *broker_connection | ||
|
|
||
| app_config: | ||
| namespace: "${NAMESPACE}" | ||
| supports_streaming: true | ||
| agent_name: "MarketplaceAgent" | ||
| display_name: "Marketplace Agent" | ||
| model: | ||
| *general_model | ||
| trust_manager: | ||
| enabled: true | ||
| card_publish_interval_seconds: 10 | ||
| card_expiration_days: 7 | ||
| verification_mode: "permissive" # or "strict" for production | ||
| clock_skew_tolerance_seconds: 300 | ||
| enable_time_validation: true | ||
| jwt_default_ttl_seconds: 36000 | ||
| jwt_max_ttl_seconds: 864000 | ||
|
|
||
| instruction: | | ||
| You are a helpful AI assistant named Marketplace Agent. | ||
| Using the users and orders tools you help shop administrators to find orders and customer data that matches their prompts. To find a users orders you can either attempt to get orders by userid or get a list of orders and filter the matching orders. | ||
|
|
||
| tools: | ||
| - group_name: artifact_management | ||
| tool_type: builtin-group | ||
| - tool_type: mcp | ||
| connection_params: | ||
| type: streamable-http | ||
| url: "${MCP_MARKETPLACE_URL, http://localhost:8081/mcp-listener}" | ||
| headers: | ||
| Authorization: "Bearer ${MCP_MARKETPLACE_TOKEN, nokey}" | ||
| session_service: | ||
| type: ${PERSISTENCE_TYPE, sql} | ||
| database_url: ${DATABASE_URL, sqlite:///agent_019aa779_b318_73d0_9f23_80ff919db0b2.db} | ||
| default_behavior: PERSISTENT | ||
| artifact_service: *default_artifact_service | ||
| artifact_handling_mode: "reference" | ||
| enable_embed_resolution: true | ||
| enable_artifact_content_instruction: true | ||
|
|
||
| # Agent Card Definition | ||
| agent_card: | ||
| description: | | ||
| A helpful AI assistant for marketplace administrators to find order and customer information. | ||
| defaultInputModes: [text] | ||
| defaultOutputModes: [text, file] | ||
| skills: [] | ||
|
|
||
| # Discovery & Communication | ||
| agent_card_publishing: | ||
| interval_seconds: 10 | ||
| agent_discovery: | ||
| enabled: true | ||
| inter_agent_communication: | ||
| allow_list: [] | ||
| request_timeout_seconds: 600 | ||
|
|
||
57 changes: 57 additions & 0 deletions
57
markdown/solace-agent-mesh-kong-ai/files/solace-ai-proxy.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| _format_version: "3.0" | ||
| _info: | ||
| select_tags: | ||
| - llm | ||
| services: | ||
| - name: service1 | ||
| host: localhost | ||
| port: 32000 | ||
| routes: | ||
| - name: route1 | ||
| paths: | ||
| - /llm-route | ||
| plugins: | ||
| - name: ai-proxy-advanced | ||
| instance_name: "ai-proxy-llm" | ||
| config: | ||
| genai_category: text/generation | ||
| llm_format: openai | ||
| max_request_body_size: 1048576 | ||
| model_name_header: true | ||
| response_streaming: allow | ||
| targets: | ||
| - route_type: "llm/v1/chat" | ||
| model: | ||
| provider: "openai" | ||
| options: | ||
| upstream_url: ${{ env "DECK_LLM_BACK_END_URL" }} | ||
| - name: ai-prompt-decorator | ||
| instance_name: ai-prompt-decorator-llm | ||
| config: | ||
| max_request_body_size: 1048576 | ||
| prompts: | ||
| prepend: | ||
| - role: system | ||
| content: "You will always respond in the style of a pirate." | ||
| - name: pre-function | ||
| instance_name: ai-pre-transform-llm | ||
| config: | ||
| access: | ||
| - |- | ||
| local function transform_payload(data) | ||
| if data.messages then | ||
| for i, message in ipairs(data.messages) do | ||
| if message.role == "system" and type(message.content) == "table" then | ||
| if #message.content == 1 and message.content[1].type == "text" then | ||
| message.content = message.content[1].text | ||
| end | ||
| end | ||
| end | ||
| end | ||
| return data | ||
| end | ||
| local body = kong.request.get_body() | ||
| if body and type(body) == "table" then | ||
| local transformed = transform_payload(body) | ||
| kong.service.request.set_body(transformed) | ||
| end |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.