Skip to content

jr2 ​

jr2 is a Kit for agentic workflows. Each workflow is written as an xstate Machine, and jr2 runs it on Kubernetes. An Agent that works on a Repo works in a Sandbox: a pod with its own filesystem, network and processes. Your Assistant writes the Machines, and you review the graph.

jr2 supports two primary patterns for making Agent-enabled workflows. You can let the Machine decide the order of the work, and give each Agent one step of it in a Turn. Or an Agent can decide when each step runs, and the Machine runs that step and limits the next choices (how to choose). In both patterns, the Machine sets what each step does. An Agent can also write a Chart, much like a "dynamic workflow": jr2 checks it against the parts that your Machine lends it, and then executes it at runtime.

Start in three commands ​

These commands install the jr2 CLI, make an Instance in the folder my-instance, and converge it into the cluster of your current kubectl context. First, install the tools and make the kind cluster, as Install tells you:

sh
npm i -g @jr2/cli
jr2 init my-instance && cd my-instance && npm install
jr2 up

jr2 init writes one Workflow, ping, that runs with no model. The Get started tutorial gives these steps one at a time, and then runs ping.

Where to go next ​

  • Why jr2 shows the parts of jr2, gives the problems that each part solves, and follows one run through them.
  • Get started is a tutorial. It goes from the install to a branch that an Agent fixed and that you approved.
  • Concepts explains each idea of jr2. For the picture of what runs where, read Architecture.
  • Guides gives the steps for one task on each page.
  • Reference gives each export, config field, command and HTTP route, from the code.

The docs of Kit version 0.5.1. Each page is also at its .md URL.