Moonshot AI
Use Moonshot AI (Kimi) models with Docker Agent.
Overview
Moonshot AI serves its Kimi model family through an OpenAI-compatible API. The Kimi K2 models have strong momentum for coding and agentic tasks. Docker Agent includes built-in support for Moonshot AI as an alias provider.
Use the provider ID moonshotai. The legacy ID moonshot is also accepted.
Setup
Create an API key from the Moonshot AI console.
Set the environment variable:
export MOONSHOT_API_KEY=your-api-key
Usage
Inline Syntax
The simplest way to use Moonshot AI:
agents:
root:
model: moonshotai/kimi-k3
description: Assistant using Moonshot AI
instruction: You are a helpful assistant.Named Model
For more control over parameters:
models:
moonshot_model:
provider: moonshotai
model: kimi-k3
temperature: 0.7
max_tokens: 8192
agents:
root:
model: moonshot_model
description: Assistant using Moonshot AI
instruction: You are a helpful assistant.Available Models
Moonshot AI exposes a vendor-controlled Kimi model lineup. Check the Moonshot API documentation for current model IDs, context limits, and pricing.
| Model | Description |
|---|---|
kimi-k3 | Kimi K3, general-purpose chat, coding, and tool calling |
kimi-k2-turbo-preview | Kimi K2 optimized for higher throughput |
kimi-k2-thinking | Kimi K2 extended-reasoning model |
Model IDs are case-sensitive and must be passed exactly as the catalogue lists them.
How It Works
Moonshot AI is implemented as a built-in alias in Docker Agent:
- API Type: OpenAI-compatible (
openai_chatcompletions) - Base URL:
https://api.moonshot.ai/v1 - Token Variable:
MOONSHOT_API_KEY
Example: Code Assistant
agents:
coder:
model: moonshotai/kimi-k3
description: Code assistant using Kimi K2
instruction: |
You are an expert programmer.
Write clean, well-documented code and follow language best practices.
toolsets:
- type: filesystem
- type: shell
- type: think