ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Plug Scavio into a Kimi Agent Swarm
Tutorial

How to Plug Scavio into a Kimi Agent Swarm

Wire Scavio into Moonshot Kimi's agent swarm runtime using MCP so every sub-agent gets real-time search without per-agent keys.

Get Free API KeyAPI Docs

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.

Bash
npm install -g @scavio/mcp

Step 2: Register the MCP in Kimi swarm config

Kimi reads ~/.kimi/swarm.json for shared tools.

JSON
{
  "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.

JSON
{
  "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.

Bash
kimi-swarm run ./workflow.yaml --agents 50

Step 5: Verify tool hits in logs

Each Scavio call is logged with the calling agent id for audit.

Bash
kimi-swarm logs --tool scavio.search --tail

Python Example

Python
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

JavaScript
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

JSON
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.

Related Tutorials

  • How to Add Real-Time Search to Claude via MCP
  • How to Connect MCP to Reddit and Twitter APIs
  • How to Build a Claude Skill with Search

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Kimi swarm runtime (kimi-swarm CLI). A Scavio API key. Node.js 20+. @scavio/mcp installed globally. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Use Case

MCP Search Gateway for Multi-Agent Systems

Read more
Use Case

Hermes Agent Search API Reliability

Read more
Comparison

MCP Search Integration vs Direct API Integration

Read more
Best Of

Best Search API for Hermes Agent in 2026

Read more
Best Of

Best Search API for MCP Servers in 2026

Read more
Solution

Add Unified Search to Multi-Agent Systems with Scavio

Read more

Start Building

Wire Scavio into Moonshot Kimi's agent swarm runtime using MCP so every sub-agent gets real-time search without per-agent keys.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy