Skip to content

Chat Features

SAM’s project pages are chat-first interfaces where you interact with AI coding agents in real-time.

Agent output streams directly to your browser via WebSocket. You see code being written, terminal commands executing, and the agent’s thought process as it happens — no waiting for a complete response.

While chatting with an agent, you can browse the workspace’s file system directly from the chat panel — no need to switch to a terminal.

  • Click Files in the session header to open the file browser panel
  • Click Git to view git status and diffs
  • Click on file references in tool call cards to jump directly to that file
ActionDescription
BrowseNavigate directories and view the full file tree
ViewRead any file with syntax highlighting
DiffView git diffs for changed files
Git statusSee which files are modified, staged, or untracked

You can attach files to your chat messages and download files from workspace containers.

Click the paperclip button in the chat input to attach files. Files are uploaded to the workspace container’s .private directory.

Limits:

  • Maximum per-file size: 50 MB (configurable via FILE_UPLOAD_MAX_BYTES)
  • Maximum batch size: 250 MB (configurable via FILE_UPLOAD_BATCH_MAX_BYTES)
  • Filenames must not contain shell metacharacters

Click the download button on files shown in the file browser panel to download them from the workspace container.

When browsing files, images are rendered inline with a dedicated viewer:

  • Small images (under 10 MB) load inline automatically
  • Medium images (10–50 MB) show a click-to-load preview
  • Large images (over 50 MB) offer a download link only
  • Toggle between fit-to-panel and 1:1 zoom modes

Supported formats include PNG, JPG, GIF, SVG, WebP, and other common image types.

Click the microphone button to speak your message instead of typing. SAM transcribes your audio using OpenAI Whisper (via Cloudflare Workers AI).

Limits:

  • Maximum audio file size: 10 MB
  • Maximum recording duration: 60 seconds
  • Rate limit: 30 transcriptions per minute

Agent responses can be played back as audio. SAM uses Deepgram Aura 2 (via Workers AI) for natural-sounding speech synthesis.

  • Audio is generated on-demand and cached in R2 for subsequent playback
  • Configurable voice: luna by default (via TTS_SPEAKER)
  • Maximum text length: 10,000 characters per synthesis
  • Output format: MP3
  • Persistent player — audio continues playing as you navigate between pages
VariableDefaultDescription
TTS_ENABLEDtrueEnable/disable TTS
TTS_MODEL@cf/deepgram/aura-2-enWorkers AI TTS model
TTS_SPEAKERlunaVoice selection
TTS_ENCODINGmp3Audio encoding format
TTS_MAX_TEXT_LENGTH100000Max characters per synthesis
TTS_TIMEOUT_MS60000Synthesis timeout

You can branch off from any point in a conversation to explore an alternative approach without losing the original thread.

  1. Hover over a message in the chat history
  2. Click the Fork button
  3. SAM generates an AI-powered context summary of the conversation up to that point
  4. A new session starts with awareness of the previous conversation

When forking, SAM uses Workers AI to generate a concise summary of the conversation so far. This summary is injected as a system message in the new session.

For short conversations (5 or fewer messages), the messages are passed directly without AI summarization. For longer conversations, a model generates a focused summary.

VariableDefaultDescription
CONTEXT_SUMMARY_MODEL@cf/google/gemma-3-12b-itModel for context summarization
CONTEXT_SUMMARY_MAX_LENGTH4000Max summary length (characters)
CONTEXT_SUMMARY_TIMEOUT_MS10000Summarization timeout
CONTEXT_SUMMARY_MAX_MESSAGES50Max messages to include
CONTEXT_SUMMARY_SHORT_THRESHOLD5Skip AI for conversations this short
  • Maximum fork depth: 10 levels (configurable via ACP_SESSION_MAX_FORK_DEPTH)
  • Each fork creates a new session with its own branch and workspace

SAM indexes chat messages for full-text search. When a session ends, streaming tokens are grouped into logical messages and indexed using FTS5.

  • Completed sessions: Full-text search with stemming and phrase matching
  • Active sessions: Keyword-based fallback search

Agents can search messages using the search_messages MCP tool.

Agent sessions can be suspended and resumed:

  • Auto-suspend: Idle sessions are suspended after 30 minutes of inactivity (configurable via ACP_IDLE_SUSPEND_TIMEOUT)
  • Manual resume: Click on a suspended session tab to resume it
  • Suspended sessions show with reduced opacity in the UI

Press Cmd+K (Mac) or Ctrl+K (Windows/Linux) to open the global command palette. This provides quick navigation across the app:

  • Search and jump to projects
  • Navigate to settings, dashboard, or other pages
  • Access workspace actions
  • Available on both desktop and mobile (via the workspace action menu)