AI assistant
Studio’s AI assistant understands your content schemas, the current entry you’re editing, and the rest of your project. It can create and edit content, modify source files, update styling, change site settings, and manage pull requests — all through natural conversation backed by a tool registry that the model can call directly.
Opening the assistant
Section titled “Opening the assistant”The AI assistant is available across Studio — from the collection browser, the visual editor, the code editor, and the pull-request review screen. Open it from the sparkle icon in the Studio nav rail (tooltip AI with ⌘J), or press ⌘J at any time.
The assistant automatically receives context for the surface you’re on:
- Current branch — so any changes commit to the right branch
- Active collection schema — your Zod schema, serialised as JSON Schema, for the collection you’re viewing
- Active entry — when you’re editing an entry, the frontmatter and Markdown body are passed in
- Pull-request context — when you’re on a PR review screen, the PR number is in scope so the assistant can read comments, list changed files, and post replies
- Edge function context — when you’re editing an edge function, that scope is included
You can also drop or paste images directly into the chat. The model uses them to inform layout, copy, or component generation — for example, “make this hero look like the attached screenshot”.
What the assistant can do
Section titled “What the assistant can do”The assistant has access to 27 tools across eight categories. Each turn may chain multiple tool calls — up to 25 rounds of tool execution per user message — so a prompt like “create a blog post about edge functions and open a pull request” can trigger several tools in sequence before the assistant replies.
Content tools
Section titled “Content tools”| Tool | Description |
|---|---|
create_entry |
Create a new entry in a collection with frontmatter and body. Pass a locale to write into a locale subdirectory. |
update_entry |
Merge frontmatter updates into an existing entry, optionally replacing the body. |
list_entries |
List slugs in a collection. |
get_entry |
Read the full frontmatter and body of an entry. |
patch_entry_body |
Find-and-replace within an entry’s Markdown body — preferred for targeted edits. |
delete_entry |
Remove an entry from a collection. |
insert_island |
Embed an edge function in an entry as a <quant-island> element with a loading directive (load, visible, idle, or media). |
Schema tools
Section titled “Schema tools”| Tool | Description |
|---|---|
list_collections |
List collections with entry counts, paths, fields, and Studio compatibility. |
get_schema |
Return the JSON Schema for one collection (or all). |
create_collection |
Add a new collection — updates src/content/config.ts, creates the data directory, and scaffolds a detail page template. |
File tools
Section titled “File tools”| Tool | Description |
|---|---|
read_file |
Read any file in the project (truncated at 10,000 characters). |
write_file |
Create or overwrite a file. Rejects TypeScript inside <script> blocks in .astro files. |
patch_file |
Find-and-replace in any file. |
list_files |
List files matching a glob pattern. |
create_directory |
Add an empty directory (placed via a .gitkeep). |
Media tools
Section titled “Media tools”| Tool | Description |
|---|---|
list_media |
List media assets, optionally scoped to a subdirectory. |
upload_media |
Upload a media file from base64-encoded content into public/. |
Style tools
Section titled “Style tools”| Tool | Description |
|---|---|
update_tailwind_config |
Patch or replace tailwind.config.mjs / .cjs. |
update_global_styles |
Patch or replace the project’s global stylesheet (default: src/assets/styles/global.css). |
Workflow tools
Section titled “Workflow tools”| Tool | Description |
|---|---|
create_pull_request |
Open a PR from the current branch into main. |
list_pull_requests |
List PRs filtered by state (open, closed, all). |
Review tools
Section titled “Review tools”| Tool | Description |
|---|---|
get_pull_request |
Read PR details — title, body, state, head, base. |
get_pr_comments |
Read all comments on a PR. |
add_pr_comment |
Post a comment on a PR. |
get_pr_files |
List files changed in a PR with addition/deletion counts. |
Settings tools
Section titled “Settings tools”| Tool | Description |
|---|---|
get_site_settings |
Read the project’s i18n configuration and brand identity (colours, fonts, tone of voice, logo). |
update_site_settings |
Update the i18n section (locales, default, URL prefix) or the brand section (colours, fonts, tone of voice, logo). The i18n update also rewrites astro.config.*. |
Example prompts
Section titled “Example prompts”- “Write a blog post about edge computing” — creates a new entry via
create_entryusing defaults from the blog schema. - “Update the hero image on my latest post to
/images/new-hero.jpg” — usesupdate_entryto merge the new value into the entry’s frontmatter without touching anything else. - “Add a
categoryfield to the blog schema with options tutorial, news, opinion” — usescreate_collectionor schema-update tooling to extend the Zod definition. - “Change the primary colour to
#007c64” — usesupdate_tailwind_configorupdate_global_stylesdepending on where colour tokens live. - “Enable French and Spanish translations, with English as the default” — uses
update_site_settingsto updateastro.config.*and the project i18n config. - “Open a pull request titled ‘Translation updates’ with these changes” — uses
create_pull_requestto raise a PR from the working branch intomain. - “Read the open review comments on PR 42 and address them” — chains
get_pr_comments, edits via the appropriate content/file tools, thenadd_pr_comment.
How it works
Section titled “How it works”Each user message starts a tool loop. The model decides which tools to call, Studio executes them against your project, and the results are fed back into the conversation. The loop stops as soon as the model returns plain text (no tool calls) or after 25 rounds, whichever comes first.
When the assistant mutates content, styles, structure, or settings, Studio dispatches a refresh event so the active editor or preview reflects the change without a page reload.
You can choose which model the assistant runs on from a dropdown in the assistant header. The list is filtered to the tool-capable models your organisation has approved via AI governance; if no list is configured, the org’s default tool model is used.
Next steps
Section titled “Next steps”- Code editor — Browse and edit source files directly in Studio’s Monaco-based editor
- Branches and environments — How Git-native branch workflows back preview environments and content review
- Review and publishing — Drive PR review and deployments from inside Studio
