[1] The SCHEMA — Teaching AI Exactly What Shape to Answer In
In my previous post (here), and the demo video (here), I showed how we use the new Coda GO AI side-panel to run sophesticated Agentic Workflows.
The approach worked, but it leaned on a sidebar AI agent with full MCP access to the document, reading pseudo-code SKILLS pages and improvising its way through tables.
That was very powerful, but also has a lot of surface area for things to drift. It burned way more tokens than really necessary. It was a lot slower as a result. And it needed a LOT of extra SKILL and PROMPT engineering to keep it deterministic (hence the ‘pseudo-code’ style).
Over the last month, my clients and I have evolved this approach further, to make it run 10x faster, use 60% less tokens, behave way more reliably and deterministically. But still not need users to write any formulas or packs.
Because we are geeky, we called it
The Agentix Framework(geeks love brands ending in X or Z). We demonstrate it here on Coda, but the same framework has been used in Notion, Excel, Google Sheets, Airtable, and should be applicable to ANY no-code platform.
This new approach takes a different path: no external agent, no MCP loop, no pseudo-code interpreter. Just Coda’s own native AI columns, driven by pages you already know how to write. This chapter is about the first of four ideas that make that possible: The SHEMA.
The Real Problem Was Never the Logic
Anyone who has ever asked an AI for “the customer’s order status” knows the answer comes back differently every time — a sentence here, a bulleted list there, a field renamed or quietly dropped. That is fine in a chat window. But it is fatal inside a workflow, where the next step is a formula reading a specific field, not a person parsing a sentence. The hard problem was never getting the AI to reason correctly — it was getting it to hand back its answer in an exact, predictable shape, every single time.
The SCHEMA: A Human-Written Contract, Nothing More
A SCHEMA is just plain text on a normal Coda page — no code, no JSON, nothing a developer would need to write. It’s the same shorthand you’d use to sketch column headers for a spreadsheet:
Order_id: the order identifier
Customer_Name: full name of the customer
Order_Status (options: pending, shipped, delivered, cancelled): current status of the order
LINE_ITEMS (list): one entry per product ordered
- Product_Name: name of the product ordered
- Quantity: number of units ordered
Each ‘field’ is a name plus a short “micro-prompt” describing exactly what belongs there.
(options: ...) locks a field to a fixed vocabulary, so you never get five different variations of the same status.
(list) with it’s indented sub-fields defines a repeating group — one row per item, exactly like a table.
One SCHEMA, Two Audiences
The trick is that this text does double duty:
- A business owner reads it and knows precisely what will come back. And — unmodified, word for word
- it’s also the literal instruction handed to the AI. There is no separate spec document that quietly goes stale next to the “real” prompt. The documentation is the prompt.
Real Workflow Example
Here is the actual SCHEMA driving the first step of the Pump Configuration workflow from my previous post:
FlowRate: maximum sustained flow, converted to litres per minute
StaticHead: vertical pumping distance, converted to metres
FluidType(options: Clean, Mildly abrasive, Abrasive, Highly abrasive): industry standard classification
SolidContent: percentage solids by volume, numeric only
ConfidenceRating (options: High, Medium, Low): as defined in the instructions
NextAction: always set this to exactly “Headrace”
Notice what each micro-prompt is quietly doing. “Converted to litres per minute” forces unit normalization no matter how the source engineering report phrased the flow rate. “Classify as one of: Clean, Mildly abrasive…” forces a judgment call from a fixed vocabulary instead of the AI inventing its own adjectives.
NextAction is just another field; the workflow’s next step is decided by the same declarative mechanism as everything else.
Nested Lists for Real Structure
The same notation scales to genuinely complex output. Here’s the SCHEMA for the Bill of Materials step:
Customer_ID: the customer reference number
PARTS (list): one entry for each part belonging to the selected Headrace, PumpEngine, or Tailrace component
- PART_NUMBER: the part number from the parts list
- Component: the component code this part belongs to
- PartName: the part name from the parts list
- Notes: the notes text from the parts list
PartCount: the total number of parts returned
However many parts the AI finds — four, forty, whatever the reference data holds — this one indented block tells it to return every single one in exactly this shape. No loop to write, no clever prompt-chaining trick. Just the same “one row per X” pattern you already reach for in a spreadsheet.
Why This Beats Clever “Prompt Engineering”
None of this precision comes from prompt-engineering tricks. It comes from being specific, in plain English, about shape and vocabulary.
And because the SCHEMA only defines what comes back — the how stays entirely in the Skill instructions and the Reference decision tables — you can revise a schema without touching the logic underneath it, the same way you’d redesign a report template without touching the calculation engine behind it.
The Key Benefits
Predictable output, every run. The AI hands back the same fields, in the same shape, whether it’s the first call or the thousandth — no parsing a sentence to find the answer.
One document, not two. The SCHEMA page is simultaneously the human-readable spec and the literal AI instruction — nothing to keep in sync.
Forced vocabulary, not invented adjectives. (options: …) eliminates the drift you get from free-text classification.
Repeating structure without writing a loop. (list) handles any number of items in one declarative block.
Logic and shape stay separate. SCHEMA defines what comes back; Skill and Reference pages define how it’s computed — change one without touching the other.
No developer required. Anyone who can sketch spreadsheet column headers can write a SCHEMA page.
Next Up…
My next post will cover the other half of this magic: The MEMORY — how each step’s answer is safely folded into a running record, so every later agent in the chain knows exactly what’s already been decided, without wading through a full conversation history to find out.
Then after, that I will cover the other ingredients of the framework: The NEXT ACTION element, and why we use JSON for internal & external information exchange.
respect,
Max