Overview
The conversation system is powered by Claude Opus 4 and uses the Inngest agent framework to orchestrate file operations, web scraping, and streaming responses.Each project maintains its own conversation history. You can create multiple conversations per project to organize different tasks or features.
Starting a Conversation
Type your message
Enter your request in the input field at the bottom. You can:
- Ask questions about your code
- Request new features or files
- Get explanations of existing code
- Share documentation URLs to teach the AI
What the AI Can Do
The conversation AI has access to powerful tools that let it interact with your project:File Operations
- List Files
- Read Files
- Create Files
- Update Files
- Organize
The AI can explore your project structure:Returns a tree of all files and folders with their IDs, which the AI uses for subsequent operations.
Documentation Scraping
The AI can scrape documentation from URLs you provide using Firecrawl.
scrapeUrls tool to fetch and read documentation:
- Framework-specific implementations
- API integrations with third-party services
- Following specific library patterns
- Referencing up-to-date documentation
Example Workflows
Building a Complete Feature
Refactoring Existing Code
Learning from Documentation
Conversation Management
Multiple Conversations
You can maintain separate conversations for different purposes:- Click the + icon to create a new conversation
- Click the History icon to view and switch between past conversations
- Each conversation maintains its own message history
- The AI uses conversation history as context for follow-up requests
Conversation Titles
The first message in each conversation automatically generates a descriptive title using Claude 3.5 Haiku. Default title is “New Conversation” until the AI generates a better one based on your first message.Cancelling Requests
If the AI is processing and you want to stop:- Click the Stop button (appears while processing)
- The Inngest function receives a cancellation event
- Any in-progress operation is halted
- The message is marked as “cancelled”
AI Behavior and System Prompt
The AI is instructed to:- Work silently - Execute tools without narrating every step
- Complete tasks fully - Never stop halfway or ask “should I continue?”
- Verify changes - Call
listFilesafter major operations - Provide clear summaries - Explain what was accomplished in the final response
- Use conversation context - Remember previous messages in the conversation
System Prompt Highlights
From/src/features/conversations/inngest/constants.ts:1:
Message Flow
When you send a message, here’s what happens:API receives message
/api/messages endpoint creates user and assistant message placeholders in the database.Inngest event triggered
A
message/sent event is sent to Inngest with the message ID and conversation ID.Agent processes request
The
process-message Inngest function:- Fetches conversation history (last 10 messages)
- Builds system prompt with context
- Creates the Polaris agent with all file tools
- Runs the agent with up to 20 iterations
Agent uses tools
The AI calls tools as needed (listFiles, readFiles, createFiles, etc.) and receives results.
Technical Implementation
Agent Framework
Polaris uses @inngest/agent-kit to create an agent network:- Max iterations: 20 (prevents infinite loops)
- Router logic: Continues until the AI returns text without tool calls
- Temperature: 0.3 (balanced between creativity and consistency)
- Max tokens: 16,000
Error Handling
If the Inngest function fails:- The
onFailurehandler updates the message with: “My apologies, I encountered an error while processing your request.” - The conversation remains intact for you to retry
- Logs are available in the Inngest dashboard for debugging
Configuration
| Setting | Value | Location |
|---|---|---|
| Main model | Claude Opus 4 | process-message.ts:159 |
| Title model | Claude 3.5 Haiku | process-message.ts:121 |
| Temperature | 0.3 | process-message.ts:160 |
| Max tokens | 16,000 | process-message.ts:160 |
| Max iterations | 20 | process-message.ts:178 |
| Context messages | Last 10 | process-message.ts:92 |
Tips for Effective Conversations
- Be specific - “Create a React component for a user profile card” is better than “make a component”
- Share documentation - Include URLs to framework docs, API references, or examples
- Build incrementally - Start with core functionality, then request enhancements in follow-up messages
- Review changes - Always check what files were created/modified
- Use follow-ups - The AI remembers conversation context, so you can say “now add error handling” without repeating the feature name
Comparison with Other AI Features
| Feature | Scope | Best For |
|---|---|---|
| Conversations | Multi-file, project-wide | Complex features, refactoring, learning from docs |
| Quick Edit | Single selection | Fast transformations of selected code |
| Suggestions | Single line | Auto-completing as you type |
Related Features
- Documentation Scraping - How the AI learns from URLs
- Quick Edit - Inline code transformations
- Ghost Text Suggestions - Auto-complete suggestions