Amplifier Integration in WAIIDE

Amplifier Integration in WAIIDE

Calliope Integration: This component is integrated into the Calliope AI platform. Some features and configurations may differ from the upstream project.

This document describes the integration of Microsoft’s Amplifier AI development environment into the WAIIDE (Web AI IDE) platform.

Overview

Amplifier is a coordinated and accelerated development system that provides:

  • 20+ specialized AI agents for different development tasks
  • Persistent knowledge extraction and synthesis
  • Workflow automation for complex methodologies
  • Integration with Claude WAIIDE SDK

WAIIDE now includes Amplifier as a pre-installed component, making it available to all users in their workspace.

What’s Integrated

System Components

  1. Amplifier as Git Submodule

  2. Python Dependencies

    • Installed via uv (Amplifier’s package manager)
    • Includes all required packages from Amplifier’s pyproject.toml
    • Virtual environment at /opt/calliope/amplifier/.venv
  3. Additional Tools

    • uv: Python package manager (installed to /root/.local/bin)
    • pnpm: Node package manager (required by Amplifier)
    • All Amplifier CLI tools and scripts

User Setup

Each user gets:

  • Symlink to system Amplifier installation at ~/amplifier
  • Personal data directory at ~/.amplifier-data/ with subdirectories:
    • knowledge/ - Extracted knowledge base
    • indexes/ - Search indexes
    • state/ - Session state
    • memories/ - Persistent memories
    • cache/ - Temporary cache

How to Use Amplifier

Starting Amplifier

From the integrated WAIIDE terminal:

# Navigate to your workspace
cd ~/workspace

# Activate Amplifier's Python environment
source ~/amplifier/.venv/bin/activate

# Start Claude WAIIDE with Amplifier
claude

Using Amplifier Agents

Amplifier provides specialized agents for different tasks:

# Architecture design
"Use the zen-architect agent to design my application's caching layer"

# Debugging
"Deploy bug-hunter to find why my login system is failing"

# Security review
"Have security-guardian review my API implementation"

See ~/amplifier/.claude/AGENTS_CATALOG.md for the complete list of agents.

Knowledge Base

Build and query your project’s knowledge base:

# Extract knowledge from documentation
make knowledge-update

# Query the knowledge base
make knowledge-query Q="authentication patterns"

# Visualize knowledge graph
make knowledge-graph-viz

Parallel Development

Test multiple approaches simultaneously:

# Create parallel worktrees for different approaches
make worktree feature-jwt
make worktree feature-oauth

# List all worktrees
make worktree-list

# Remove a worktree
make worktree-rm feature-jwt

Architecture Details

Build-Time Integration

The Dockerfile includes:

  1. Builder Stage (lines 51-52)

    • Copies amplifier source from submodule
    • No compilation needed (Python-based)
  2. Runtime Stage (lines 255-266, 440-459)

    • Installs uv package manager
    • Installs pnpm for Node.js dependencies
    • Copies Amplifier from builder
    • Installs Python dependencies via uv sync
    • Creates data directories
    • Sets up permissions

Runtime Integration

The entrypoint script (scripts/entrypoint-jupyterhub.sh) includes:

  • Call to /usr/local/bin/setup-amplifier at line 629
  • Creates user-specific symlink and data directories
  • Non-blocking setup (won’t prevent WAIIDE from starting)

Build Process

The build.sh script ensures:

  • Amplifier submodule is initialized before build (line 105-108)
  • Same submodule initialization as other components
  • Automatic recursive update for all submodules

Files Modified

Configuration Files

  • .gitmodules - Added amplifier submodule reference
  • build.sh - Updated submodule initialization check

Docker Files

  • Dockerfile - Added amplifier installation steps

Scripts

  • scripts/setup-amplifier.sh - New user setup script
  • scripts/entrypoint-jupyterhub.sh - Added amplifier initialization call

Documentation

  • docs/AMPLIFIER_INTEGRATION.md - This document

Environment Variables

Amplifier uses these environment variables (automatically configured):

  • PATH - Includes /root/.local/bin for uv and /root/.local/share/pnpm for pnpm
  • PNPM_HOME - Set to /root/.local/share/pnpm
  • AMPLIFIER_DATA_DIR - Points to user’s ~/.amplifier-data/

Troubleshooting

Amplifier Not Found

If ~/amplifier doesn’t exist:

sudo /usr/local/bin/setup-amplifier

Python Environment Issues

If the virtual environment isn’t working:

cd ~/amplifier
/root/.local/bin/uv venv --python python3.11 .venv
/root/.local/bin/uv sync
source .venv/bin/activate

Permission Issues

If you can’t write to ~/.amplifier-data/:

sudo chown -R $USER:100 ~/.amplifier-data

Performance Considerations

  • Build Time: Adds ~2-5 minutes to Docker build (depends on network speed for package downloads)
  • Image Size: Adds ~500MB to final image size
  • Runtime: Minimal impact - setup is non-blocking
  • Disk Usage: User data directories grow with knowledge extraction (~100MB per user typical)

Future Enhancements

Potential improvements:

  • Pre-build knowledge indexes for common patterns
  • Shared knowledge base across users
  • Integration with JupyterHub spawner options
  • Custom Amplifier agents specific to WAIIDE workflows

References