Turn any agent answer into a clean report card
Open Report is a small JSON language for answers. Your agent says what things mean: a score, three numbers, a table, next steps. Your own design draws it, in React, Tailwind, Bootstrap or plain HTML.
$npm install @fetch-hive/open-report
One answer, any UI kit
The report never says how anything looks, only what it means. So the same answer fits your product, whatever it is built with. It is generative UI without the model writing a single line of markup.



The model fills in a report. It never writes your UI.
Most generative UI asks the model for components or markup. Open Report asks it for meaning only, and keeps the drawing in your code. That one choice is what makes AI generated UI safe to ship.
From structured output to UI in three steps
Your model already knows how to fill in a JSON schema. Open Report gives it one made for answers, and gives you the code that draws the result.
- 01
Your agent answers in Open Report JSON
Pass our schema as the structured output format of your LLM call. OpenAI, Claude and others support it, so every answer comes back ready to draw.
- 02
Check it
validate(answer)lists anything wrong, with the path and the reason. A bad answer never breaks your page. - 03
Draw it
One line in React, or one call in plain JavaScript that turns the JSON into HTML. It works in Node too.
import { validate } from "@fetch-hive/open-report"; import { ReportCard } from "@fetch-hive/open-report/react"; // [] when the answer is fine const problems = validate(answer); <ReportCard report={answer} kit="tailwind" />
Already have JSON? Turn any JSON into a report.
Your agent or API returns its own JSON and you do not want to change it. One call turns that JSON into UI with rules alone: no AI, no network, and the same input always gives the same card.
{ "domain": "acme.example", "average_difficulty": 34, "monthly_searches": 7200, "keywords": [ { "keyword": "standing desk for small spaces", "monthly_searches": 2400, "difficulty": 21, "intent": "commercial" }, { "keyword": "compact standing desk", โฆ }, โฆ 3 more ], "next_steps": [ "Write a buying guide for small spaces.", "Add desk height advice to the product page." ] }

- 01
Reads the shape
Lists of records, numbers, labels that repeat, dates, links, long text.
- 02
Lays it out
A number at the top is a stat. A list of records is a table. A long text is a written section.
- 03
Checks the layout
A block whose field is missing is dropped. A column that is mostly empty is hidden.
- 04
Writes the card
The summary comes from your data or a plain count. Never a sentence made up by a model.
Tested on 252 made-up outputs. fromJson() returns null when a card would say less than the raw output, so you can show the output as it is.
Start with a kit. End with your own design.
Use it as it comes, or take over one piece at a time. Each step is a few lines.
import { schema } from "@fetch-hive/open-report"; // The schema is the structured output format. const response = await openai.responses.create({ model: "gpt-5", input: "Check example.com for broken links.", text: { format: { type: "json_schema", name: "report", schema }, }, });
Every report has the same shape
Three parts are always there and three are optional. That is the whole language, so a model learns it from the schema alone and your readers always find the answer in the same place.
- 1
titleWhat the answer is about. - 2
summaryThe answer in one sentence. Always shown first. - 3
blocksThe parts of the answer, in order. - 4
moreDetail folded behind one line. - 5
sourceWhat made it, its cost and when it ran. sourcesThe addresses a doc quotes by number.
12345Twelve blocks cover most answers
Every report has a title, a one-sentence summary and a list of blocks. Each block is a meaning, never a look, which is what lets one JSON answer render in any design.
score01
One number out of a maximum.
stats02
Up to three headline numbers.
tally03
Counts by tone, such as passed, warnings, failed.
meter04
One share of a whole.
bars05
A short ranked list.
table06
Rows and columns, with tones.
list07
Short texts such as next steps.
doc08
A written piece with numbered sources.
fields09
Label and value pairs.
note10
What was not found.
action11
Something done in another app.
group12
Blocks side by side.



Built for real answers
Agent output is messy: long text, missing fields, tables with too many columns. Open Report was shaped on the answers real workflows give, so your AI agent UI holds up when the data does not behave.
No AI needed to draw it
The same answer always gives the same card, and drawing it is free.
Safe
Text never becomes markup. Only web links become links.
Works on phones
Wide tables turn into one small card per row.
No dependencies
React is optional. The HTML renderer runs anywhere JavaScript does.
Different jobs, one renderer
These cards come straight from the test set. An audit, a triage list, an invoice and a written answer are all the same twelve blocks in a different order.
On-page SEO audit
A weak page scored against its target keyword, with the first thing to fix.

Questions
The short version of the docs. The full rules live in schema.json in the repo.
What is Open Report?+
Open Report is a free, open source generative UI library from Fetch Hive. Your AI agent answers in a small JSON report language, and renderers for React, Tailwind, Bootstrap and plain HTML draw that answer as a report card in your own product.
How is this different from other generative UI?+
Most generative UI lets the model write components or markup, so every answer can look different and has to be trusted. With Open Report the model only says what the answer means: a score, a table, next steps. Your own code decides how it looks, so the same answer always gives the same card and no model output is ever run as markup.
Does it work with LLM structured output?+
Yes. The report language is a JSON Schema, so you can pass it as the structured output format of your LLM call. OpenAI, Claude and others support it, and every answer comes back ready to draw.
How do I turn the JSON into UI?+
In React, use <ReportCard report={answer} />. On any other page, renderReport(answer) turns the JSON into an HTML string, and it works in Node too. Pick the plain CSS, Tailwind or Bootstrap kit, or pass your own map of class names.
What happens when the agent returns a bad answer?+
validate(answer) returns every problem it finds, with the path and the reason, so you can retry or show a fallback. A reader also skips any block type it does not know, so newer answers still draw in older pages.
Can it turn JSON I already have into a report?+
Yes. fromJson(output) turns any JSON, or a text answer, into a report with rules alone: no AI, no network, and the same input always gives the same card. It returns null when a card would say less than the raw output.
Is Open Report free?+
Yes. It is open source under the Apache 2.0 licence, has no dependencies, and React is optional. Drawing a card needs no AI call, so it costs nothing to render.
Do I need Fetch Hive to use it?+
No. Open Report works with any agent or model that can return JSON. Fetch Hive uses it to show every workflow and agent answer as a card, so if you would rather not write the agent yourself, you can start there.
Want answers like these without writing the agent?
Fetch Hive workflows show their results as Open Report cards automatically. Pay only for what you run.
