Give Studio a language model
Studio uses a language model for its assistant, which changes the application for users who describe what they need, and to review every set of changes. When a user adds a field with a form, Studio waits until they stop for ten seconds and then asks the model what the set does and how carefully someone should look at it. The answer shows in Your changes, eg Small, "Products get Care instructions, an optional text.", with a suggestion such as "The ERP already sends a care text for every product. Fill this field from it?"
For how the team changes the model in Studio, see Change the model.
You need Studio enabled in the host with its model source embedded, see Embed the model source and apply Studio's changes, and at least one Vox MCP server, see Connect AI agents with MCP.
Register a language model
Studio works with any tool-capable IChatClient from
Microsoft.Extensions.AI. Register one with your
provider, model and credentials, keyed vox-studio (VoxStudioChatClient.Key) when the application uses other language
models too, or as the only IChatClient.
With Anthropic, through the Anthropic package:
builder.Services.AddKeyedSingleton<IChatClient>(VoxStudioChatClient.Key,
new AnthropicClient(new ClientOptions { ApiKey = builder.Configuration["Anthropic:ApiKey"] })
.AsIChatClient("claude-sonnet-5-5"));
With OpenAI, through the Microsoft.Extensions.AI.OpenAI package:
builder.Services.AddKeyedSingleton<IChatClient>(VoxStudioChatClient.Key,
new OpenAI.Chat.ChatClient("gpt-5", builder.Configuration["OpenAI:ApiKey"]).AsIChatClient());
Register the provider's own client, without UseFunctionInvocation(): Studio calls the tools itself and keeps count of
them, while a client that invokes functions on its own would run its own loop of up to 40 rounds inside each of
Studio's.
Choose a model that supports tool calls and JSON schemas for its answers. Without a language model, Studio makes changes
from forms only, and its screens say that sets aren't reviewed, with the setup behind Details for developers. The
account's features report studio.assistant as true when Studio has a model.
Choose the MCP server Studio reads through
The model reads the application's model and data with the tools of one of its Vox MCP servers, called in process. So the
choices you made for agents hold for Studio too: a server that leaves out carts keeps the carts' data from Studio,
although Studio can still read the Cart class in the source.
-
With exactly one Vox MCP server, Studio uses it.
-
With several, name one:
AddVoxStudio(studio => studio.UseMcpServer("general")). -
To keep Studio's tools apart from external agents, add a server only for Studio, without an endpoint:
builder.Services.AddVoxMcp("studio", server => server.ExcludeEntity<Cart>().WithoutEndpoint());
With a language model registered, a host without any Vox MCP server, with several and none named, or naming one it doesn't add, fails at startup with a message saying which.
Every call runs as the signed-in user, with their permissions and default perspective, and with the server's entity
types and authorization policy. History shows a change the model makes as made through the server by Studio, eg by Lisa
through Studio. Studio is offered Vox's built-in tools only: the typed tools of custom actions, and tools that the
server adds with WithTools, aren't offered.
The assistant
With a language model, every user who may propose changes gets Ask the assistant in Studio. They describe what they need in their own words, eg "Fill Care instructions from the care text the ERP sends", and the assistant changes the application's code in their draft, the same set of changes that Studio's forms write into. Nothing goes live until someone makes the set live, as for any other change. Add field also uses the assistant for a calculated field: the user answers the form and describes the calculation, and the assistant writes the field and its calculation.
Who may use it
Only the person whose draft it is talks to the assistant about it, with vox:ProposeChanges and vox:ReadSource, see
Users and permissions. The conversation is stored with the draft,
so it can be continued after a reload, or on another instance of the host.
What it changes
The assistant reads the application's embedded source and model, and Vox's modelling skill, which tells it how to change
the model and when a change needs a migration. It saves its edits into the draft in groups, eg a field and the import that
fills it. It can change the source files that the build embeds, Program.cs included, and add new C# files to the
application's projects. The rules for which files a set may change are the same as for the forms, see
Who may apply: when a file is refused, eg a project file or appsettings.json,
the assistant tells the user what a developer has to do instead. Once a set has been sent for review or applied, the
assistant no longer changes it, and offers to start a new set.
Every turn that changes files adds the change to Your changes, where Undo asks the assistant to take it out, and runs the review.
Data changes
The assistant can also change data through the tools of the MCP server Studio reads through, eg add Copper to the colours. It does so only after the user has confirmed exactly what it will write: it asks first, and the drawer shows the question with Confirm and Cancel. The change is made as the user, with their permissions, so a user who may not create colours gets the tool's error, which the assistant relays. History shows the change as made by the user through Studio.
Limits
A turn makes at most 40 tool calls and saves at most 20 groups of changes. At either limit the assistant stops, keeps what it saved and says what it didn't finish, which the user can ask for in another message. Change the limits in configuration:
{
"Vox": {
"Studio": {
"Assistant": { "MaxToolCalls": 40, "MaxSavedGroups": 20 }
}
}
}
or in code, with AddVoxStudio(studio => studio.Assistant.MaxToolCalls = 60).
The API
| Method and path | What it does |
|---|---|
POST /vox/api/studio/turns | Runs one turn of the assistant in a draft's conversation and streams its events as application/x-ndjson, one JSON object per line: version, text, progress, question, dataChange, review, error, and done last. The request has exactly one of message, answer, form, undo or again, and optionally proposalId and expectedVersion; without proposalId it uses the user's open draft, which the first message creates. Returns 503 without a language model, 403 for someone else's draft, 404 for a draft that doesn't exist, and 409 when the draft has changed since expectedVersion or the request isn't one turn, eg both a message and an undo. Closing the stream stops the assistant; what it saved is kept. |
What the provider receives
The provider you register receives excerpts of the application's source and skills, the data that the tools read as the user, and the content of proposals: their descriptions and changed files, and the conversations with the assistant. Choose a provider and an agreement that allow that.
The review
Every version of a set with file changes gets a review: a separate call to the model that sees the changed files as diffs against the built source, with the whole text of new files, and the forms' own descriptions of their changes. It can look things up with the server's read-only tools and by reading the source, but it never sees a conversation with an assistant and has no tool that writes, so what the proposer asked for doesn't colour it.
It runs:
- in the background, ten seconds after the last change from a form, on the latest version, so five fields added in a row cost one review;
- when someone chooses Review it on a draft's version without a review, for anyone who may read the set. The review then looks things up with that person's permissions, so it can describe data that the proposer can't read.
It writes a description of two or three sentences, the effects, each with the area it touches, eg "Products" or "ERP import", what to check, at most two suggestions, and a size. Your changes shows a suggestion as its question, under what to check.
| Size | For example |
|---|---|
| Small | A new optional field, a new list or kind of item, a label or group change, a calculated field that only reads other fields. |
| Worth a look | A change to what an import writes, a new validation that can stop saves, a field made required on an existing type, or made filterable on a type with many items. |
| Needs careful review | A rename or removal with a migration, a change to the application's setup, sending data to another system, a new action, or new code that runs on every change. |
The size is never smaller than the size of the set's form changes. It only changes what Studio recommends, eg that someone else looks first; it never changes who may make the set live. A review that's wrong, or that a file's content talked into calling a change small, can only leave out a warning.
The review is saved with the version it reviewed. When the set changes meanwhile, the review is discarded, and the next change clears the review on the page, so the review always belongs to the version that Make them live would submit. A review that fails, eg after a provider error, leaves the version unreviewed, and Review it tries again; the provider's own error is in the log. A review makes at most 12 tool calls in 90 seconds. A diff longer than 400 lines is cut to its changed regions with 20 lines around each, the whole text of a new file is cut after 400 lines, and a removed file is named without its text.
The admin reads the open set again every 3 seconds for up to a minute after a change from a form, while the tray or Your changes is open, to show the review when it arrives.
The API
| Method and path | What it does |
|---|---|
POST /vox/api/studio/proposals/{id}/review with { "version": 3 } | Reviews the version, saves the review with it and returns it. Returns the existing review when the version has one, 409 when the set has changed since or is no longer a draft, 503 without a language model, and 502 when the model failed. |