kilo-logo
kilo-logo
kilo-logo
"open source generative UI": Apache 2.0, by Fetch Hive

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
answer.json
{ "title": "Landing page check", "summary": "The page scores 72 out of 100โ€ฆ", "blocks": [ { "type": "score", "value": 72, "max": 100 }, { "type": "tally", "items": [ { "label": "passed", "value": 16, "tone": "good" }, โ€ฆ ] }, { "type": "bars", "title": "Where time goes", "items": [ โ€ฆ ] }, { "type": "action", "title": "Posted the report to #growth" } ]}
The same answer drawn as a report card with the Tailwind kit: a score of 72 out of 100, checks passed and failed, load time bars and a Slack action
"kits": 3

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.

answer.json
Plain CSSplain.css
The check report drawn with the plain CSS kit
Tailwindkit="tailwind"
The check report drawn with the Tailwind kit
Bootstrapkit="bootstrap"
The check report drawn with the Bootstrap kit
"generative UI": two ways

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.

Model writes the UI
Open Report
the model writes
Components or markup, new each time.
A small JSON report. Nothing else.
same answer twice
Can look different on every run.
Always the same card.
safety
Model output runs in your page.
Text stays text. Only http and https links.
design
Whatever the model picks.
Your kit, your class names, your components.
cost to draw
Tokens for every screen.
Free. No AI call.
a bad answer
You find out when it renders.
validate() lists each problem first.
"how it works"

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.

  1. 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.

  2. 02

    Check it

    validate(answer) lists anything wrong, with the path and the reason. A bad answer never breaks your page.

  3. 03

    Draw it

    One line in React, or one call in plain JavaScript that turns the JSON into HTML. It works in Node too.

Answer.tsxReact
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" />
validate 0 problems, drawn with no AI call
"fromJson": no AI

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.

output.json
{
  "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."
  ]
}
fromJson()rules, not a model
The card fromJson made from that output: two headline numbers, bars by intent, a keyword table and next steps
  1. 01

    Reads the shape

    Lists of records, numbers, labels that repeat, dates, links, long text.

  2. 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.

  3. 03

    Checks the layout

    A block whose field is missing is dropped. A column that is mostly empty is hidden.

  4. 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.

"yours": true

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.

agent.tsOpenAI
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 },
  },
});
"version": 2

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.

  • 1titleWhat the answer is about.
  • 2summaryThe answer in one sentence. Always shown first.
  • 3blocksThe parts of the answer, in order.
  • 4moreDetail folded behind one line.
  • 5sourceWhat made it, its cost and when it ran.
  • sourcesThe addresses a doc quotes by number.
goodwarnbadplainA tone is a meaning, never a colour. Your kit decides how it looks.
A report card with its parts numbered: title, summary, blocks, a folded more line and the source line
"blocks": 12

Twelve 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.

Backlink reportstats, meter, table, list
A backlink report card made of stats, a meter, a table and a list of next steps
Written proposaldoc, table, note
A written proposal card made of a doc block, a table of phases and a note
A lead list report on a phone, where each row of the table is its own small card
"tested": true

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.

268reports and outputs tested
3UI kits, each one checked
2screens, desktop and phone
  • 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.

"reports": 69

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.

scorestatsfieldstable
On-page SEO audit drawn as an Open Report card
"questions"

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.

made by Fetch Hive

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.