Reasoning

Free · MIT

The agent's stated reasoning above its answer. Each step says what it rests on: verified against evidence, believed, or assumed (with the assumption spelled out). Open while the agent is thinking; folds to a one-line summary when it answers.

Markdown

Preview

Install

With the Candor CLI

First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/reasoning

Brings in: chat, collapsible, locale, streaming-text, utils · npm: lucide-react@^1.67.0

Usage

TSX · The example above
"use client"

import { Reasoning } from "@/components/reasoning"

export default function Example() {
  return (
    <Reasoning
      className="max-w-lg"
      thoughtFor="4s"
      entries={[
        { id: "1", title: "The order shipped today", basis: "verified", evidence: "Order record, shipped_at 09:14" },
        { id: "2", title: "Delivery takes three days", basis: "believed", assumption: "The carrier’s usual time for this route" },
        { id: "3", title: "No holiday delays this week", basis: "assumed", assumption: "Not checked against the carrier’s calendar" },
      ]}
    />
  )
}

<Reasoning>

PropTypeDefaultDescription
entriesrequiredReasoningEntry[]—The steps, each verified (with evidence), believed or assumed.
thinkingboolean | undefinedfalseThe agent is still thinking; opens the panel and shows progress.
thoughtForstring | undefined—How long it thought, once known, e.g. "6s".
classNamestring | undefined—Extra classes for the outer element.

Strings

The fixed words, in English by default. Change any of them under reasoning in <LocaleProvider strings={{ … }}>; the table is exported as reasoningStrings.

KeyEnglish
verifiedVerified
believedBelieved
assumedAssumed
reasoningReasoning
steps{ one: "{count} step", other: "{count} steps" }
assumedCount{count} assumed
thinkingThinking
evidenceEvidence:
assumptionAssumption: