Moonshot's Kimi agent swarm runtime became popular in early 2026 for running 10-100 sub-agents on cheap context. The missing piece is grounded web search: Kimi ships without a built-in search tool. This tutorial wires Scavio into the Kimi swarm via MCP so every sub-agent shares one search backend.
Prerequisites
- Kimi swarm runtime (kimi-swarm CLI)
- A Scavio API key
- Node.js 20+
- @scavio/mcp installed globally
Walkthrough
Step 1: Install the Scavio MCP server
One install exposes Scavio as a typed MCP toolset.
npm install -g @scavio/mcpStep 2: Register the MCP in Kimi swarm config
Kimi reads ~/.kimi/swarm.json for shared tools.
{
"sharedTools": {
"scavio": {
"transport": "mcp",
"command": "scavio-mcp",
"env": { "SCAVIO_API_KEY": "sk_live_..." }
}
}
}Step 3: Declare tool access per agent role
Grant search only to research sub-agents, not planners.
{
"roles": {
"researcher": { "tools": ["scavio.search", "scavio.reddit_search"] },
"planner": { "tools": [] }
}
}Step 4: Launch the swarm
Kimi routes search calls through the shared MCP, so 50 agents share one API key.
kimi-swarm run ./workflow.yaml --agents 50Step 5: Verify tool hits in logs
Each Scavio call is logged with the calling agent id for audit.
kimi-swarm logs --tool scavio.search --tailPython Example
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
def kimi_tool_search(query: str):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': query})
return r.json().get('organic_results', [])[:5]
if __name__ == '__main__':
print(kimi_tool_search('Moonshot Kimi swarm 2026'))JavaScript Example
const API_KEY = process.env.SCAVIO_API_KEY;
export async function kimiSearch(query) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ query })
});
const data = await r.json();
return data.organic_results?.slice(0, 5) || [];
}Expected Output
50 Kimi sub-agents share one Scavio key. Logs show per-agent tool hits with ~40ms overhead per call. Total swarm cost: ~1 credit per research sub-agent call.