Skip to content

Instantly share code, notes, and snippets.

@jnorthrup
Created November 20, 2025 15:59
Show Gist options
  • Select an option

  • Save jnorthrup/e0eb922b4fe3e6fc3df1265f9e28db32 to your computer and use it in GitHub Desktop.

Select an option

Save jnorthrup/e0eb922b4fe3e6fc3df1265f9e28db32 to your computer and use it in GitHub Desktop.
II-Agent Build Variants - Complete Summary from git history analysis

II-Agent Build Variants - Complete Summary

Based on PR #166 and commit history analysis

3 Main Build Modes

1. Full Installation

  • Command: pip install -e .
  • Size: ~2GB, 95+ packages, 3-5min install
  • Dependencies: All core + server + GCP + sandboxing + auth
  • What you get: Complete stack for server + REPL
  • Docker: docker/backend/Dockerfile, docker/frontend/Dockerfile

Includes:

  • Server mode (FastAPI, WebSocket, Postgres, SQLite, Redis)
  • REPL mode (interactive CLI)
  • GCP (Vertex AI, Cloud Storage)
  • Sandboxing (E2B, Playwright)
  • Auth (OAuth, JWT, Stripe)

2. Lite Installation (REPL only, no GCP)

  • Command: pip install -r requirements-lite.txt && pip install -e . --no-deps
  • Size: ~200MB, 45 packages, 30s install
  • Dependencies: Core only (agents, MCP/Tools, REPL, file processing, search)
  • What you get: REPL mode only
  • What's removed:
    • Server stack (FastAPI, DBs, Redis)
    • GCP dependencies
    • Sandboxing (E2B, Playwright)
    • Auth (OAuth, JWT, Stripe)

3. GAIA Benchmark Installation

  • Command: pip install -e .[gaia]
  • Dependencies: Full + GAIA-specific (datasets, huggingface-hub)
  • What you get: Bench tasks and evaluation

2 Runtime Modes

REPL Mode (Interactive CLI)

ii-agent --repl [--workspace .]
  • Implementation: src/ii_agent/cli/repl.py (+537 lines)
  • Features: Tab completion, model/provider selection
  • Works with: Lite or Full install

Server Mode (Web interface)

ii-agent [--port 8000] [--host 0.0.0.0]
  • Implementation: src/ii_agent/server/app.py
  • Features: Full web app with auth, credits, Stripe
  • Docker: Full Docker Compose stack included

3 Memory/Storage Backends

All three survive and are available:

  1. Hashtable: LRU in-memory caching
  2. Memvid: QR-encoded video storage
  3. DuckDB: Vector search and analytics

Adaptive Context Engineering (NEW)

Added in bb33517 on top of d8c3670:

  • Checkpoint without eviction (Strategy 5)
  • Microkernel generation before checkpoint
  • Context modes: SUSPENDED, HIGH_DETAIL, HIGH_CAPACITY, NORMAL
  • Dynamic model-specific thresholds (90% for 64K → 15% for 1MB)
  • Tools: RecallContext, MicrocontextSubroutine

Does NOT replace lower build variants - it's additive.


NVIDIA Provider

From lower commits (f01560f, 9939946, bf3b298):

  • NVIDIA_API_KEY support
  • Qwen3-coder-480b default
  • Bayesian model ranking
  • SQLite database integration

Python 3.14 Compatibility

From d8c3670:

  • Puremagic instead of imghdr
  • Unpinned pydantic (was ==2.11.7, now >=2.11.7)
  • Build flag: PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1

What Tests Were Removed (Orphaned)

From lower commit 51086ca (refactor/tool #144), tools were deleted:

  • src/ii_agent/tools/bash_tool.py
  • src/ii_agent/tools/str_replace_tool.py
  • src/ii_agent/tools/sequential_thinking_tool.py
  • 42 other legacy tools

Tests removed in d8c3670 (1529 lines, orphaned tests):

  • tests/tools/test_bash_tool.py (565 lines)
  • tests/tools/test_str_replace_tool.py (747 lines)
  • tests/tools/test_sequential_thinking_tool.py (217 lines)

All deleted code tested tools that no longer exist.


Docker Deployment

All survive from lower commits:

  • Full Stack: docker/docker-compose.stack.yaml
    • postgres, redis, frontend, backend, sandbox, tool-server, ngrok
  • Backend: docker/backend/Dockerfile (uv, playwright)
  • Frontend: docker/frontend/Dockerfile (Node 18)
  • E2B Sandbox: e2b.Dockerfile

Complete Build Matrix

# Install variants
pip install -e .                              # Full (2GB)
pip install -e .[gaia]                       # GAIA benchmark
cat requirements-lite.txt | xargs pip install && pip install -e . --no-deps  # Lite (200MB)

# Runtime modes
ii-agent --repl                              # REPL mode
ii-agent --port 8000                       # Server mode

# Docker
docker-compose -f docker/docker-compose.stack.yaml up

# Python versions
Python 3.10, 3.11, 3.12, 3.13, 3.14
# For 3.14: export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1

Key Insight

No lower commit variants were removed - only deprecated test files for already-deleted tools were cleaned up. The codebase maintains full backward compatibility while adding new features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment