# Affordable Reasoning

> Do more with AI. Pay less for tokens.

Affordable Reasoning provides persistent, isolated workspaces called **Hot Lanes** for Claude, AGY, and local AI models. Workloads run on a customer's compatible Apple Silicon Mac, on hosted Mac Studio-class hardware, or on self-hosted elastic cloud inference nodes (AWS Inferentia2 and GCP TPU v5e).

---

## The 6.5 GB Bonsai 27B Engine & Two-Tier Code Synthesis

In addition to routing commercial model plans, Affordable Reasoning features the native **Bonsai 27B Engine**, decoupling code generation into a two-tier neural conveyor belt:

1. **Tier 1: 350M Structural AST Edge Motor**
   - Runs locally in L3 cache or NPU (@ 2W power).
   - Multi-Token Prediction (4.5 tok/step) + Continuous Batching (Batch 8) emits structural Rust code at **1,500 to 3,000 AST tok/s** with 0% syntax errors.
   - Emits symbolic code using placeholder tokens (`_f0`, `_s0`, `_v0`).

2. **Stage 2: In-Memory Compiler Verification Gate**
   - Checks syntax, types, and borrow invariants in **2–5 ms** on CPU *before* cloud network dispatch.
   - Invalid candidates are rejected and regenerated instantly with zero cloud token consumption.

3. **Tier 2: 6.5 GB Bonsai 27B Semantic Annotator & Planner**
   - Evaluated in micro-bursts on cloud or local GPU.
   - Operates strictly on verified structural code, generating only the `SymbolRenameTable` dictionary (`{"_f0": "resolve_bank_hazard"}`) and docstrings (~70 tokens).
   - Generates **4.6 verified, documented functions/s** (~1,150 effective code tok/s on a laptop, >5,000 tok/s on cloud silicon).

---

## Prefix-LoRA as KV-Cache & The 6.54 GB Hybrid Architecture

Conventional transformer inference requires massive dynamic KV caches that scale linearly $\mathcal{O}(L)$ with sequence length:
- **At 32k tokens**: 8.6 GB KV cache
- **At 128k tokens**: 34.4 GB KV cache (larger than the model weights!)

### The Context-as-Weights Breakthrough
Affordable Reasoning compiles repository context, schemas, and guidelines directly into a **15 MB to 35 MB Prefix-LoRA adapter**:
- **Compression**: $500\times\text{ to }1,000\times$ smaller than raw activation caches.
- **Zero Prefill Latency**: Eliminates the 2–3 second quadratic attention prefill phase ($0\text{ ms prefill}$).
- **The Hybrid Architecture**: 15 MB Prefix-LoRA (static repository context) + 30 MB dynamic `PagedKvPool` (active 150-token keystroke window).
- **Total Active VRAM**: **6.54 GB TOTAL**, running full coding sessions locally on consumer hardware.

---

## Multi-Cloud Fleet Management & Cloud Economics ($0.03/M Tokens)

Our cloud infrastructure coordinates across four core pillars:
1. **`ganvil-mcp`**: Desktop tool surface for VS Code and Neovim running the edge motor and compiler gate.
2. **`mothership-carrier`**: Core-pinned lock-free ring buffer streaming $< 1\text{ KB}$ QUIC payloads per function.
3. **`MothershipDeploy`**: Global fleet manager with SWIM gossip telemetry, token-demand predictive auto-scaling, and zero-downtime Spot preemption draining.
4. **`ganvil-cloud`**: Server-side continuous batching engine deployed on AWS Inferentia2 (`inf2.xlarge`) and GCP TPU v5e.

### Token Cost Comparison
- **Claude 3.5 Sonnet API**: $15.00 / M output tokens
- **OpenAI GPT-4o API**: $10.00 / M output tokens
- **AWS Bedrock (Llama 70B)**: $2.65 / M output tokens
- **Ganvil Bonsai on AWS On-Demand**: **$0.093 / M output tokens**
- **Ganvil Bonsai on AWS Spot (`inf2.xlarge` @ $0.228/hr)**: **$0.028 / M output tokens** ($\mathbf{97\%\text{--}99\%}$ cost reduction)

---

## What a Hot Lane is

A Hot Lane is one always-ready, isolated workspace for one active AI coding agent. It retains tools, repositories, authenticated model access, and workspace state so the agent can continue working without rebuilding its environment.

Cold Lanes retain workspace state without consuming full-time capacity. They wake on demand and are billed according to active time.

## Core benefits

- Reduce metered token spending by routing suitable work through the Bonsai engine, subscription plans, and local models.
- Keep agent workspaces persistent, isolated, and ready.
- Route work between Bonsai, Claude, AGY, local models, and permitted API overflow.
- Monitor infrastructure health automatically.
- Use human recovery when automation cannot restore service.
- Invite teammates and manage workspace roles through the control room.

## Pricing

- **Hot Lane:** $100 per active lane per month.
- **Minimum:** One Hot Lane, or $100 per month.
- **Additional Hot Lanes:** $100 per lane per month.
- **Cold Lanes:** Usage-based according to active time.
- **Optional managed box:** $100 per month.
- **Optional connectivity:** $50 per month.
- **Bonsai Cloud Fleet:** Billed per million tokens at cost (~$0.03–$0.10 / M tokens).

A hosted configuration with one Hot Lane is $250 per month before model subscriptions: $100 for the lane, $100 for the managed box, and $50 for connectivity.

## Hardware

Bring Your Own Box supports a compatible Apple Silicon Mac, AMD Strix Halo / Zen 5 NPU system, or dedicated Linux accelerator. A Mac Studio is preferred, with at least 32 GB of unified memory and wired Ethernet. Affordable Reasoning can alternatively host workloads on managed hardware or cloud inference gravity wells.

## Model plans and routing

Customers may connect model plans they already own or utilize self-hosted Bonsai inference. Affordable Reasoning can route a single customer's workloads across Bonsai, Claude, AGY, local-model, enterprise, or API capacity where provider terms allow.

Affordable Reasoning does not pool consumer subscriptions between unrelated customers, misrepresent account ownership, or circumvent provider quotas. Model subscriptions are separate from infrastructure pricing unless an explicitly permitted managed business arrangement is agreed.

## Operations and privacy

Automation monitors infrastructure health, lane availability, resource pressure, and session recovery. Human operators intervene when automated recovery cannot restore service.

Monitoring is intended for infrastructure health, not customer code or conversations. Workspace access requires explicit authorization and is recorded.

## Illustrative savings scenario

The marketing site compares a $9,000 monthly token bill with an illustrative $450 managed stack made up of $200 in model plans and a $250 hosted Hot Lane. When using self-hosted Bonsai on AWS Inferentia2 Spot, token costs drop to $0.028 per million tokens, unlocking over 98% savings on high-volume agent loops.

## Product routes

- [Marketing site](https://hot-lane-agent-cloud.saumyag70586.chatgpt.site/)
- [Dashboard preview](https://hot-lane-agent-cloud.saumyag70586.chatgpt.site/dashboard)
- [LLM index](https://hot-lane-agent-cloud.saumyag70586.chatgpt.site/llms.txt)
- [XML sitemap](https://hot-lane-agent-cloud.saumyag70586.chatgpt.site/sitemap.xml)
