Brain.The system behind the chat.
Lumina is the AI embedded across this portfolio. Everything she does — every tool she calls, every byte she stores, every model decision — is visible on this page or one click away in the public source. Operator-grade transparency is the brand contract.
01 · Model configuration
- Model
- claude-haiku-4-5-20251001Pinned snapshot of Anthropic's Haiku 4.5. No alias.
- Temperature
- 0.6Default for visitor chat — middle of warm and deterministic.
- Step cap
- stepCountIs(5)Claude may chain up to four tool calls before being forced to answer.
- Runtime
- edgeWeb Fetch + KV only. Lab routes run nodejs for the AWS SDK; voice STT runs nodejs for Whisper.
- Streaming
- ai-sdk/anthropic streamTextResponse streams as UIMessageStreamResponse; client renders deltas as they arrive.
02 · Tool registry
Thirteen tools across four groups. Every execute()body is server-side; nothing runs in the visitor's browser. The lab- invocation tools loopback to the existing /api/lab routes with the visitor's IP forwarded so rate limits and cost caps stay attributed to them. The repo-aware tools read this very repo via direct fetch to GitHub's public REST API — KV-cached so the same file isn't fetched twice per hour.
Portfolio reads
- listProjectsReturns every project on the portfolio with its id, title, status, and short description.
- getProjectDetailsFull case-study record for one project — description, tech stack, status, live + GitHub URLs.
- searchNotesSubstring match across the long-form notes; returns the top five hits.
- getRecentCommitsThe single most-recent commit Emre pushed. KV-cached from the GitHub Events feed.
Operator reads
- getCurrentTelemetrySix-metric snapshot — Lumina p95, auto-tweet successes, lab runs, npm weekly downloads, notes audio plays.
- getRecentEngineeringLast five commits with the WHY paragraph parsed from each commit body.
- getLabStatusCurrent /lab experiment registry — each entry's name, purpose, status, and URL.
Lab invocation
- translateIamPolicyLoopback to /api/lab/iam-translate — runs the IAM Policy Translator with the visitor's IP forwarded.
- rescuePromptLoopback to /api/lab/prompt-rescue — runs the Prompt Rescuer.
- narrateCommitsLoopback to /api/lab/narrate-commits — runs the Commit Narrator on a public GitHub URL.
Repo-aware reads
- readSourceFileVerbatim file contents from the public portfolio repo. Path-validated, 50 KB cap, KV-cached 1h.
- explainCommitRationaleSubject + WHY paragraph + diff stats for a specific commit SHA. KV-cached 7d (immutable).
- diffArchitecturesStructural diff of two projects' tech stacks. In-memory off data/projects.ts; no network.
03 · Memory contract
- Persistence
- anonymous sessionId minted client-side, kept in localStorage
- TTL
- 14 days (refreshes on every save; operator can extend up to 30 days via V5_MEMORY_TTL_DAYS)
- Verbatim context cap
- last 8 turns sent to the model
- Older turns
- Haiku-generated 2-3 sentence recap, cached in a sibling KV key
- Storage cap
- 100 messages per session (oldest dropped)
- Redaction
- emails, Turkish/international phones, AWS access keys, IPv6 + IPv4 addresses, Turkish national IDs (TC Kimlik, checksum-validated), and common API-key prefixes (sk-, ghp_, xoxb-, AIza…) — applied on write
- Pages index (V5)
- optional per-session list of recently-visited page slugs in a sibling KV key (lumina:session:<id>:pages, max 20 entries, same TTL). Foundation only in Sub-PR 6.4 — no observer mounted; Phase 10 ambient awareness will read this without ever mentioning it
- Opt-out
- Database icon in the chat header — when off, no KV reads or writes for the duration; preference persists across visits
- Forget control
- eraser icon in the chat header — deletes both KV buckets server-side
Live adoption
$ memory.adoption.snapshotNo adoption data yet — counters fire on the next chat turn with KV available.
04 · Runtime topology
Edge wherever possible; Node only where the dependency forces it (AWS Bedrock SDK + Whisper transcribe binary upload).
| Surface | Runtime | Depends on |
|---|---|---|
| /api/chat (POST) | edge | Anthropic API, KV (optional) |
| /api/chat/load (GET) | edge | KV (graceful no-op without) |
| /api/chat/forget (POST) | edge | KV (graceful no-op without) |
| /api/voice/transcribe (POST) | edge | OpenAI Whisper, KV rate limit |
| /api/voice/tts (POST) | edge | ElevenLabs |
| /api/lab/iam-translate (POST) | nodejs | AWS Bedrock (SigV4 needs Node) |
| /api/lab/prompt-rescue (POST) | nodejs | AWS Bedrock |
| /api/lab/narrate-commits (POST) | nodejs | AWS Bedrock + GitHub Octokit |
05 · Privacy contract
- Anonymous sessionId only — no account, no fingerprint, no cross-device link.
- PII (emails, phone numbers, AWS access keys) is redacted before storage. The KV bucket never holds raw values.
- The eraser icon in the chat header deletes both KV buckets server-side and wipes local state. One click, no confirmation dialog, no toast.
- Lab tool invocations carry your IP via the standard forwarded headers so per-IP rate limits and the $5/day per-experiment cost caps stay attributed to you across surfaces.
- No conversation is ever shared across visitors. No fingerprinting, no third-party trackers.
06 · Source files
The verbatim text for every behavior on this page lives in the public repo. Click any row to read the file on GitHub.
- System promptlib/lumina/system-prompt.tsThe full voice + identity + tool-use rules.
- Tool registrylib/lumina/tools.tsThe thirteen tools, their input schemas, their execute() bodies.
- Repo-aware helperslib/lumina/repo-aware.tsEdge-safe direct fetch to GitHub's REST API. Path / SHA validation. KV cache per resource type.
- Memory layerlib/lumina/memory.tsKV save/load, configurable 14-30 day TTL (V5 Sub-PR 6.4), MAX_MESSAGES cap, VERBATIM_CONTEXT_MESSAGES = 8.
- Memory TTL (V5)lib/v5/memory/ttl.tsOperator-configurable TTL resolution via V5_MEMORY_TTL_DAYS env var; clamps to 14-30 day range, defaults to 14.
- Memory pages index (V5)lib/v5/memory/pages.tsPer-session recently-visited page slugs in a sibling KV key. Foundation only — no observer in 6.4; Phase 10 ambient awareness will wire the producer.
- Memory adoption telemetry (V5)lib/v5/memory/telemetry.tsPer-event counter (hit/miss/store/opt-out). Drives the hit-rate surfaced above; fire-and-forget at every loadSession/saveSession call.
- PII redactionlib/lumina/redact.tsEmail + phone + AWS access key regex sweep applied pre-storage.
- Session summarizationlib/lumina/summarize.tsFire-and-forget Haiku call when older-turn block grows past threshold.
- Chat routeapp/api/chat/route.tsPOST entry point. Loads summary, trims to last 8 turns, calls streamText.
- Forget-Me endpointapp/api/chat/forget/route.tsPOST. Deletes both lumina:session:<id> and lumina:summary:<id> KV buckets.
07 · Tool consistency eval
A deterministic consistency check runs over every tool in the registry: it verifies the tool exists in lib/lumina/tools.ts, has a matching spinner label in TOOL_LABEL, has a row in the manifest above, and that its execute() body is wrapped in withTelemetry so its invocation count fires. The script is the public, runnable surface — invoke it locally and the result is yours to read directly.
node scripts/eval-lumina-tools.mjs)Exit 0 means every tool surfaces consistently across the four files; exit 1 flags the regression. Source at scripts/eval-lumina-tools.mjs.
09 · Sub-agents
One sub-agent runs alongside the default Lumina chat, routed deterministically by a heuristic classifier (no second LLM call). Ambiguous or unrelated turns always land on the default — the constitutional MUST “fail back to single-agent mode” is satisfied at the router boundary.
@architecture-critic. Read the full agent transparency →Visible orchestration trace: when the sub-agent fires you'll see an engaging architecture-critic pill in the chat-status strip before the response streams. That pill is the trace surface the V4 § 4.4 directive mandates.
08 · Live tool usage
Per-tool invocation counters fire on every chat turn — one fire-and-forget KV HINCRBY per call. Refreshed at the brain page's hourly ISR cadence; latency contributed to the chat is < 5 ms.
No tool invocations recorded yet. Counters land here the moment a chat turn calls a tool.
Public transparency·V4 § 2.3·Corrections log →
