# Overview

June is a declarative runtime for AI workflows. React is the workflow runtime. Components express dependencies, JavaScript expresses control flow, and the rendered tree *is* the execution trace.

June sits on top of the AI SDK rather than replacing it. The AI SDK owns models, tools, structured output and the agent loop. June owns how that work composes, runs, recovers, pauses, resumes and is observed.

```tsx
<Agent model={openai("gpt-5-mini")}>
  <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>
```

`summary` runs first. Its result is the argument to its children, so `risks` and `tests` can't start until it finishes. They're inside `<Parallel>`, so then they start together. There's no separate graph to define: the tree you wrote is the workflow, and the tree React renders is the run's trace.

## What June adds

| The AI SDK                                 | June adds                                                   |
| ------------------------------------------ | ----------------------------------------------------------- |
| models and providers, through its packages | composition: dependencies, branches and parallel work       |
| tools, and the agent loop inside each step | execution: concurrency, recovery, tool approvals and resume |
| auth, retries and errors for each provider | observation: the trace of what ran, and the tokens it used  |

June passes your AI SDK model straight through. There's no June provider layer to configure.

## When to use it

Use June when an agent task is more than one call and the shape of the work matters:

- steps depend on each other's results, like a summary that its risks and tests build on;
- independent work fans out, like triaging every issue in a list;
- a failure should take an alternate path, or a tool call should wait for a person to approve it;
- a piece of the workflow is worth reusing as its own component;
- you need a trace of what ran, while it runs and after.

Use the AI SDK on its own when one call or one agent loop does the job. June is a small runtime on purpose, and it leaves durable execution, queues, schedules and hosting to your app: [What June doesn't do](https://june.dev/docs/workflows.md#what-june-doesnt-do) has the full list.

## The modules

Start with `june`, the runtime and the CLI. The rest are optional subpaths of the same package, for problems you may have later:

- [`june/chat`](https://june.dev/docs/chat.md): when a model or a workflow should be a persistent conversation, with feedback on its replies.
- [`june/copy`](https://june.dev/docs/copy.md): when drafts should sound like a particular person. It builds a voice from their real writing and learns from their edits.
- [`june/train`](https://june.dev/docs/training.md): when you need evidence that a change is better. It builds datasets, runs evals, compares candidates, and orchestrates fine-tunes through a trainer.

## Start here

1. [Installation](https://june.dev/docs/installation.md): Bun, the packages, and a provider key.
2. [Quickstart](https://june.dev/docs/quickstart.md): write a workflow and run it with `june run`.
3. [React as the workflow](https://june.dev/docs/workflows.md): the components and how a run works.

Then reach for [Chat](https://june.dev/docs/chat.md), [Copy and voice](https://june.dev/docs/copy.md) or [Evals and training](https://june.dev/docs/training.md) when you need them. The [CLI](https://june.dev/docs/cli.md) and [Package surfaces](https://june.dev/docs/reference/packages.md) are reference.
