Public code · self-hosted prototype
Terracotta
A personal AI workspace connecting model selection, tool approval, cost accounting, and self-hosting, with visible control over what gets executed.
ROLEProduct design · UI · agent/API implementation · deployment
PERIOD2026.07–
BUILT WITHTypeScript · React / Next.js · Cloudflare Workers · D1 · MCP · Docker
01 / PRODUCT
Overview
The product starts with the friction of switching AI tools while tracking context and cost separately. Model preferences, connected tools, and work history share a single flow.
02 / SYSTEM
Architecture
Provider model catalogs, price data, and execution usage are kept conceptually separate. Catalog refresh is distinct from a registry that promotes trained model artifacts.
- 01Router
Task and model preference
- 02Tool loop
MCP · pending approvals
- 03Review
A second provider
- 04Ledger
Usage and execution traces
03 / DELIVERY
Deployment and validation
Docker and Compose configuration, database health checks, backup instructions, and update procedures are published. GitHub Actions builds container images for GHCR with public run records.
The self-hosted edition is a personal prototype. It does not establish multi-user internet operation or high availability.
- Image versions and persistent state have separate update and recovery procedures.
- Separately from image publishing on public main, an approval concurrency and MCP boundary change passes a local build, 17 tests, and type checking. Distributed Cloudflare D1 verification is a separate scope.
04 / TRADE-OFF
Evaluation
An offline policy benchmark of 24 tasks estimated lower cost against a high-price single-model baseline, but higher cost against a low-price fixed model. This is not measured savings from live API traffic.
The quality axis depended on hand-defined constants and was excluded from performance claims. The next evaluation compares real classification, task success, and cost together.
ENGINEERING DECISIONS
Engineering decisions
01Explicit approval for writes
The agent loop shows the service and arguments and waits for approval for calls classified as write tools. Approval state and traces are stored. Uniform enforcement across all API entry points and duplicate execution under concurrent approval require further validation.
02Keep state beyond a container
Usage, settings, approval records, and encryption keys persist in a volume. Health checks inspect both the application and database.
03Remove an unmeasured quality claim
Hand-defined quality constants in a policy simulation cannot establish model quality. That claim was removed, and cost comparisons retain their baseline conditions.
SCOPE & LIMITS
Limitations and scope
- Real model responses require provider APIs. Subscription and credit UX remain prototypes.
- Container publication history is distinct from service availability or large-scale model serving.