Skip to main content

Overview

The web interface provides an interactive, visual dashboard for working with RepoMaster’s multi-agent system. Built with Streamlit, it offers a user-friendly chat interface with real-time agent collaboration visualization, file management, and multi-user session support.

Launching the Web Interface

python launcher.py --mode frontend
# Access at: http://localhost:8501

Configuration Options

Server Configuration

The web interface supports several configuration options from launcher.py:115-126:
OptionFlagDefaultDescription
Port--streamlit-port8501Web server port
Host--streamlit-hostlocalhostServer host address
Upload Limit--max-upload-size200File upload size limit (MB)
File Watcher--file-watcher-typeautoFile watcher type
python launcher.py --mode frontend \
  --streamlit-port 8501 \
  --streamlit-host 0.0.0.0 \
  --max-upload-size 500

File Upload Configuration

The --max-upload-size parameter controls the maximum file size for uploads:
  • Default: 200 MB
  • Range: 1 MB - 2000 MB (2 GB)
  • Larger files may cause performance issues on low-memory systems

Key Features

Multi-Agent Chat Interface

The web interface provides an interactive chat experience with:
  • Real-time messaging: Instant communication with AI agents
  • Rich message formatting: Markdown support for code, tables, and formatting
  • Agent visualization: See which agents are working on your task
  • Message history: Persistent conversation history per session

Agent Mode Selection

From app_autogen_enhanced.py:447-491, the interface supports four agent modes:
ModeIconDescription
Unified🧠Automatically selects the best agent for your task
DeepSearch🔍Advanced web search and information synthesis
Programming Assistant💻Code generation and debugging assistance
Repository Agent📁Repository exploration and task execution
The Unified mode is recommended for most users. It intelligently orchestrates multiple agents based on your task requirements.

File Management

The web interface includes comprehensive file handling capabilities:

File Upload

From app_autogen_enhanced.py:129-156, uploaded files are:
  • Saved to session-specific work directories
  • Automatically sanitized for safe filenames
  • Time-stamped to avoid naming conflicts
  • Limited by the configured upload size

File Browser

The integrated file browser (app_autogen_enhanced.py:553) allows you to:
  • View files generated by agents
  • Browse work directory contents
  • Access output files and artifacts

Session Management

Multi-User Support

The application supports both authenticated and guest users: Guest Mode (app_autogen_enhanced.py:91-98):
  • No login required
  • 6-character short ID assigned
  • Data saved in local session
  • Limited to browser session lifetime
Authenticated Mode:
  • Persistent user sessions
  • Long-term conversation history
  • Cross-device access

Chat History

From app_autogen_enhanced.py:262-385, the interface provides:
  • Automatic conversation saving
  • Chat preview with timestamps
  • Message count indicators
  • Easy conversation switching
  • Delete conversation functionality

Work Directory Isolation

Each chat session gets an isolated work directory (app_autogen_enhanced.py:806-813):
work_dir = f"{pwd}/coding/{user_id}/{chat_id}"
This ensures:
  • No file conflicts between sessions
  • Clean workspace per conversation
  • Easy cleanup and management

User Interface Components

The top navigation bar displays:
  • Application title: “Code RepoMaster”
  • User identification (username or “Guest”)
  • Session status
The sidebar includes:
  1. Chat Management - Create new chats
  2. Chat History - Browse past conversations
  3. Agent Mode Selector - Choose agent mode
  4. User Status - Login/logout controls

Main Chat Area

The central chat interface features:
  • Welcome message for new conversations
  • Message thread with user/AI avatars
  • Timestamp for each message
  • File upload area above input
  • Chat input box at bottom

Message Display

Messages are rendered with (app_autogen_enhanced.py:588-615):
  • Role indicators (User/AI)
  • Avatar icons (👤 for user, ✨ for AI)
  • Timestamps (HH:MM format)
  • Markdown formatting support

Data Persistence

The web interface stores data in the data/ directory:
File PatternPurpose
{user_id}_past_chatsChat list and metadata
{user_id}_{chat_id}_messagesRaw message history
{user_id}_{chat_id}_display_messagesFormatted display messages
From app_autogen_enhanced.py:100-127, data is managed using joblib for serialization.

Best Practices

Performance Optimization

For better performance:
  • Keep upload file sizes reasonable (< 100 MB when possible)
  • Clear old conversation history periodically
  • Use localhost for single-user scenarios
  • Enable debug logging only when troubleshooting

Security Considerations

When exposing to network (--streamlit-host 0.0.0.0):
  • Use a firewall to restrict access
  • Consider implementing authentication
  • Monitor upload activity
  • Regularly review user sessions

File Management

  1. Monitor disk space: Work directories can grow large
  2. Regular cleanup: Remove old chat sessions
  3. Backup important outputs: Save valuable generated files elsewhere

Troubleshooting

Port Already in Use

If port 8501 is already in use:
python launcher.py --mode frontend --streamlit-port 8502

Upload Fails

If file uploads fail:
  1. Check file size against --max-upload-size limit
  2. Verify disk space availability
  3. Check file permissions in work directory

Session Not Persisting

If chat history doesn’t persist:
  1. Verify data/ directory exists and is writable
  2. Check for joblib serialization errors in logs
  3. Ensure sufficient disk space

Slow Performance

If the interface is slow:
  1. Reduce --max-upload-size if not needed
  2. Clear old conversation history
  3. Check system memory usage
  4. Review agent processing logs with --log-level DEBUG

Technical Details

Startup Command

From launcher.py:115-136, the frontend mode constructs:
cmd = [
    sys.executable, "-m", "streamlit", "run",
    "src/frontend/app_autogen_enhanced.py",
    "--server.port", str(config.streamlit_port),
    "--server.address", config.streamlit_host,
    "--server.fileWatcherType", config.file_watcher_type,
    "--server.maxUploadSize", str(config.max_upload_size)
]

File Upload Processing

File uploads are handled with safety measures (app_autogen_enhanced.py:158-184):
  1. Filename sanitization (remove dangerous characters)
  2. Length truncation (max 100 characters)
  3. Timestamp addition (prevent conflicts)
  4. Safe path construction (prevent directory traversal)

Chat ID Generation

Chat IDs use timestamp-based generation (app_autogen_enhanced.py:75-77):
def generate_chat_id() -> str:
    return f'{time.time()}'.replace('.','_')

See Also

Build docs developers (and LLMs) love