Open Source Models + Reflexes
Open-weight models — GLM-5.2, MiniMax, DeepSeek V4 — on the same OpenAI-compatible API. Call one with the OpenAI package, then label every turn with a Reflex.Call a model
Point the OpenAI SDK at Morph and pick a model. Same key as everything else.Every model and its context window is on the Open Source Models page.
- TypeScript
- Python
Label every turn with Reflexes
One See the labels two ways: open the Traces dashboard, or pull them in code with
morphTracing call instruments the OpenAI SDK. Wrap the turn, name the Reflexes that label it, and Morph classifies each one async — off your request path, no added latency.- TypeScript
- Python
morph.traces.list() — each turn carries its labels under reflexResults. Tracing is async, so labels land shortly after the turn does.Want a label inline instead of async? Call morph.reflex.predict() and read the result on the spot: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.
Install
Add to your agent
The SDK provides tool factories for every major framework. One line gives your agent an For tool definition schemas, system prompt instructions, and output-parsing mode, see the Fast Apply product page.
edit_file tool:- Anthropic
- OpenAI
- Vercel AI SDK
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.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
Qwen, GLM, MiniMax, DeepSeek — context windows and pricing
Reflexes
Label every turn — jailbreaks, loops, frustration, and more
Fast Apply
Tool schemas, system prompts, and the lazy edit format
WarpGrep
Streaming, GitHub search, remote execution
MCP Integration
One command to add Morph to Claude Code, Cursor, or Codex
SDK Reference
Complete API documentation