# June

**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

```sh
bun add june react ai @ai-sdk/openai
```

Then write and run a first workflow with the [Quickstart](https://june.dev/docs/quickstart.md).

## 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.

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

## Modules

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

- [`june`](https://june.dev/docs.md): `june` declares and runs workflows as React components.
- [`june/chat`](https://june.dev/docs/chat.md): `june/chat` turns a model or a June workflow into a persistent conversation, with feedback on every reply.
- [`june/copy`](https://june.dev/docs/copy.md): `june/copy` builds a voice from your real writing and learns from your edits.
- [`june/train`](https://june.dev/docs/training.md): `june/train` builds datasets, runs evals, compares candidates and orchestrates fine-tunes.

## Built with June.

- [Code Review Agent](https://june.dev/examples/code-review-agent.md): 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.
- [Copy Agent](https://june.dev/examples/copy-agent.md): 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.

Or browse [every example](https://june.dev/examples.md).

## 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.

## Docs

- [Start](https://june.dev/docs.md)
- [Workflows](https://june.dev/docs/workflows.md)
- [Chat](https://june.dev/docs/chat.md)
- [Copy](https://june.dev/docs/copy.md)
- [Evals and training](https://june.dev/docs/training.md)
- [Reference](https://june.dev/docs/reference/packages.md)
- [Agents](https://june.dev/docs/agents.md)
- [Examples](https://june.dev/examples.md)

## For agents

- [llms.txt](https://june.dev/llms.txt): The index of June's docs for agents: every page's Markdown URL with a one-line description.
- [Markdown pages](https://june.dev/index.md): Every docs and examples page as Markdown: request it with `Accept: text/markdown`, or add `.md` to its path.
- [Docs sitemap](https://june.dev/docs/sitemap.md): The docs' sections and pages as a nested Markdown list, linking each page's Markdown.
- [MCP server](https://june.dev/mcp): June's MCP endpoint, over Streamable HTTP, public and without auth: `search_docs` and `get_doc` tools, and every page as a `june://docs/…` or `june://examples/…` resource.
- [llms-full.txt](https://june.dev/llms-full.txt): Every docs and examples page in one file, in reading order. Large: prefer llms.txt and the pages you need.
