Docs / How-to guides
Show your tools' answers as screens
Let agents draw your tools' answers as tables, cards and forms, and build screens of your own.
Agents that show screens, like Claude and ChatGPT, can draw a tool's answer as a table, a card or a form instead of text. Sokie makes a screen for each tool from your spec, in your workspace's brand, and you can build your own. Agents that don't show screens get the same text answer as before.
Turn screens on
Screens are in early access. An owner or admin turns on Screens in agents in Settings › Early features.
A server shows screens from its next deploy. Redeploy it to see them sooner. To keep one server on text, turn Screens in agents off in its Settings.
The screens Sokie makes
- A list, for a tool that answers many things: up to five columns, filters for arguments with a fixed set of values, and more pages as the person scrolls. A row opens as a card when the API has a get operation for one of them, under the list's path or beside it, like
/invoices/{id}for/invoices, or/pet/{petId}for/pet/findByStatus. - A card, for a tool that answers one thing: its name and status, its main fields, nested lists as small tables, and buttons for what can be done to it in a click, like Send invoice or Delete invoice. Something with no name is called by what it is and its id, like Order 2.
- A form, for a tool that changes something: what the agent proposed, filled in, to check and change before Confirm. If the API turns it down, the form says why in the API's words, ready to fix and send again.
Screens wear your workspace's Branding: its name, logo, colours, corners, buttons and typeface.
Build your own
In the server's repository, start a view from the screen Sokie makes for a tool:
sokie views new invoice --for getInvoice
That writes views/invoice.html and adds it to sokie.json:
"views": {
"invoice": {
"file": "views/invoice.html",
"tools": ["getInvoice", "listInvoices"],
"loadsFrom": ["fonts.googleapis.com", "fonts.gstatic.com"],
"canCall": ["sendReminder"]
}
}A view is one HTML file, up to 1 MB. It gets the tool's answer as data, and calls tools and opens links through the agent. List in loadsFrom every domain it loads anything from, and in canCall any tool it calls but doesn't show. Your view replaces Sokie's screen for its tools.
Your agent can do this for you: Sokie's plugin for Claude has a build-a-screen skill that writes the view, runs sokie check, and asks before it deploys.
Try it before agents do
sokie views preview invoice
That opens the server's Test tab on the view's tool with a real answer. The Screen tab draws it light or dark, wide or on a phone, and lists what it did: the tools it called and the links it opened. Deploy first: the Test tab shows the view as deployed.
What a screen may do
A screen's calls are ordinary tool calls, made as the person using it. What agents may do, Ask first, rate limits and the Logs tab apply exactly as they do to the agent's own calls, and a screen only offers what that person may do. A view loads nothing but what its loadsFrom lists.
Limits
- One view per tool, up to 1 MB each.
- A server that lists its tools by search shows no views.
sokie checkwarns about it.