Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.circuit.ai/llms.txt

Use this file to discover all available pages before exploring further.

The Circuit chat widget provides a full-featured chat experience embedded on your website. This page describes what the widget renders and how it handles different types of agent responses.

Markdown rendering

The widget renders agent responses as formatted Markdown, including:
  • Headings (h1 through h6)
  • Bold, italic, and inline code
  • Ordered and unordered lists
  • Links (open in new tabs)
  • Blockquotes
  • Horizontal rules

Code blocks

Agent responses that include code are rendered with syntax highlighting and fenced code blocks:
// Code blocks display with language-specific highlighting
const greeting = "Hello from Circuit!";
console.log(greeting);

Streaming responses

Responses stream in real-time using Server-Sent Events (SSE). Users see the answer appear progressively as the agent generates it, rather than waiting for the full response.

Tool usage visualization

When the agent uses tools (searching indexes, reading documents), the widget displays status badges showing:
  • Which tool is being used
  • A progress indicator while the tool runs
  • The completed status when the tool finishes
This gives users visibility into what the agent is doing behind the scenes.

Image support

If the agent’s response includes images (e.g., diagrams from indexed documents), the widget renders them inline with preview support. Users can click on images to view them at full size.

Citations

When the agent cites source documents, the widget displays these as clickable references. Users can see which document and page the information came from.

Error handling

If the connection drops or an error occurs:
  • The widget displays a clear error message
  • Users can retry their last message
  • The chat context is preserved

Auto-scroll

As streaming responses come in, the widget automatically scrolls to show the latest content. If the user scrolls up to review earlier messages, auto-scroll pauses so they aren’t interrupted.

Limitations

The widget currently does not support:
  • Custom styling or theming (it uses Circuit’s default appearance)
  • File uploads from the widget interface
  • Multiple agents in a single widget instance
  • Programmatic control via JavaScript API
For use cases requiring more control over the chat interface, contact the Circuit team about API integration options.