Process API Guide
The Process API provides a unified /process/next endpoint that manages an entire construction session. Instead of calling plan, verify, and memory endpoints separately, you advance through a guided episode one step at a time.
How It Works
An episode has three phases: start (get the plan), advance (execute steps and get the next one), and complete (store the result).
Start an Episode
Response:
The start phase automatically runs recall. If a matching pattern exists, it's included so your agent can decide whether to follow it or plan fresh.
Advance Through Steps
After your LLM executes a step, advance to get the next one:
Each advance call automatically verifies the intermediate result. If verification detects issues, the response includes repair suggestions:
Complete the Episode
When all steps are done, complete the episode to store it in memory:
Domain-Language Translation
The Process API translates between your domain language and Masar's internal operations. When you specify domain="helpdesk", step hints and action descriptions use helpdesk terminology ("ticket", "routing", "SLA") instead of generic terms ("entity", "trait", "transition").
This makes the API output more useful as direct context for your LLM.
Next Steps
- Agent Integration - Use the Process API in a LangChain agent
- Custom Domains - Define your own domain vocabulary