Studio previewSelf-host Studio locally.Run it
The TypeScript application framework for agents

Write the agent logic.The runtime is already built.

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.

Apache-2.0 frameworkRuns in your appComposable runtime
Runtime connected
// draft-decision.node.ts
const result = await useReason<RefundDecision>({
id: "draft-decision",
model: google("gemini-2.5-flash"),
input: orderAndPolicy,
outputSchema: refundDecisionSchema,
stream: true, emit: true,
structured: {
dataType: "refund.decision",
fields: {
summary: "text-delta",
recommendation: "set",
},
},
});
Schema-validated state · streamed to React

Refund request #4831

Maya Lopez · wireless keyboard

approval needed
Order
Policy
Draft
Approve
Agent checked the order and refund policy

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.

structured streamcheckpointed inputReact state
Defined workflowsStructured streamingHuman in the loopPersistent runtime stateReact clientOpenTelemetry

Why Kortyx exists

I kept rebuilding the same code around every agent.

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.

Workflow runtime

Put agent behavior in a workflow

Define model calls, tools, routes, retries, and replay-safe state in versioned TypeScript workflows.

Frontend bridge

Stream text and typed UI state

One SSE protocol carries text, structured data, tool events, interrupts, errors, and abort state into React.

Session semantics

Resume, roll back, and branch correctly

Session checkpoints keep the React transcript and server workflow state together during regenerate, undo, rollback, and fork.

Shared run state

The workflow and React UI read the same run.

Server events map directly to the active React interface. Kortyx runs inside your application and leaves the workflow engine accessible.

04

Your product

Business rules · domain services · product data · interface

03

@kortyx/react

Chat lifecycle · live pieces · interrupts · session actions

02

Kortyx server runtime

Workflows · hooks · providers · persistence · transports · telemetry

01

Your infrastructure

Database · model providers · application server · telemetry

A workflow people recognize

A refund request becomes a reviewable decision.

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 example

Refund request #4831

MAYA LOPEZ · WIRELESS KEYBOARD

REVIEW

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

The code I needed on every agent project.

Read the framework docs
useInterrupt()

Human interrupts

Pause for a typed choice, text response, or custom UI. Resume the same run from its checkpoint.

text · set · append

Structured streaming

Stream validated fields into a preview, card, table, or editor while the model is still working.

memory → redis

Runtime persistence

Keep runs in memory locally. Store paused runs and checkpoints in Redis when you deploy multiple workers.

provider neutral

Providers and MCP

Call OpenAI, Anthropic, Google, DeepSeek, Groq, or Mistral. Give each node request-scoped MCP tools and approval rules.

your backend

OpenTelemetry-native

Send model calls, tools, workflow transitions, timing, tokens, and cost to OpenTelemetry or Kortyx Studio.

server → interface

React and Next.js

Connect React through an API route, a buffered Server Action, or a separate Node backend.

Start with two packages

Install the runtime. Add the React client when you need it.

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
terminal

# framework + one provider

$ pnpm add kortyx @kortyx/google

# React chat and stream state

$ pnpm add @kortyx/react

01 define a workflow02 expose an SSE route03 render live pieces

Licensing and deployment

Your agent runs in your application.

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.

Provider credentials stay server-side
Prompt, input, and output telemetry is off by default
OpenTelemetry works without Kortyx Studio

Available now

Framework

The TypeScript runtime, providers, React client, CLI, and telemetry API.

Apache-2.0 · you host

Self-hosted preview

Studio

Optional observability for runs, sessions, workflows, interrupts, timing, tokens, and cost.

ELv2 · you host

In development

Cloud

Cloud is in development for teams that want Kortyx to operate Studio.

Details to follow

Common questions

What teams ask before they start.

The short version on integration, deployment, human input, and what is available today.

01

What does Kortyx replace?

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.

02

Does Kortyx run inside my application?

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.

03

Do I need Kortyx Studio or Cloud?

No. The framework works without either. Self-hosted Studio is an optional preview for inspecting runs and sessions. Managed Cloud is in development.

04

Can I add Kortyx to an existing Next.js or Node application?

Yes. Next.js can connect through a live SSE route or a buffered Server Action. React can also connect to a separate Node backend.

05

How do human approvals work?

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.

06

What is open source?

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.

Write the workflow for your product.

Kortyx carries stream events, checkpoints, and human responses between the workflow and React.