The agent
An assistant that reads your content and proposes changesets. It never saves on its own.
The agent lives in a panel beside the editor. It knows which entry you have open and any text you selected, and its tools fall into three groups:
- Find: list collections and entries, search content, and query entries by field (for example, posts with no description, or drafts dated before today).
- Read and check: read one or several entries, find every entry that references or links to one, check content for invalid entries and broken or moved links, and look at past proposals with their outcomes and rejection notes.
- Propose: one write tool, which creates a proposal. It can create, update, publish or delete entries. For small fixes inside a long body, it proposes targeted edits (find this exact text, replace it with that) so the rest of the file stays byte for byte as it was.
You can apply a whole proposal or untick the changes you do not want. If a change you keep points at one you left out, prime asks you to apply both or neither. Rejecting takes an optional note, and the agent reads it when you ask it to try again.
Connect a model
Open Settings (the gear in the admin header) and choose a provider: Anthropic, OpenAI, Google, OpenRouter, or any OpenAI-compatible server such as a local Ollama. Load the provider’s model list and use Test connection to check it all works. prime is bring-your-own-key: requests go from your server straight to your provider on your own account. Plans that include the hosted agent can choose prime instead, with no key to set up; see Licensing.
Provider and model are saved to .prime/settings.json, so they are shared with everyone who edits the site. Keys never go there:
- Deployed sites read the key from the provider’s usual variable, such as
ANTHROPIC_API_KEY,OPENAI_API_KEY,GOOGLE_GENERATIVE_AI_API_KEYorOPENROUTER_API_KEY. Settings shows which variable it found or still needs. - Local development can also paste a key into Settings. It is kept in
.prime/secrets.local.json, which prime adds to a.gitignorebefore writing it.
With GitHub storage every save is a commit, so prime refuses to write a key there.
To try the review workflow without a key while you develop, choose Demo (offline). It reads the open entry and proposes removing filler words. It is a scripted stand-in, not a writing assistant, and it only runs on local addresses: on a deployed site it is not offered, and a site that still has it selected shows the setup prompt until you choose a provider.
Agent instructions
Below the provider, Settings has Agent instructions: notes the agent reads before every conversation, saved as .prime/AGENTS.md in your repository, so they are versioned and reviewed like content. They describe your site’s voice, what never to invent, and how to treat structure and drafts. Until you save your own, the agent follows a default written for your site and plan; saving writes it to the repository, where you can keep editing it. Reset to default restores it.
The notes guide voice and content only. They cannot change the rules the agent works under, and the agent still has no way to save anything, so a change to this file can make proposals better or worse but never skips review. Keep secrets out of it: the text goes to your model provider with every request. It is capped at 4,000 characters.
The file lives in .prime/, so frameworks do not mistake it for content and it does not clash with a developer AGENTS.md at the root of your project.
Configuring in code instead
Set agent.model in prime.config.ts to use any AI SDK provider. Code wins over Settings, which then shows the agent as managed in code. instructions in code come first, followed by .prime/AGENTS.md.
import { anthropic } from "@ai-sdk/anthropic";
export default defineConfig({
agent: {
model: anthropic("claude-opus-5-5"),
instructions: "Write for first-time customers. Keep paragraphs short.",
},
// ...
});
Proposals
The only write tool creates a changeset: one or more creates, updates or deletes, each stored with the complete new frontmatter and body. Invalid proposals are rejected with field-level errors, which the agent sees and fixes before trying again.
Proposals appear in Reviews with a field table and a sentence-level diff. Apply writes every file at once; if any write fails, earlier writes are restored. Reject changes nothing.
Proposals also come from people. On Studio and Agency plans, a writer’s saves become proposals in this same queue; see Access and roles. Reviews shows who made each one, and for the agent’s, who asked.
Out-of-date proposals
Each update records the version of the file the agent read. If anyone edits that file before you apply, the proposal is marked out of date and cannot be applied, so the agent never overwrites newer work.
Privacy
The agent sends the model your collection schema, the open entry’s location, any selected text, and the content its tools read. Nothing is sent until someone types a message.