Skip to content

Declarative AI workflows.

June is React for AI workflows. Build agents as components, use JavaScript for control flow, run them from the terminal, and inspect the same tree as the execution trace.

Install
bun add june react ai @ai-sdk/openai
review.tsx
import { openai } from "june/sdk/openai";
import { Agent, Parallel, Step } from "june";

const diff = await Bun.$`git diff`.text();

export default function Review() {
  return (
    <Agent
      model={openai("gpt-5-mini")}
      instructions="You are a senior code reviewer."
    >
      <Step id="summary" prompt={`Summarize this diff:\n${diff}`}>
        {(summary) => (
          <Parallel>
            <Step id="risks" prompt={`List the risks:\n${summary}`} />
            <Step id="tests" prompt={`Suggest tests:\n${summary}`} />
          </Parallel>
        )}
      </Step>
    </Agent>
  );
}
Terminal
june run review.tsx
▸ summary
✓ summary
▸ risks
▸ tests
✓ risks
✓ tests
Trace, mid-run
  • <Agent>
    • <Step>summary✓ done
      • <Parallel>
        • <Step>risks▸ running
        • <Step>tests▸ running

summary runs first. When it finishes, risks and tests render with its result and run together. The component tree is both the workflow you wrote and the trace June records.

The Code Review Agent is the full application.

Your program is the workflow.

Most workflow frameworks make you describe orchestration separately from the code that does the work. June doesn't. Nest components to create dependencies. Use normal JavaScript to branch. Mark independent work to run in parallel. The tree React renders is the same tree June records as the execution trace.

React isn't June's UI layer. It's the runtime that gives the workflow composition, suspension, boundaries and a tree.

Built on the AI SDK, not around it.

The AI SDK already handles models, tools, structured output and the agent loop. June keeps those primitives and adds the workflow around them: dependencies, parallel work, recovery, approvals, resume and traces. You don't adopt a second model or tool abstraction to use June.

One CLI.

june run executes a workflow. june chat opens a conversation, and june ask makes it scriptable. june doctor checks Bun and your API keys.

Terminal
# run a workflow
june run review.tsx
# chat with it
june chat chat.ts
# ask once, for scripts
june ask chat.ts "…"
# check Bun and API keys
june doctor review.tsx

Start with the runtime. Add the rest when you need it.

  1. june

    june declares and runs workflows as React components.

    import { Agent, Step, Parallel } from "june";
    june docs →
  2. june/chat

    june/chat turns a model or a June workflow into a persistent conversation, with feedback on every reply.

    import { createChat, fileStore } from "june/chat";
    june/chat docs →
  3. june/copy

    june/copy builds a voice from your real writing and learns from your edits.

    import { voice, prepareVoice } from "june/copy";
    june/copy docs →
  4. june/train

    june/train builds datasets, runs evals, compares candidates and orchestrates fine-tunes.

    import { evaluate, compareEvaluations, fineTune } from "june/train";
    june/train docs →

Built with June.

Code Review Agent

A precision-first pull request reviewer. It plans once, runs specialists in parallel, has a verifier try to disprove each one's findings, and surfaces only the few that survive.

junejune/train

Copy Agent

A writing agent that builds a voice from real prose, chats, and learns from your edits. It evaluates candidates against the active voice and changes only when you promote one.

junejune/chatjune/copyjune/train

Turn feedback into evidence.

When a person rates or edits a reply, june/train can turn it into dataset examples and eval cases. You run a candidate against the same cases, compare it with what's active, and decide whether to promote it.

Every example and case traces back to the turn it came from. A person decides what changes.

The Copy Agent's loop
# use it, and /edit what's wrong
copy-agent chat
# feedback → datasets and eval cases
copy-agent evidence
# the voice plus your edits
copy-agent candidate
# compare it with the active agent
copy-agent eval
# a person decides
copy-agent promote <candidate>
Get startedBrowse examplesGitHub