Overview
The chat interface is how you interact with AI agents to build, modify, and debug your application. You describe what you want in natural language, and the agent writes code, creates files, runs commands, and updates your project in real time.Natural Language
Describe features, fixes, and changes in plain English
Real-Time Streaming
Watch the agent’s response generate token by token
Tool Execution
Agents read files, write code, run shell commands, and fetch web content
Project-Aware
Agents understand your full project structure and existing code
Chat Layout
The chat panel is part of the project builder workspace. Its position can be customized through user preferences (left, center, or right). A typical layout looks like this:Sending Messages
Select an Agent
Choose which AI agent to use from the dropdown. Each agent has a different system prompt, tool set, and AI model. The selection persists per project (stored in localStorage).
Type Your Message
Describe what you want to build, change, or fix. Be specific about the desired behavior, technologies, and visual design.
Send
Press
Enter to send the message (use Shift + Enter for a new line). The agent begins processing immediately.Watch the Agent Work
The agent streams its response in real time. You will see text output, tool calls (file reads, writes, shell commands), and the results of each tool execution.
How Streaming Works
When you send a message, the frontend establishes a streaming connection to the backend. The agent’s response arrives as a series of Server-Sent Events (SSE), each containing a typed payload.Message Types
| Event Type | Description |
|---|---|
agent_response | A chunk of the agent’s text response (streamed token by token) |
agent_tool_start | The agent is calling a tool (for example, write_file or execute_command) |
agent_tool_result | The result of a tool call (file content, command output, etc.) |
agent_stream_end | The agent has finished its response |
agent_error | An error occurred during processing |
Streaming Flow
Message Sent
Your message is sent over the WebSocket connection with the project ID, agent ID, container ID, and view context.
Text Streams In
agent_response events arrive with text tokens. These are displayed character by character in the chat panel.Tool Calls Execute
When the agent needs to read a file, write code, or run a command,
agent_tool_start events appear. The UI shows which tool is running and on which file.Tool Results Return
agent_tool_result events contain the outcome (file contents, command output). The agent uses these results to decide its next action.The streaming connection uses native
fetch() with getAuthHeaders() for SSE. An AbortSignal is passed for cancellation, so you can stop a response mid-stream by clicking the cancel button.Agent Selection
Choosing the Right Agent
Different agents excel at different tasks:- StreamAgent
- IterativeAgent
Best for: UI components, visual design, CSS styling, and fast iteration.How it works: Streams responses in real time with interleaved tool calls. Produces output quickly, making it ideal for small to medium changes.
Container and View Context
When you send a message, the chat includes context about which container you are working in and which view mode is active. This allows agents to scope their file operations to the correct container directory and adjust their tool usage based on the current context.Edit Mode
The chat supports two modes for how the agent applies changes:- Ask Mode
- Edit Mode
The agent generates a response and applies changes directly. This is the default mode and is best for straightforward requests where you trust the agent’s output.
Tool Approval Flow
Some tool executions require explicit approval before they run. This is a safety mechanism for potentially destructive operations.How Approval Works
Agent Requests a Tool
The agent decides to use a tool that requires approval (for example, deleting a file or running a shell command).
Approval Card Appears
An
ApprovalRequestCard component renders in the chat, showing the tool name, parameters, and what the operation will do.You Approve or Reject
Click Approve to let the tool execute, or Reject to skip it. The agent will adjust its plan based on your decision.
What You Can Ask For
- Build Features
- Modify Code
- Debug Issues
- Ask Questions
- “Create a login form with email and password fields, validation, and a submit button”
- “Add a responsive navigation bar with a logo on the left and menu items on the right”
- “Build a product card component with image, title, price, and add-to-cart button”
- “Create a dashboard page with a sidebar, header, and content area”
Agent Responses
Agents can respond with several types of content:Code Generation
Creates new files or modifies existing ones. Code blocks show syntax-highlighted output with the target file path.
Explanations
Describes what was changed and why. Useful for understanding the agent’s reasoning.
Shell Commands
Runs commands like
npm install, pip install, or custom scripts. Output is displayed inline.File Reads
Reads existing files to understand context before making changes. The agent often reads several files before writing.
Chat History
Your conversation is preserved per project:- Persistence: Chat history is saved in the database and survives browser refreshes
- Context: Agents maintain conversation context, so they remember what was discussed earlier
- Per-agent threads: Each agent has its own conversation history within a project
- Scroll back: Scroll up to review previous messages and tool calls
Managing History
Clear Chat
Clear Chat
Start a fresh conversation. The agent loses all context from previous messages. Useful when switching to a completely different task.
Copy Code Blocks
Copy Code Blocks
Click the copy button on any code block to copy the code to your clipboard. Useful for saving snippets or sharing solutions.
Writing Effective Prompts
Be Specific
Good
“Create a blue primary button component with rounded corners (8px radius), white text, and a darker blue hover effect. Use Tailwind CSS classes.”
Too Vague
“Make a button”
Include Technical Details
Good
“Add a navigation bar with the logo on the left, menu items (Home, About, Pricing, Contact) centered, and a Login button on the right. Use flexbox for layout and Tailwind CSS for styling.”
Too Vague
“Add navigation”
Break Down Complex Tasks
Instead of asking for an entire e-commerce site in one message, break it into steps:- “Create a ProductCard component with image, title, price, and an Add to Cart button”
- “Now create a ProductGrid that renders multiple ProductCards in a responsive grid”
- “Add a search bar above the grid that filters products by title”
- “Create a ShoppingCart sidebar that shows selected items with quantities”
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Enter | Send message |
Shift + Enter | New line in message |
Ctrl/Cmd + K | Open command palette |
Esc | Blur chat input |
Troubleshooting
Agent Not Responding
Agent Not Responding
Cause: WebSocket connection lost, API key issue, or the AI model is unavailable.What to try:
- Check your internet connection
- Verify your API keys are configured in Settings
- Refresh the page to re-establish the WebSocket connection
- Try switching to a different AI model
Code Not Appearing in Files
Code Not Appearing in Files
Cause: The agent generated code in its text response but did not use the write_file tool.What to try:
- Ask the agent specifically: “Write that code to src/components/Button.tsx”
- Check if the container is running (agents cannot write files to stopped containers)
- Verify the agent has the write_file tool enabled
Agent Generates Wrong Code
Agent Generates Wrong Code
Cause: Ambiguous prompt or the agent lacks context about your project.What to try:
- Be more specific about what you want
- Reference specific files: “In src/App.tsx, change the header color to blue”
- Provide examples of the desired output
- Try a different agent (IterativeAgent for complex tasks, StreamAgent for UI work)
- Clear the chat and start fresh if the context has become confusing
Streaming Stuck or Frozen
Streaming Stuck or Frozen
Cause: Network interruption or server-side timeout.What to try:
- Click the cancel/stop button to abort the current stream
- Refresh the page
- Send your message again
- If the problem persists, check if the backend is responding (try loading the Dashboard)
Best Practices
Iterate Gradually
Iterate Gradually
Start with basic structure, then add complexity one step at a time. Test after each change. This produces much better results than trying to build everything in a single prompt.
Review Generated Code
Review Generated Code
Always read through what the agent produced. Understand the patterns it used, check for edge cases, and verify that the code aligns with your project’s conventions.
Switch Agents by Task
Switch Agents by Task
Use StreamAgent for UI work and fast iteration. Switch to IterativeAgent for complex logic, multi-file refactors, and debugging. Each agent maintains its own context within the project.
Ask Follow-Up Questions
Ask Follow-Up Questions
If something is unclear or not quite right, ask the agent to explain, fix, or adjust. The conversation context means follow-up requests are often more effective than starting from scratch.
Next Steps
Manage Your Library
Customize agents, create your own, and manage AI models
Code Editor
Manually edit and refine AI-generated code
Live Preview
See changes in real time as the agent builds
Marketplace
Discover specialized agents for your workflow