Run
Model calls, tools, services, routing, and retries live in focused TypeScript nodes.
Product / Runtime contracts
Stream typed output, pause for human input, resume from a checkpoint, and keep session history without writing a second state model for React.
Agent node
check policy
Stream
typed decision
React
approve refund
The runtime lifecycle
Model calls, tools, services, routing, and retries live in focused TypeScript nodes.
Text, validated fields, tool events, and errors reach the interface over one protocol.
The workflow checkpoints while React renders a choice, form, or custom component.
Regenerate, roll back, or fork with transcript and server state kept together.
Typed output and human input
Application code can own the question with useInterrupt. When the model should decide what to ask, the schemas can live directly in useReason.
// review-refund.node.ts
const result = await useReason<RefundDecision, Review, Action>({
id: "refund-review",
model: google("gemini-2.5-flash"),
input: orderAndPolicy,
outputSchema: refundDecisionSchema,
structured: { fields: {
summary: "text-delta",
recommendation: "set",
} },
interrupt: {
schemaId: "refund-approval",
requestSchema, responseSchema,
},
});Kortyx runtime state
State needed to execute, pause, resume, and revisit an agent workflow.
Your product state
Durable business data stays in the services and database your application already owns.
Kortyx carries stream events, checkpoints, and human responses between the workflow and React.