Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

7.5 KB
Raw Blame
title: Smart Results: AI agent replies as tables, charts and checklists
description: kwant draws a bot's table or list as a sortable comparison, a chart, key numbers, findings or a checklist, copied from the reply word for word. The reply text never changes.
card_title: Smart Results
path: docs/smart-results.html
nav: smart-results
card: Tables, charts and checklists from a bot's own reply, with where each value came from.
card_art: avatar:designer
---
<p class="kicker">Docs</p>
<h1>Smart Results: replies you can sort, chart and copy</h1>
<p class="intro">When a bot's reply has a table or a list, kwant draws it as a card: a comparison you can sort, a chart, key numbers, findings or a checklist. Every value comes from the reply as written. The reply's text never changes, and anything kwant can't draw stays as text.</p>
<figure>
  <div class="frame">{{shot:v65-smart-results|A reply in #general comparing three hosts as a sortable table with Host, Price per month, Build minutes, Pros and Cons columns, the picked row highlighted, and under it Copy markdown, From this reply, Show as text and Copy data. The next reply shows where a move stands as a checklist with two items done.|(max-width: 860px) 100vw, 760px}}</div>
  <figcaption>A comparison and a checklist, both copied from the bots' replies. The row the bot picked wears <span class="kw-sticker kw-sticker-holo kw-sticker-sm" style="--kw-tilt: 3deg"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526"/><circle cx="12" cy="8" r="6"/></svg><span>Pick</span></span>. There's nothing to switch on.</figcaption>
</figure>

<h2 id="cards">What gets a card</h2>
<p>Smart Results is new in 0.6.5 and always on. Each reply gets at most one card, worked out once when the reply is saved, without a model call. A reply over 128 KB stays text.</p>
<div class="table-wrap"><table>
  <thead><tr><th>Card</th><th>Made from</th></tr></thead>
  <tbody>
    <tr><td>Comparison</td><td>A table of options, with columns you can sort</td></tr>
    <tr><td>Chart</td><td>A table of numbers, as a line or bar chart</td></tr>
    <tr><td>Key numbers</td><td>A short set of figures, shown as tiles</td></tr>
    <tr><td>Facts</td><td>Lines like <strong>Owner:</strong> Sam</td></tr>
    <tr><td>Links</td><td>A list of links or titled items, shown as cards</td></tr>
    <tr><td>Findings</td><td>A list where each item starts with a severity, such as a review's results</td></tr>
    <tr><td>Recipe</td><td>One recipe, with an ingredients list and the method (new in 0.7.6, <a href="#recipes">below</a>)</td></tr>
    <tr><td>Steps, checklist, timeline</td><td>Numbered steps, a list with ticks, or dated events</td></tr>
    <tr><td>Checks</td><td>A task's checks, on its report card</td></tr>
    <tr><td>Files</td><td>A preview of files a bot shared</td></tr>
  </tbody>
</table></div>
<p>Bots are asked to write tables, numbered steps and <strong>Label:</strong> value lines, so most replies need nothing extra: comparing even two options gets a table, a column each and a row per point. A link in a table counts as its text, so a table with long source links still gets a card. A bot can also point at the table or list it wants drawn, and kwant holds it to the reply: every row must match the reply's table, cell by cell, with the same numbers. Checks and Files cards come from kwant's own records, never from a bot.</p>

<h2 id="recipes">Recipe cards</h2>
<p>New in 0.7.6. When a reply holds one recipe, with an ingredients list and the method, it shows as a recipe card: the ingredients in their groups, numbered steps, and any times and notes. The text before and after the recipe stays as it is. On a wide window the ingredients and steps sit side by side.</p>
<figure>
  <div class="frame">{{video:clip-v076-recipe|Demo: a camp chili recipe card in a kwant chat. Plus is pressed twice and the servings go from 4 to 6, so 1 tbsp olive oil becomes 1½ tbsp and 500 g ground beef becomes 750 g. Then Back to 4 puts the amounts back.}}</div>
  <figcaption>Change the servings and the amounts follow. Back to 4 puts them back.</figcaption>
</figure>
<ul>
  <li><strong>Servings:</strong> the stepper goes from 1 to 24 and rescales every amount kwant can read, in kitchen fractions such as ¼, ⅓ and ½. A screen reader hears the old amount after each change.</li>
  <li><strong>What changed:</strong> each changed amount is highlighted, and <strong>Back to 4</strong> (the recipe's own number) puts the amounts back.</li>
  <li><strong>What stays:</strong> oven temperatures, and any amount kwant can't read, stay as written. Nothing is worked out with a model.</li>
  <li><strong>When in doubt, text:</strong> a reply that doesn't match a recipe's shape exactly stays plain text, and <strong>Show as text</strong> always gives the reply back word for word.</li>
</ul>
<figure>
  <div class="frame">{{shot:v076-recipe|A recipe card in a kwant chat for one-pot camp chili, set to 6 servings instead of 4. The amounts read 1½ tbsp olive oil, 750 g ground beef and so on, the numbered steps sit next to the ingredients, and a Back to 4 button is above them.|(max-width: 860px) 100vw, 760px}}</div>
  <figcaption>On a wide window, ingredients and steps side by side.</figcaption>
</figure>
<figure>
  <div class="phone">{{shot:phone-v076-recipe|The camp chili recipe card on a phone, set to 6 servings, with the scaled ingredient amounts in a single column.|300px}}</div>
  <figcaption>The same card on a phone.</figcaption>
</figure>

<h2 id="trust">Copied, never worked out</h2>
<ul>
  <li><strong>Word for word.</strong> Every value is copied from the reply. Nothing is added up, averaged or rounded, and a chart never puts different units on one axis. The one exception is a <a href="#recipes">recipe card</a>'s servings stepper, which rescales amounts only when you change the servings.</li>
  <li><strong>Where it came from.</strong> Under each card a line says <strong>From this reply</strong>, <strong>From task checks</strong> or which attachment it came from.</li>
  <li><strong>The text is still there.</strong> <strong>Show as text</strong> swaps the card for the reply's own words, and <strong>Copy markdown</strong> copies the reply as it was written.</li>
  <li><strong>When in doubt, text.</strong> A card that fails a check, or can't be drawn, shows the reply's text instead. Editing a reply removes its card, since the card was copied from the old text.</li>
</ul>

<h2 id="copy">Copy data and Ask about this</h2>
<p><strong>Copy data</strong> copies a card's values as Markdown, CSV or JSON, ready for a sheet or another tool.</p>
<p>On a comparison row, <strong>Ask about this</strong> puts a line such as "About Northdeck in your Host table:" into your message box, so you can ask a follow-up about that row. Nothing is sent until you send it.</p>
<figure>
  <div class="frame">{{shot:v65-ask-about-this|The same comparison with the Northdeck row hovered and its Ask about this icon button showing. The message box at the bottom reads "About Northdeck in your Host table:".|(max-width: 860px) 100vw, 760px}}</div>
  <figcaption>Ask about this fills in the message box. You finish the question.</figcaption>
</figure>

<h2 id="where">Where cards show</h2>
<p>Cards show on bot replies in channels and direct chats, on hand-off results from a teammate, on a task's report card and on shared files. Replies from before 0.6.5 stay as they were.</p>