Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
publish website
Antonio Ojeaa85e460b25b9
diff --git a/.github/workflows/deploy-github-pages.yml b/.github/workflows/deploy-github-pages.ymlnew file mode 100644index 00000000..c8717249--- /dev/null+++ b/.github/workflows/deploy-github-pages.yml@@ -0,0 +1,76 @@+# Copyright 2026 Google LLC+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# https://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+name: Deployment to GitHub Pages++on:+ workflow_dispatch:+ push:+ branches:+ - main+ paths:+ - 'site/**'+ - 'docs/**'+ - '.github/workflows/deploy-github-pages.yml'+ pull_request:+ paths:+ - 'site/**'+ - 'docs/**'+ - '.github/workflows/deploy-github-pages.yml'++permissions:+ contents: write++env:+ REPO_NAME: ${{ github.event.repository.name }}+ REPO_OWNER: ${{ github.repository_owner }}++jobs:+ deploy:+ runs-on: ubuntu-latest+ concurrency:+ group: ${{ github.workflow }}-${{ github.ref }}+ steps:+ - uses: actions/checkout@v6+ with:+ fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod+ submodules: recursive # Fetch any git submodules if configured++ - name: Setup Hugo+ uses: peaceiris/actions-hugo@v3+ with:+ hugo-version: '0.136.5' # Matching local Hugo version+ extended: true++ - uses: actions/setup-node@v6+ with:+ node-version: '20'+ check-latest: true++ - name: Install PostCSS dependencies+ run: |+ npm init --yes+ npm install --save-dev autoprefixer postcss-cli postcss+ working-directory: ./site++ - name: Build Hugo Site+ run: hugo --baseURL https://sam-mesh.dev --minify+ working-directory: ./site++ - name: Deploy to GitHub Pages+ uses: peaceiris/actions-gh-pages@v4+ if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}+ with:+ github_token: ${{ secrets.GITHUB_TOKEN }}+ publish_dir: ./site/public+ cname: sam-mesh.devdiff --git a/README.md b/README.mdindex af86918e..772ac401 100644--- a/README.md+++ b/README.md@@ -1,6 +1,6 @@# SAM: Sovereign Agent Mesh-<img alt="SAM" src="docs/sam_logo.png" />+<img alt="SAM" src="site/content/docs/sam_logo.png" />SAM is a smart network built for autonomous AI agents:@@ -24,14 +24,15 @@ Start exploring the Sovereign Agent Mesh:### For Users & OperatorsGet a node running on the public testnet (`bananas.sam-mesh.dev`) in minutes:-- π **[User Quick Start Guide](docs/quickstart.md)**: Connect and run a SAM node using Docker and query the local MCP server via `curl`.-- π **[CLI Reference](docs/cli/reference.md)**: Comprehensive CLI reference and configurations.-- π‘ **[Testnet Validation Tutorial](docs/testnet-validation.md)**: Real-time verification, remote tool invocation, and HTTP stream proxies.+- π **[User Quick Start Guide](site/content/docs/quickstart.md)**: Connect and run a SAM node using binaries or Docker, and query the local MCP server.+- π€ **[Agent Integration Guides](site/content/docs/agent_integration.md)**: Connect Google Gemini, Claude, and other AI agents to your SAM node to dynamically discover and call tools across the mesh.+- π **[CLI Reference](site/content/docs/cli/reference.md)**: Comprehensive CLI reference and configurations.+- π‘ **[Testnet Validation Tutorial](site/content/docs/testnet-validation.md)**: Real-time verification, remote tool invocation, and HTTP stream proxies.### For Developers & ContributorsCompile from source, run local clusters, or execute tests:-- π οΈ **[Developer Guide](docs/development.md)**: Prereqs, compilation, local hub setup, and Kubernetes Kind deployment.-- π§ͺ **[Testing Guide](docs/testing.md)**: Go tests, E2E BATS, and containerized mesh execution.+- π οΈ **[Developer Guide](site/content/docs/development.md)**: Prereqs, compilation, local hub setup, and Kubernetes Kind deployment.+- π§ͺ **[Testing Guide](site/content/docs/testing.md)**: Go tests, E2E BATS, and containerized mesh execution.---diff --git a/docs/_sidebar.md b/docs/_sidebar.mddeleted file mode 100644index 9c1aefda..00000000--- a/docs/_sidebar.md+++ /dev/null@@ -1,7 +0,0 @@-- [Overview](#/README.md)-- [Quick Start](#/quickstart.md)-- [Agent Integration](#/agent_integration.md)-- [CLI Reference](#/cli/reference.md)-- [Testing](#/testing.md)-- [Testnet Validation](#/testnet-validation.md)-- [License](https://github.com/google/sam/blob/main/LICENSE)diff --git a/docs/index.html b/docs/index.htmldeleted file mode 100644index b7e48fcf..00000000--- a/docs/index.html+++ /dev/null@@ -1,181 +0,0 @@-<!DOCTYPE html>-<!--- Copyright 2026 Google LLC-- Licensed under the Apache License, Version 2.0 (the "License");- you may not use this file except in compliance with the License.- You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing, software- distributed under the License is distributed on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- See the License for the specific language governing permissions and- limitations under the License.--->--<html lang="en">--<head>- <meta charset="UTF-8">- <title>SAM - Sovereign Agent Mesh</title>- <meta http-equiv="X-UA-Compatible" content="IE=edge" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <meta name="description" content="Zero-Trust Networking for Autonomous Agents" />-- <!-- Docsify Stylesheet -->- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/themes/dark.css" />-- <!-- Custom Styles -->- <style>- :root {- --primary-color: #6366f1;- --heading-color: #e0e7ff;- --text-color: #e5e7eb;- --border-color: #4f46e5;- --code-color: #1f2937;- }-- body {- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;- }-- .sidebar {- background-color: #0f172a;- border-right: 1px solid var(--border-color);- }-- .markdown-section h1 {- border-bottom: 2px solid var(--primary-color);- }-- .markdown-section code {- background-color: var(--code-color);- padding: 2px 6px;- border-radius: 3px;- }-- .markdown-section pre code {- background-color: #1e293b;- color: #e2e8f0;- }- </style>- <!-- Google tag (gtag.js) -->- <script async src="https://www.googletagmanager.com/gtag/js?id=G-F9G8NX0SBT"></script>- <script>- window.dataLayer = window.dataLayer || [];- function gtag() { dataLayer.push(arguments); }- gtag('js', new Date());-- gtag('config', 'G-F9G8NX0SBT');- </script>-</head>--<body>- <div id="app">Loading SAM documentation...</div>-- <script>- window.$docsify = {- name: '<img src="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text x=%2210%22 y=%2275%22 font-size=%2280%22 fill=%22%236366f1%22>β‘</text></svg>" style="height: 2rem; margin-right: 8px;"/> SAM',- repo: 'https://github.com/google/sam',-- // Documentation settings- loadSidebar: true,- loadNavbar: false,- coverpage: false,- auto2top: true,-- // Search plugin- search: {- paths: 'auto',- placeholder: 'Search documentation...',- noData: 'No matching results',- depth: 3,- },-- // Sidebar configuration- maxLevel: 3,- subMaxLevel: 2,- sidebarDisplayLevel: 1,-- // Markdown rendering- markdown: {- pedantic: false,- gfm: true,- breaks: false,- sanitize: false,- smartLists: true,- smartypants: true,- highlight(code, lang) {- if (lang === 'bash' || lang === 'shell') {- return '<pre class="hljs"><code>' + Docsify.escapeHtml(code) + '</code></pre>';- }- return '<pre class="hljs"><code class="language-' + lang + '">' + Docsify.escapeHtml(code) + '</code></pre>';- },- },-- // Plugins- plugins: [- function (hook) {- // Copy-to-clipboard for code blocks- hook.doneEach(() => {- const blocks = document.querySelectorAll('pre');- blocks.forEach(block => {- const code = block.querySelector('code');- if (code && !block.querySelector('.copy-btn')) {- const btn = document.createElement('button');- btn.className = 'copy-btn';- btn.innerText = 'Copy';- btn.style.cssText = `- position: absolute;- top: 5px;- right: 5px;- padding: 4px 8px;- background-color: #4f46e5;- color: white;- border: none;- border-radius: 4px;- cursor: pointer;- font-size: 12px;- `;- btn.addEventListener('click', () => {- const text = code.innerText;- navigator.clipboard.writeText(text).then(() => {- btn.innerText = 'Copied!';- setTimeout(() => { btn.innerText = 'Copy'; }, 2000);- });- });- block.style.position = 'relative';- block.appendChild(btn);- }- });- });- },- ],-- // Footer- footer: {- copy: '<span>© 2026 SAM Contributors. <a href="https://github.com/google/sam/blob/main/LICENSE">License</a></span>',- auth: '',- pre: '<hr/>',- style: 'text-align: center;',- },- };- </script>-- <!-- Docsify Core -->- <script src="//cdn.jsdelivr.net/npm/docsify@4"></script>-- <!-- Plugins -->- <script src="//cdn.jsdelivr.net/npm/docsify-search@1"></script>- <script src="//cdn.jsdelivr.net/npm/docsify-footer-enh@1"></script>-- <!-- Syntax Highlighting -->- <script src="//cdn.jsdelivr.net/npm/[email protected]/prism.min.js"></script>- <script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-bash.min.js"></script>- <script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-go.min.js"></script>- <script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-json.min.js"></script>-</body>--</html>\ No newline at end of filediff --git a/sam-mcp-python/examples/gemini_agent.py b/sam-mcp-python/examples/gemini_agent.pynew file mode 100644index 00000000..bece88a5--- /dev/null+++ b/sam-mcp-python/examples/gemini_agent.py@@ -0,0 +1,148 @@+import asyncio+import os+import sys+from google import genai+from google.genai import types+from sam_mcp.client import SamClient++# Helper to recursively map MCP (JSON Schema) types to Gemini (OpenAPI Schema) types+def to_gemini_schema(mcp_schema: dict) -> dict:+ if not isinstance(mcp_schema, dict):+ return mcp_schema++ gemini_schema = {}+ for k, v in mcp_schema.items():+ if k == "type" and isinstance(v, str):+ # Gemini expects uppercase types (e.g. 'STRING', 'OBJECT')+ gemini_schema[k] = v.upper()+ elif k == "properties" and isinstance(v, dict):+ gemini_schema[k] = {prop_name: to_gemini_schema(prop_val) for prop_name, prop_val in v.items()}+ elif k == "items" and isinstance(v, dict):+ gemini_schema[k] = to_gemini_schema(v)+ else:+ gemini_schema[k] = v++ return gemini_schema++async def run_agent():+ # 1. Connect to local SAM Node+ # By default, connects to http://localhost:8080/mcp/events+ print("Connecting to local SAM Node...")+ client = SamClient()+ try:+ await client.connect()+ except Exception as e:+ print(f"Error: Failed to connect to local SAM Node: {e}")+ print("Make sure sam-node is running (e.g. 'sam-node run --bind-addr 127.0.0.1:8080')")+ sys.exit(1)++ print("Successfully connected!")++ # 2. Get available tools from the Mesh+ mcp_tools = await client.get_tools()+ print(f"Discovered {len(mcp_tools)} tools in the mesh.")+ for t in mcp_tools:+ print(f" - {t['name']}: {t.get('description', '')}")++ # 3. Build Gemini Tool Declarations+ gemini_functions = []+ for tool in mcp_tools:+ # Build parameters schema+ params_schema = to_gemini_schema(tool.get("inputSchema", {}))++ # Define the function declaration+ decl = types.FunctionDeclaration(+ name=tool["name"],+ description=tool.get("description", ""),+ parameters=params_schema+ )+ gemini_functions.append(decl)++ # Wrap function declarations into a Gemini Tool+ gemini_tools = [types.Tool(function_declarations=gemini_functions)]++ # 4. Initialize Gemini Client+ # Requires GEMINI_API_KEY environment variable+ api_key = os.environ.get("GEMINI_API_KEY")+ if not api_key:+ print("\nWarning: GEMINI_API_KEY environment variable not set.")+ print("Please export it to run the AI agent: export GEMINI_API_KEY=\"your-key\"")+ await client.close()+ sys.exit(1)++ ai = genai.Client(api_key=api_key)+ # Using the recommended model for function calling+ model_name = "gemini-2.5-flash"++ print(f"\nInitialized Gemini Agent ({model_name}) with Mesh Tools.")+ print("You can now ask questions! Type 'exit' or 'quit' to stop.")+ print("-" * 60)++ # 5. Interactive Chat Loop+ # We use chat session to maintain history+ chat = ai.chats.create(+ model=model_name,+ config=types.GenerateContentConfig(+ tools=gemini_tools,+ system_instruction="You are an AI agent running inside the Sovereign Agent Mesh (SAM). "+ "You have access to tools registered by other peers in the mesh. "+ "If a user asks you to perform a task, check if there's a tool that can solve it. "+ "Always prioritize using tools to explore or interact with the mesh."+ )+ )++ while True:+ try:+ user_input = input("\nYou > ")+ if user_input.lower() in ["exit", "quit"]:+ break+ if not user_input.strip():+ continue++ # Send message to Gemini+ response = chat.send_message(user_input)++ # Handle function calling loop (Gemini might make multiple calls sequentially)+ while response.function_calls:+ for call in response.function_calls:+ print(f"\n[Agent wants to call tool: {call.name} with args: {call.args}]")++ # Convert Gemini args Map to normal dict+ args = dict(call.args) if call.args else {}++ # Call the tool via local SAM Node+ try:+ result = await client.call_tool(call.name, args)+ print(f"[Tool Result]: {result}")++ # Send tool response back to Gemini+ response = chat.send_message(+ types.Part.from_function_response(+ name=call.name,+ response={"result": result}+ )+ )+ except Exception as tool_err:+ print(f"[Tool Error]: {tool_err}")+ # Send error back to model so it knows it failed+ response = chat.send_message(+ types.Part.from_function_response(+ name=call.name,+ response={"error": str(tool_err)}+ )+ )++ # Print Gemini's final response text+ if response.text:+ print(f"\nAgent > {response.text}")++ except KeyboardInterrupt:+ break+ except Exception as e:+ print(f"Error during interaction: {e}")++ await client.close()+ print("\nDisconnected. Goodbye!")++if __name__ == "__main__":+ asyncio.run(run_agent())diff --git a/site/.gitignore b/site/.gitignorenew file mode 100644index 00000000..00046aaa--- /dev/null+++ b/site/.gitignore@@ -0,0 +1,5 @@+/public/+/resources/+/node_modules/+package-lock.json+.hugo_build.lockdiff --git a/site/archetypes/default.md b/site/archetypes/default.mdnew file mode 100644index 00000000..25b67521--- /dev/null+++ b/site/archetypes/default.md@@ -0,0 +1,5 @@+++++date = '{{ .Date }}'+draft = true+title = '{{ replace .File.ContentBaseName "-" " " | title }}'++++diff --git a/site/assets/scss/_styles_project.scss b/site/assets/scss/_styles_project.scssnew file mode 100644index 00000000..8ebcf66e--- /dev/null+++ b/site/assets/scss/_styles_project.scss@@ -0,0 +1,28 @@+.td-navbar {+ border-bottom: 2px solid $primary-light;+}++// Homepage cover block with SAM logo background+.td-cover-block {+ background-color: #ffffff !important;+ background-image: url('/sam_logo.png') !important;+ background-repeat: no-repeat !important;+ background-position: center 30% !important; // Pushes image slightly higher to leave room for buttons+ background-size: contain !important;++ // Set minimum height to display the logo nicely+ min-height: 75vh !important;++ // Layout to push buttons to the bottom+ display: flex !important;+ flex-direction: column !important;+ justify-content: flex-end !important;+ padding-bottom: 4rem !important;+}++// Remove the default dark overlay shadow on the cover block+.td-overlay::before {+ background: transparent !important;+ opacity: 0 !important;+}+diff --git a/site/assets/scss/_variables_project.scss b/site/assets/scss/_variables_project.scssnew file mode 100644index 00000000..0f7530a1--- /dev/null+++ b/site/assets/scss/_variables_project.scss@@ -0,0 +1,13 @@+// SAM Logo Theme Color Overrides+$primary: #0a7080; // Deep teal (base of SAM text)+$primary-light: #00f0ff; // Cyberpunk glowing cyan (bananas' visors & wiring)+$yellow: #f6c344; // Banana yellow+$dark: #07131e; // Deep navy/charcoal (shield background and text)+$light: #f8fafc; // Off-white slate for body/sidebar backgrounds++// Docsy theme mappings+$td-brand: $primary;+$td-sidebar-bg-color: $light;+$td-footer-bg-color: $dark;+$link-color: $primary;+$link-hover-color: lighten($primary, 15%);diff --git a/site/content/_index.md b/site/content/_index.mdnew file mode 100644index 00000000..830fd9d0--- /dev/null+++ b/site/content/_index.md@@ -0,0 +1,10 @@+---+title: SAM+---++{{< blocks/cover title="" image_anchor="top" height="full" >}}+<div class="mt-5">+ <a class="btn btn-lg btn-primary me-3 mb-4" href="/docs/">Read the Docs</a>+ <a class="btn btn-lg btn-secondary me-3 mb-4" href="https://github.com/google/sam" target="_blank" rel="noopener">GitHub Project</a>+</div>+{{< /blocks/cover >}}diff --git a/docs/README.md b/site/content/docs/_index.mdsimilarity index 100%rename from docs/README.mdrename to site/content/docs/_index.mddiff --git a/docs/agent_integration.md b/site/content/docs/agent_integration.mdsimilarity index 79%rename from docs/agent_integration.mdrename to site/content/docs/agent_integration.mdindex 3d40cedf..9cc5290c 100644--- a/docs/agent_integration.md+++ b/site/content/docs/agent_integration.md@@ -8,6 +8,15 @@ Every `sam-node` runs a local MCP server that allows agents to:- Query mesh information (e.g. `get_mesh_info`).- Call tools remotely (via `call_remote_tool`).+## Supported Agent Integrations++Explore the step-by-step guides to integrate SAM with your favorite AI Agent systems:++- [Google Gemini](integrations/gemini.md): Build an interactive client using the official `google-genai` Python SDK.+- [Claude Code](integrations/claude-code.md): Connect your local node as a remote MCP server to Claude Code.+- [Claude Desktop](integrations/claude-desktop.md): Use SAM to expose the P2P tool mesh to Claude Desktop.+- [OpenClaw](integrations/openclaw.md): Integrate your node as a remote tool bridge for OpenClaw.+## Connecting via MCPThe `sam-node` exposes the MCP server over HTTP Server-Sent Events (SSE). By default, it listens at `127.0.0.1:8080`.@@ -60,7 +69,7 @@ if __name__ == "__main__":asyncio.run(main())```-*(You can find this snippet at `docs/snippets/agent_demo.py`)*+*(You can find this snippet at `site/content/docs/snippets/agent_demo.py`)*### Example Outputdiff --git a/docs/cli/reference.md b/site/content/docs/cli/reference.mdsimilarity index 100%rename from docs/cli/reference.mdrename to site/content/docs/cli/reference.mddiff --git a/docs/development.md b/site/content/docs/development.mdsimilarity index 100%rename from docs/development.mdrename to site/content/docs/development.mddiff --git a/docs/integrations/claude-code.md b/site/content/docs/integrations/claude-code.mdsimilarity index 100%rename from docs/integrations/claude-code.mdrename to site/content/docs/integrations/claude-code.mddiff --git a/docs/integrations/claude-desktop.md b/site/content/docs/integrations/claude-desktop.mdsimilarity index 100%rename from docs/integrations/claude-desktop.mdrename to site/content/docs/integrations/claude-desktop.mddiff --git a/site/content/docs/integrations/gemini.md b/site/content/docs/integrations/gemini.mdnew file mode 100644index 00000000..105af252--- /dev/null+++ b/site/content/docs/integrations/gemini.md@@ -0,0 +1,88 @@+# Running a Gemini AI Agent on the Mesh++This tutorial demonstrates how to connect a local AI Agent powered by Google Gemini (using the official `google-genai` SDK) to your local SAM node.++By exposing the SAM Model Context Protocol (MCP) server to Gemini, the agent can dynamically discover tools hosted by other peers in the mesh, describe them, and execute them to solve tasks.++---++## Prerequisites++1. **Python 3.10+**: Ensure Python is installed on your host.+2. **SAM Node Running**: A local SAM node should be running and enrolled on the testnet (see the [Quick Start Guide](../quickstart.md)).+3. **Gemini API Key**: Obtain an API key from Google AI Studio and export it:+ ```bash+ export GEMINI_API_KEY="your-api-key-here"+ ```++---++## 1. Setup the Python Client++Go to the `sam-mcp-python` directory in the repository:++```bash+cd sam-mcp-python+```++Create a virtual environment and install the required dependencies:++```bash+# Create and activate virtual environment+python3 -m venv .venv+source .venv/bin/activate++# Install the SAM Python SDK and Gemini SDK+pip install . google-genai+```++---++## 2. Run the Gemini Agent++Start the interactive agent:++```bash+python3 examples/gemini_agent.py+```++Upon starting, the script will:+1. Connect to the local SAM node's MCP server at `http://localhost:8080/mcp/events`.+2. Discover all tools currently available in the mesh.+3. Map the mesh tools to Gemini-compatible OpenAPI schemas.+4. Spin up a chat loop with Gemini (`gemini-2.5-flash`).++---++## 3. Interact with the Agent++Once the agent is online, you can prompt it in plain English. If a task requires tools registered in the mesh, Gemini will automatically call them.++### Example 1: Explore the Mesh+Ask the agent what it can see in the mesh:+```text+You > How many nodes are currently connected to the mesh? And what are their Peer IDs?++[Agent wants to call tool: get_mesh_info with args: {}]+[Tool Result]: {'connected_peers': ['12D3KooWD3m6Jfry...'], 'dht_size': 1, ...}++Agent > There is currently 1 active peer connected to the mesh with Peer ID 12D3KooWD3m6Jfry...+```++### Example 2: Call Remote Tools Dynamically+If another node on the mesh is hosting a tool (e.g. `everything.get-sum`), you can ask Gemini to compute a sum. It will find the tool, query its schema, and execute it:++```text+You > Can you sum 1234.5 and 5678.9 using a tool in the mesh?++[Agent wants to call tool: find_remote_tools with args: {}]+[Tool Result]: ... 'name': 'everything.get-sum', 'description': 'Sums two floats', 'peer_id': '12D3KooWD3m6Jfry...' ...++[Agent wants to call tool: describe_remote_tool with args: {'peer_id': '12D3KooWD3m6Jfry...', 'tool_name': 'everything.get-sum'}]+[Tool Result]: {'inputSchema': {'properties': {'a': {'type': 'number'}, 'b': {'type': 'number'}}, 'required': ['a', 'b']}}++[Agent wants to call tool: call_remote_tool with args: {'peer_id': '12D3KooWD3m6Jfry...', 'tool_name': 'everything.get-sum', 'arguments': {'a': 1234.5, 'b': 5678.9}}]+[Tool Result]: {'result': {'sum': 6913.4}}++Agent > The sum of 1234.5 and 5678.9 is 6913.4, calculated using the 'everything.get-sum' tool hosted on peer 12D3KooWD3m6Jfry...+```diff --git a/docs/integrations/openclaw.md b/site/content/docs/integrations/openclaw.mdsimilarity index 100%rename from docs/integrations/openclaw.mdrename to site/content/docs/integrations/openclaw.mddiff --git a/docs/kubernetes-deployment.md b/site/content/docs/kubernetes-deployment.mdsimilarity index 100%rename from docs/kubernetes-deployment.mdrename to site/content/docs/kubernetes-deployment.mddiff --git a/docs/manifests/mock-oidc.yaml b/site/content/docs/manifests/mock-oidc.yamlsimilarity index 100%rename from docs/manifests/mock-oidc.yamlrename to site/content/docs/manifests/mock-oidc.yamldiff --git a/docs/manifests/sam-hub.yaml b/site/content/docs/manifests/sam-hub.yamlsimilarity index 100%rename from docs/manifests/sam-hub.yamlrename to site/content/docs/manifests/sam-hub.yamldiff --git a/docs/policy.md b/site/content/docs/policy.mdsimilarity index 100%rename from docs/policy.mdrename to site/content/docs/policy.mddiff --git a/docs/quickstart.md b/site/content/docs/quickstart.mdsimilarity index 73%rename from docs/quickstart.mdrename to site/content/docs/quickstart.mdindex 0fa6007c..683c00d9 100644--- a/docs/quickstart.md+++ b/site/content/docs/quickstart.md@@ -81,52 +81,40 @@ docker run -d \```Verify the node is running with `docker logs sam-node`.-----## 4. Query the Local MCP API-Your SAM node exposes a standard Model Context Protocol (MCP) server over HTTP Server-Sent Events (SSE) at `http://localhost:8080/mcp/message`. You can interact with it using simple `curl` commands.+Your SAM node exposes a standard Model Context Protocol (MCP) server. The easiest way to interact with it is using the `mcp-client` CLI tool (which is installed alongside `sam-node`):### List Local Control Plane ToolsQuery the list of tools available on your local node (e.g. peer discovery, message broadcast, and remote tool execution):```bash-curl -X POST \- -H "Authorization: Bearer my-secret-token" \- -H "Content-Type: application/json" \- -d '{"jsonrpc":"2.0","method":"tools/list","id":1}' \- http://localhost:8080/mcp/message+mcp-client -url http://localhost:8080/mcp/events -list```### Discover Remote Services in the MeshList active MCP services currently registered across the public mesh network:```bash-curl -X POST \- -H "Authorization: Bearer my-secret-token" \- -H "Content-Type: application/json" \- -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"discover_remote_services","arguments":{"type":"mcp"}},"id":2}' \- http://localhost:8080/mcp/message+mcp-client -url http://localhost:8080/mcp/events \+ -tool discover_remote_services \+ -args '{"type":"mcp"}'```### Find Remote Tools on a PeerUsing a `peer_id` returned from the service discovery, find the tools available on that peer:```bash-curl -X POST \- -H "Authorization: Bearer my-secret-token" \- -H "Content-Type: application/json" \- -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"find_remote_tools","arguments":{"peer_id":"<target-peer-id>"}},"id":3}' \- http://localhost:8080/mcp/message+mcp-client -url http://localhost:8080/mcp/events \+ -tool find_remote_tools \+ -args '{"peer_id":"<target-peer-id>"}'```### Call a Remote ToolCall a tool hosted on a remote peer through your local node's P2P stream reverse proxy:```bash-curl -X POST \- -H "Authorization: Bearer my-secret-token" \- -H "Content-Type: application/json" \- -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"call_remote_tool","arguments":{"peer_id":"<target-peer-id>","tool_name":"everything.get-sum","arguments":{"a":12.5,"b":7.5}}},"id":4}' \- http://localhost:8080/mcp/message+mcp-client -url http://localhost:8080/mcp/events \+ -tool call_remote_tool \+ -args '{"peer_id":"<target-peer-id>","tool_name":"everything.get-sum","arguments":{"a":12.5,"b":7.5}}'```diff --git a/docs/release-tracks.md b/site/content/docs/release-tracks.mdsimilarity index 100%rename from docs/release-tracks.mdrename to site/content/docs/release-tracks.mddiff --git a/docs/sam_logo.png b/site/content/docs/sam_logo.pngsimilarity index 100%rename from docs/sam_logo.pngrename to site/content/docs/sam_logo.pngdiff --git a/docs/snippets/agent_demo.py b/site/content/docs/snippets/agent_demo.pysimilarity index 100%rename from docs/snippets/agent_demo.pyrename to site/content/docs/snippets/agent_demo.pydiff --git a/docs/snippets/banana_bot_playground.py b/site/content/docs/snippets/banana_bot_playground.pysimilarity index 100%rename from docs/snippets/banana_bot_playground.pyrename to site/content/docs/snippets/banana_bot_playground.pydiff --git a/docs/testing.md b/site/content/docs/testing.mdsimilarity index 100%rename from docs/testing.mdrename to site/content/docs/testing.mddiff --git a/docs/testnet-validation.md b/site/content/docs/testnet-validation.mdsimilarity index 100%rename from docs/testnet-validation.mdrename to site/content/docs/testnet-validation.mddiff --git a/site/go.mod b/site/go.modnew file mode 100644index 00000000..648041a7--- /dev/null+++ b/site/go.mod@@ -0,0 +1,8 @@+module github.com/google/sam/site++go 1.23.4++require (+ github.com/google/docsy v0.11.0 // indirect+ github.com/google/docsy/dependencies v0.7.2 // indirect+)diff --git a/site/go.sum b/site/go.sumnew file mode 100644index 00000000..7d2f09f1--- /dev/null+++ b/site/go.sum@@ -0,0 +1,8 @@+github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=+github.com/FortAwesome/Font-Awesome v0.0.0-20240716171331-37eff7fa00de/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=+github.com/google/docsy v0.11.0 h1:QnV40cc28QwS++kP9qINtrIv4hlASruhC/K3FqkHAmM=+github.com/google/docsy v0.11.0/go.mod h1:hGGW0OjNuG5ZbH5JRtALY3yvN8ybbEP/v2iaK4bwOUI=+github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI=+github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=+github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=+github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=diff --git a/site/hugo.toml b/site/hugo.tomlnew file mode 100644index 00000000..3faafc10--- /dev/null+++ b/site/hugo.toml@@ -0,0 +1,43 @@+title = "SAM"+baseURL = "https://sam-mesh.dev"+languageCode = "en-us"++enableRobotsTXT = true++# Point to the content directory+contentDir = "content"++[markup]+ [markup.highlight]+ codeFences = true+ hl_Lines = ""+ lineNoStart = 1+ lineNos = false+ lineNumbersInTable = true+ noClasses = false # Needed for dark mode theme switching+ style = "vs"+ tabWidth = 4++ [markup.goldmark.renderer]+ unsafe = true++# Enable Docsy's navigation structure+sectionPagesMenu = "main"++[module]+ [[module.imports]]+ path = "github.com/google/docsy"+ [[module.imports]]+ path = "github.com/google/docsy/dependencies"++[params]+ privacy_policy = "https://policies.google.com/privacy"+ github_repo = "https://github.com/google/sam"+ github_subdir = "docs"+ github_branch = "main"++ # Logo & branding colors will be customized via project styles++[services]+ [services.googleAnalytics]+ id = "G-F9G8NX0SBT"diff --git a/site/layouts/partials/hooks/head-end.html b/site/layouts/partials/hooks/head-end.htmlnew file mode 100644index 00000000..c1b043ee--- /dev/null+++ b/site/layouts/partials/hooks/head-end.html@@ -0,0 +1,3 @@+<!-- SAM Custom Favicons -->+<link rel="icon" type="image/png" href="/favicon.png?v=2">+<link rel="shortcut icon" href="/favicon.ico?v=2">diff --git a/site/package.json b/site/package.jsonnew file mode 100644index 00000000..745711de--- /dev/null+++ b/site/package.json@@ -0,0 +1,17 @@+{+ "name": "site",+ "version": "1.0.0",+ "description": "",+ "main": "index.js",+ "scripts": {+ "test": "echo \"Error: no test specified\" && exit 1"+ },+ "keywords": [],+ "author": "",+ "license": "ISC",+ "devDependencies": {+ "autoprefixer": "^10.5.2",+ "postcss": "^8.5.15",+ "postcss-cli": "^11.0.1"+ }+}diff --git a/site/static/favicon.ico b/site/static/favicon.iconew file mode 100644index 00000000..3d2a0db6Binary files /dev/null and b/site/static/favicon.ico differdiff --git a/site/static/favicon.png b/site/static/favicon.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicon.png differdiff --git a/site/static/favicons/android-144x144.png b/site/static/favicons/android-144x144.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/android-144x144.png differdiff --git a/site/static/favicons/android-192x192.png b/site/static/favicons/android-192x192.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/android-192x192.png differdiff --git a/site/static/favicons/android-36x36.png b/site/static/favicons/android-36x36.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/android-36x36.png differdiff --git a/site/static/favicons/android-48x48.png b/site/static/favicons/android-48x48.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/android-48x48.png differdiff --git a/site/static/favicons/android-72x72.png b/site/static/favicons/android-72x72.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/android-72x72.png differdiff --git a/site/static/favicons/android-96x96.png b/site/static/favicons/android-96x96.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/android-96x96.png differdiff --git a/site/static/favicons/apple-touch-icon-180x180.png b/site/static/favicons/apple-touch-icon-180x180.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/apple-touch-icon-180x180.png differdiff --git a/site/static/favicons/apple-touch-icon.png b/site/static/favicons/apple-touch-icon.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/apple-touch-icon.png differdiff --git a/site/static/favicons/favicon-1024.png b/site/static/favicons/favicon-1024.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/favicon-1024.png differdiff --git a/site/static/favicons/favicon-16x16.png b/site/static/favicons/favicon-16x16.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/favicon-16x16.png differdiff --git a/site/static/favicons/favicon-256.png b/site/static/favicons/favicon-256.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/favicon-256.png differdiff --git a/site/static/favicons/favicon-32x32.png b/site/static/favicons/favicon-32x32.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/favicon-32x32.png differdiff --git a/site/static/favicons/favicon.ico b/site/static/favicons/favicon.iconew file mode 100644index 00000000..3d2a0db6Binary files /dev/null and b/site/static/favicons/favicon.ico differdiff --git a/site/static/favicons/favicon.png b/site/static/favicons/favicon.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/favicon.png differdiff --git a/site/static/favicons/pwa-192x192.png b/site/static/favicons/pwa-192x192.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/pwa-192x192.png differdiff --git a/site/static/favicons/pwa-512x512.png b/site/static/favicons/pwa-512x512.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/pwa-512x512.png differdiff --git a/site/static/favicons/tile150x150.png b/site/static/favicons/tile150x150.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/tile150x150.png differdiff --git a/site/static/favicons/tile310x150.png b/site/static/favicons/tile310x150.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/tile310x150.png differdiff --git a/site/static/favicons/tile310x310.png b/site/static/favicons/tile310x310.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/tile310x310.png differdiff --git a/site/static/favicons/tile70x70.png b/site/static/favicons/tile70x70.pngnew file mode 100644index 00000000..55b4f617Binary files /dev/null and b/site/static/favicons/tile70x70.png differdiff --git a/site/static/sam_logo.png b/site/static/sam_logo.pngnew file mode 100644index 00000000..68b1ef2dBinary files /dev/null and b/site/static/sam_logo.png differdiff --git a/tests/e2e/docs_snippets.bats b/tests/e2e/docs_snippets.batsindex 218ef367..6896ced3 100644--- a/tests/e2e/docs_snippets.bats+++ b/tests/e2e/docs_snippets.bats@@ -32,7 +32,7 @@ teardown() {run docker run --rm \--network "${MESH_NETWORK}" \-v "$(pwd)/sam-mcp-python:/sam-mcp-python" \- -v "$(pwd)/docs/snippets:/snippets" \+ -v "$(pwd)/site/content/docs/snippets:/snippets" \-e PYTHONPATH=/sam-mcp-python/src \-e SAM_MCP_URL="http://sam-node-1:8080/mcp/events" \python:3.12 \