Put agent behavior in a workflow
Define model calls, tools, routes, retries, and replay-safe state in versioned TypeScript workflows.
Kortyx packages the TypeScript runtime and React code that kept showing up in every agent project: workflows, streaming, human interrupts, persistent state, resume, rollback, fork, and tracing.
Refund request #4831
Maya Lopez · wireless keyboard
Customer received the wrong keyboard layout and requested a refund.
Policy check
Within 30 days · unopened
Recommendation
Refund $84.00 to original card
Issue the $84.00 refund?
Execution is checkpointed. The same run resumes after the user decides.
Why Kortyx exists
Every project needed workflow conventions, model hooks, stream parsing, React state, human input, persistence, replay, and tracing.
Kortyx puts that repeated code into a TypeScript framework. You write the workflow, business rules, and interface for your product.
Define model calls, tools, routes, retries, and replay-safe state in versioned TypeScript workflows.
One SSE protocol carries text, structured data, tool events, interrupts, errors, and abort state into React.
Session checkpoints keep the React transcript and server workflow state together during regenerate, undo, rollback, and fork.
Shared run state
Server events map directly to the active React interface. Kortyx runs inside your application and leaves the workflow engine accessible.
Business rules · domain services · product data · interface
Business rules · domain services · product data · interface
Chat lifecycle · live pieces · interrupts · session actions
Chat lifecycle · live pieces · interrupts · session actions
Workflows · hooks · providers · persistence · transports · telemetry
Workflows · hooks · providers · persistence · transports · telemetry
Database · model providers · application server · telemetry
Database · model providers · application server · telemetry
A workflow people recognize
The workflow finds the order, checks policy, drafts a typed recommendation, pauses for approval, then resumes to issue the refund. Each step maps to code and visible interface state.
Walk through the exampleRefund request #4831
MAYA LOPEZ · WIRELESS KEYBOARD
Request
Wrong keyboard layout. Customer asked for a refund to the original card.
Policy match
Delivered 12 days ago · unopened · refund eligible.
Recommendation
Refund $84.00 and close the ticket after confirmation.
Human input
Approve the refund or escalate the request to a specialist.
Included in the framework
Pause for a typed choice, text response, or custom UI. Resume the same run from its checkpoint.
Stream validated fields into a preview, card, table, or editor while the model is still working.
Keep runs in memory locally. Store paused runs and checkpoints in Redis when you deploy multiple workers.
Call OpenAI, Anthropic, Google, DeepSeek, Groq, or Mistral. Give each node request-scoped MCP tools and approval rules.
Send model calls, tools, workflow transitions, timing, tokens, and cost to OpenTelemetry or Kortyx Studio.
Connect React through an API route, a buffered Server Action, or a separate Node backend.
Start with two packages
Start on the server with one provider. The quickstart then wires a live Next.js route and the client state needed to render text, structured data, interrupts, and errors.
Follow the Next.js quickstart# framework + one provider
$ pnpm add kortyx @kortyx/google
# React chat and stream state
$ pnpm add @kortyx/react
Licensing and deployment
The framework does not require Studio or a managed control plane. Add visibility when you want it, and keep the execution path under your control.
Available now
The TypeScript runtime, providers, React client, CLI, and telemetry API.
Apache-2.0 · you host
Self-hosted preview
Optional observability for runs, sessions, workflows, interrupts, timing, tokens, and cost.
ELv2 · you host
In development
Cloud is in development for teams that want Kortyx to operate Studio.
Details to follow
Common questions
The short version on integration, deployment, human input, and what is available today.
Kortyx replaces the repeated runtime and React integration code around agent workflows: model hooks, streamed events, checkpoints, human input, session actions, and client state. Your business rules and product interface remain yours.
Yes. The framework runs in your Node server. Provider credentials stay server-side, and your workflows, services, and product data remain in the application you operate.
No. The framework works without either. Self-hosted Studio is an optional preview for inspecting runs and sessions. Managed Cloud is in development.
Yes. Next.js can connect through a live SSE route or a buffered Server Action. React can also connect to a separate Node backend.
A workflow emits a typed interrupt and checkpoints the active run. React renders a choice, form, or custom component. The response resumes that same run from its checkpoint.
The Kortyx framework is Apache-2.0. Self-hosted Studio uses ELv2. The managed Cloud service is still in development, with commercial details to follow.
Kortyx carries stream events, checkpoints, and human responses between the workflow and React.