Package surfaces
Which entrypoint has what you need, and where it's explained. Anything you can't import from one of these is internal.
| Entrypoint | Purpose | Start here |
|---|---|---|
june | the workflow runtime | React as the workflow |
june/chat | persistent conversations and feedback | Chat |
june/copy | corpora, voices, writing and copy evaluation | Copy and voice |
june/train | datasets, evals, jobs and fine-tuning | Evals and training |
june/trainers | the trainer adapters fineTune() runs: TRL, Vertex | Local and managed training |
june/tools | first-party tools for agents: Bash | Tools |
june/test | scripted models for tests without a key or network | Testing |
june/sdk/* | models from OpenAI, Anthropic, Google and xAI | Providers |
The root doesn't re-export the subpaths. Import chat from june/chat, training from june/train, and so on. Every entrypoint is an ES module with its own type declarations.
The CLI isn't an entrypoint. The june command runs workflows and chats; see the CLI reference.
For supported versions and what each export promises, see Compatibility. For what June stores and sends, see Security and privacy.
june
Workflows as React components, run by June's reconciler on top of the AI SDK.
- Components:
Agent,Step,Parallel,Catch,Tool,Bash,Inherit,RequireApproval,Namespace - Capabilities:
Tooldeclares an AI SDK tool, or a tool implemented by a workflow, in an agent's children;defineAgentmakes an agent that other agents can call as one tool;defineCapabilitiesmakes a reusable group of them,Inheritpasses named tools from an agent to one nested in it, andRequireApprovalandNamespacewrap the capabilities inside them. See Capabilities - Running:
runresolves with aRunResult;startreturns aRunHandleto approve or deny tools, snapshot the run and abort it - Hooks:
useStepruns any async function as a step;useResourceowns a live value for the run and disposes it when the run ends;useAgentreturns the closest agent'sToolLoopAgent - Types:
AgentProps,AgentSettings,ToolProps,NativeToolProps,CompositeToolProps,BashProps,DefinedAgentOptions,InheritProps,RequireApprovalProps,NamespaceProps,StepProps,StepResult,ParallelProps,CatchProps,RunOptions,RunResult,RunHandle,RunStatus,RunSnapshot,SnapshotStep,StepState,TraceNode,TraceError,ToolCallTrace,ModelCall,Usage,ApprovalRequest,UseStepContext,UseStepOptions
Read: Workflows for the overview, then Agent and Step, Capabilities, Running workflows, Approvals, Snapshots and resume and Traces and usage.
Stable: the values above, RunSnapshot's version: 1 format, and june run --json's object. See Compatibility.
june/chat
Conversations: a chat holds sessions, each session holds turns, and a responder answers each turn. With a persistent store such as fileStore(), sessions outlive the process.
- Chats:
createChatreturns aChat - Responders:
modelResponderanswers with a model;agentResponderanswers with a June workflow - Stores:
memoryStorefor one process;fileStorefor a JSONL journal per session on disk - Context:
fullContextsends the whole session;summaryContextsummarizes older turns - Traces:
projectChatTraceturns arun-updatetree into plain rows for a UI - Types:
Chat,Session,Turn,TurnResult,Responder,ResponseExecution,ChatStore,ContextBuilder, theChatEventunion and its events, and theChatJournalEntryunion and its entries
Read: Chat, then Learning from chat to turn sessions into training data with june/train.
Stable: the values above, the chat contracts, journal entries at version: 1, and fileStore()'s layout. See Compatibility.
june/tools
First-party tools for <Agent tools>. Each is a plain AI SDK tool, not a June-specific type.
- Tools:
bashToolis the AI SDK tool behind<Bash />: it runs a command with Bash on the local machine, and requires approval by default - Types:
BashToolOptions,BashToolResult
bashTool() is local process execution with the permissions of the June process. It is not a sandbox.
Read: Tools.
Stable: the values above. See Compatibility.
june/copy
Teaching a model to write like a particular person, built on june/train.
- Corpora:
copyCorpusloads writing samples from an array or a JSONL file - Preparation:
prepareVoicereconstructs the brief behind each sample with a teacher model, and throwsPrepareVoiceError - Voices:
voicecreates aVoicethat writes, edits and trains;loadVoicerestores one from itsVoiceManifest - Retrieval and scoring:
metadataRetrieverpicks exemplars;stylometryandjudgeare evaluators - Workflows:
Writerunsvoice.write()as a workflow step - Types:
CopyCorpus,WritingSample,PreparedVoice,PrepareVoiceOptions,Voice,VoiceOptions,VoiceManifest,WriteResult,VoiceEdit,Retriever,VoiceEvaluator,VoiceScore,WriteProps,OnCall
Read: Copy and voice.
Stable: the values above and VoiceManifest at version: 1. The teacher, writer and judge prompts and the scoring defaults are less stable. See Compatibility.
june/train
Datasets, evals, fine-tuning and long-running jobs. June orchestrates the training; a trainer runs it.
- Datasets:
dataset, anddatasetFromSessionsandpreferenceDatasetFromSessionsfor chat sessions - Evals:
evalSuite,grader,evaluate,compareEvaluations,casesFrom, andevalCasesFromSessionsfor chat sessions - Fine-tuning:
fineTunewaits for the result;startFineTunestarts a job and returns at once, andfineTuneJobrebuilds one from its saved ref - Jobs:
jobwraps any long-running backend; a failed job'sresult()rejects withJobFailedError - Workflows:
FineTuneandEvaluaterun as workflow steps - Types:
Dataset,TrainingExample(CompletionExample,ConversationExample,PreferenceExample),EvalSuite,EvalRun,EvalComparison,Grader,FineTuneOptions,FineTuneResult,TrainingManifest,ModelArtifact,Job,JobRef,JobSnapshot, and theTrainercontract:Trainer,TrainerCapabilities,TrainingRequest,TrainingJob,TrainingStatus,TrainingOutput
Read: Evals and training, then Datasets, Evals, Fine-tuning, Jobs, Training in workflows and Custom trainers.
Stable: the values above, the example formats, fingerprints and splits, the Trainer contract, job states and the training manifest at version: 1. See Compatibility.
june/trainers
The two trainers that ship with June. Each returns a Trainer that fineTune() accepts.
trl: local full (sft), LoRA and QLoRA fine-tuning with Hugging Face TRL and PEFT, in a Python process run by uv. Options:TrlOptionsvertex: managed Gemini tuning on Vertex AI. Options:VertexOptionsandVertexProviderOptions
Read: Local training and Managed training. To write your own trainer, implement the Trainer type from june/train; see Custom trainers.
Stable: the values above and the TRL runner's file contract. Provider-namespaced options and metadata follow their providers. See Compatibility.
june/test
Test helpers for June apps. A scripted model stands in for a provider's model, so workflow tests need no API key or network.
- Models:
scriptedModelanswers every call with a function's reply: text, JSON for an object, or tool calls. It's an AI SDKMockLanguageModelV4, and records what June sent indoGenerateCallsanddoStreamCalls - Tool calls:
callToolsmakes a reply that calls tools; the agent runs them and calls the model again with their results - Types:
ScriptedCall,ScriptedReply,ScriptedToolCall,ScriptedModelOptions,ToolCallsReply
june/test imports ai/test, which ships with ai, so it needs no other dependency. Import it from tests only.
Read: Testing.
Stable: the values above. See Compatibility.
june/sdk/*
Provider wrappers: june/sdk/openai, june/sdk/anthropic, june/sdk/google and june/sdk/xai. A model from a provider without importing the AI SDK's provider package yourself. Each wrapper exports one function, the provider's default model factory: openai, anthropic, google and xai.
bun add june react ai @ai-sdk/openai
import { openai } from "june/sdk/openai";
const model = openai("gpt-5-mini");
- Optional peers: each wrapper loads its
@ai-sdk/*package, and only that one. Install the providers you use;juneand its other entrypoints never load them. - Missing providers: running a wrapper with Bun without its package throws an error that names both, with an install command and
code: "JUNE_MISSING_PROVIDER_DEPENDENCY". A bundler resolves imports when it builds, so it reports the missing package itself. - Model ids are strings: a wrapper's declarations can't depend on a package you might not have installed, so it takes any
stringand your editor won't suggest the provider's model ids. A typo fails when the model is called. - Async modules: each wrapper loads its provider with top-level
await. Import it;require(), and tools that compile ES modules to CommonJS, can't load it. - The escape hatch: for anything else a provider offers, such as
openai.chat(),createAnthropic(), provider options or typed model ids, import its@ai-sdk/*package directly. Models from either work anywhere June takes a model.
Stable: the values above, and the error's code and fields. See Compatibility.