Kiro
Access 12 Kiro models through Mastra's model router. Authentication is handled automatically using the KIRO_API_KEY environment variable.
Learn more in the Kiro documentation.
.env
KIRO_API_KEY=your-api-key
src/mastra/agents/my-agent.ts
import { Agent } from "@mastra/core/agent";
const agent = new Agent({
id: "my-agent",
name: "My Agent",
instructions: "You are a helpful assistant",
model: "kiro/auto"
});
// Generate a response
const response = await agent.generate("Hello!");
// Stream a response
const stream = await agent.stream("Tell me a story");
for await (const chunk of stream) {
console.log(chunk);
}
info
Mastra uses the OpenAI-compatible /chat/completions endpoint. Some provider-specific features may not be available. Check the Kiro documentation for details.
ModelsDirect link to Models
| Model | Context | Tools | Reasoning | Image | Audio | Video | Input $/1M | Output $/1M |
|---|---|---|---|---|---|---|---|---|
kiro/auto | 1.0M | — | — | |||||
kiro/claude-haiku-4.5 | 200K | — | — | |||||
kiro/claude-opus-4.5 | 200K | — | — | |||||
kiro/claude-opus-4.6 | 1.0M | — | — | |||||
kiro/claude-opus-4.7 | 1.0M | — | — | |||||
kiro/claude-sonnet-4 | 200K | — | — | |||||
kiro/claude-sonnet-4.5 | 200K | — | — | |||||
kiro/claude-sonnet-4.6 | 1.0M | — | — | |||||
kiro/deepseek-3.2 | 164K | — | — | |||||
kiro/minimax-m2.1 | 196K | — | — | |||||
kiro/minimax-m2.5 | 196K | — | — | |||||
kiro/qwen3-coder-next | 256K | — | — |
Advanced configurationDirect link to Advanced configuration
Custom headersDirect link to Custom headers
src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "custom-agent",
name: "custom-agent",
model: {
url: "https://q.us-east-1.amazonaws.com",
id: "kiro/auto",
apiKey: process.env.KIRO_API_KEY,
headers: {
"X-Custom-Header": "value"
}
}
});
Dynamic model selectionDirect link to Dynamic model selection
src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "dynamic-agent",
name: "Dynamic Agent",
model: ({ requestContext }) => {
const useAdvanced = requestContext.task === "complex";
return useAdvanced
? "kiro/qwen3-coder-next"
: "kiro/auto";
}
});
Direct provider installationDirect link to Direct provider installation
This provider can also be installed directly as a standalone package, which can be used instead of the Mastra model router string. View the package documentation for more details.
- npm
- pnpm
- Yarn
- Bun
npm install kiro-acp-ai-provider
pnpm add kiro-acp-ai-provider
yarn add kiro-acp-ai-provider
bun add kiro-acp-ai-provider