Skip to main content

One command to move your agent to Kimi K3.1

Move a production agent off Anthropic or OpenAI onto Kimi K3.1 — a 5% traffic trial or a full migration. One command installs the Morph toolkit and the morph-migrate skill, and points your own Claude Code at Kimi K3.1:
Terminal
Then run /morph-migrate in your project, or paste this into Cursor, Claude Code, or another agent:
Agent prompt
The agent finds your LLM call sites, wires a 5% canary (or a full switch) so you can compare before you commit. Reversible with morph-setup --restore.

Open Source Models

Open-weight models — Kimi K3.1, GLM-5.3, GLM-5.3-Flash, DeepSeek V4.1 Flash — on the same OpenAI-compatible API. Call one with the OpenAI package.
1

Call a model

Point the OpenAI SDK at Morph and pick a model.
Every model and its context window is on the Open Source Models page.

Fast Apply

Your agent outputs a lazy edit snippet (changed lines + // ... existing code ... markers). Morph merges it into the original file and returns the result. 98% accuracy, sub-second latency.
1

Install

Get your API key from the dashboard.
2

Run it

Save as apply.ts and run:
The instructions parameter must be generated by the model, not hardcoded. It provides context for ambiguous edits. Example: “Adding error handling to the user auth and removing the old auth functions.”
3

Add to your agent

The SDK has tool factories for every major framework — one line gives your agent an edit_file tool:
For tool definition schemas, system prompt instructions, and output-parsing mode, see the Fast Apply product page.

WarpGrep

Code search subagent. Searches your codebase in its own context window, finds relevant code in 3.8 steps, returns file/line-range spans. Your agent’s context stays clean.
1

Install

Same @morphllm/morphsdk from above — WarpGrep needs ripgrep on your PATH.
2

Run it

3

Add to your agent

Same factory pattern as Fast Apply — createWarpGrepTool for any framework:
morph.openai.createWarpGrepTool() and morph.vercel.createWarpGrepTool() mirror this. For streaming, GitHub search, sandbox execution, and the raw API protocol, see the WarpGrep product page.

Next Steps

Open Source Models

Kimi K3.1, GLM-5.3, GLM-5.3-Flash, DeepSeek V4.1 Flash — context windows and pricing

Fast Apply

Tool schemas, system prompts, and the lazy edit format

WarpGrep

Streaming, GitHub search, remote execution

morph CLI + skills

One command to add Morph to Claude Code, Cursor, Codex, or OpenCode

SDK Reference

Complete API documentation