Article

Public agent for anyone

This post explains how the website assistant works.

Stack

Overview

The website chat interface is a single-screen, embeddable chat widget designed to be integrated into static websites via an <iframe>. It provides an iMessage-style conversation UI with blue user bubbles and dark gray assistant bubbles, all styled with a modern dark theme.

What It Does

This is a secure, content-aware assistant that:

  1. Indexes all markdown files in the repository's content/ directory
  2. Searches for relevant articles based on user questions using keyword matching
  3. Fetches full article content when needed to provide grounded, contextual answers
  4. Maintains conversation history to enable follow-up questions within the same session
  5. Never accesses source code, environment secrets, or files outside the /content boundary

Security & Scope

The chat interface enforces a strict content boundary:

This design ensures users can safely expose the chat widget publicly without revealing sensitive project information.

Interaction Model

The assistant can:

  1. Search relevant articles by keyword from user queries
  2. Retrieve full article content by file slug
  3. Answer questions grounded in the retrieved markdown files
  4. Remember context across multiple messages in a session

Features & Customization

Learn More

For detailed documentation, implementation details, and deployment instructions, visit the GitHub repository:

streamlit-openrouter-chat-embed

The repo includes setup guides, environment configuration examples, embedding instructions, and contribution guidelines.