Skip to content
Bo WangContact
Selected work

Case study 02 · Personal project

Companion Studio

I built a local-first desktop AI runtime that packages its own inference stack.

Model selection, prompt evidence, presentation state, cancellation, retries, and runtime cleanup are coordinated behind a constrained Electron process boundary.

Role

Local AI Product Engineer

Status

Personal project

Contribution

I designed and built it as a personal product.

Problem and constraints

Problem

Desktop AI products need coordinated model, prompt, presentation, and lifecycle state without exposing unrestricted process capabilities.

Constraints

Packaging had to preserve cancellation, retry, restart, and cleanup behavior inside a constrained Electron process boundary.

Trace the mechanism

A constrained local inference lifecycle

Interactive walkthrough · illustrative data. Packaged local verification exercised cancellation, retries, restart recovery, and runtime cleanup.

All states
  1. Ready. I built a local-first desktop AI runtime that packages its own inference stack.

    • Select model → Model selected for this character
  2. Model selected for this character. I coordinated model selection, prompt evidence, and typed presentation state behind a constrained Electron process boundary.

    • Assemble evidence → Prompt evidence assembled
  3. Prompt evidence assembled. Model selection, prompt evidence, presentation state, cancellation, retries, and runtime cleanup are coordinated behind a constrained Electron process boundary.

    • Generate → Inference running in the local runtime
  4. Inference running in the local runtime. A bundled local inference stack produces responses through adaptive presentation modes. The architecture runs inference inside the packaged local runtime.

    • Complete → Response presented, awaiting the user
    • Cancel → Cancelled, cleanup complete
    • Restart app → Restarted, rehydrated from typed state
  5. Cancelled, cleanup complete. Cancellation, retries, restart handling, and runtime cleanup are explicit lifecycle states.

    • Retry → Inference running in the local runtime
  6. Restarted, rehydrated from typed state. Cancellation, retries, restart handling, and runtime cleanup are explicit lifecycle states. The product is a packaged desktop companion with typed presentation state and a coordinated local inference lifecycle.

    • Rehydrate → Response presented, awaiting the user
  7. Response presented, awaiting the user. Generated responses remain presentation state, leaving acceptance and continuation with the user.

    • Restart app → Restarted, rehydrated from typed state
    • Accept → Accepted by the user
  8. Accepted by the user. Generated responses remain presentation state, leaving acceptance and continuation with the user.

    • Continue → Model selected for this character

Product, AI, and architecture

Product

The product is a packaged desktop companion with typed presentation state and a coordinated local inference lifecycle.

AI

A bundled local inference stack produces responses through adaptive presentation modes.

Architecture

The build combines Electron process boundaries, typed presentation state, bundled local inference, and packaged lifecycle checks.

Verification

Packaged local verification exercised cancellation, retries, restart recovery, and runtime cleanup.

Decisions and alternatives

Decisions

I coordinated model selection, prompt evidence, and typed presentation state behind a constrained Electron process boundary.

Rejected alternatives

I rejected direct presentation-layer control of the inference lifecycle because it would blur cancellation and cleanup responsibilities.

Reliability and review gates

Reliability

Cancellation, retries, restart handling, and runtime cleanup are explicit lifecycle states.

Privacy

The architecture runs inference inside the packaged local runtime.

Human review

Generated responses remain presentation state, leaving acceptance and continuation with the user.

Continue

Next project: AI Platform Reliability Contributions