Production essays. Agents that finish the job.
Deep notes from Sunrise Gen AI on harnesses, inspectable memory, and the stops that keep a loop honest. We build production GenAI for operations, knowledge, and data. For the work itself, start at sunrisegenai.com.
A database snapshot cannot unsend an email
A one-click undo for agent mistakes sounds like the safety net autonomy needs. It covers the rows you own and nothing else. Here is how we sort agent actions by how they can be reversed, record each one in a ledger before it runs, and gate the ones that have no way back.
Your screen is already a state machine. Make it say so
Most app screens run on a pile of loose flags: isLoading, hasError, isRetrying. Together they form a state machine nobody wrote down. Here is the agent pass we use to find those hidden machines, pin current behavior with tests, and fold the flags into one named state without breaking anything.
The agent should not guess what revenue means: a semantic layer for data agents
The hard part of agent analytics is not writing SQL. It is agreeing on what business words mean. We give data agents an approved terms file, expose only those terms through read-only tools, validate every query against certified definitions, and show the number, the SQL, and sample rows with every answer.
Ask for a label, not a paragraph: confidence-gated decisions in agent pipelines
Many of the model calls in a production agent are not writing anything. They are choosing: which queue, which intent, ship or hold. We treat those calls as typed judgments with a closed set of answers, a confidence score we actually check, and three bands that decide whether the agent acts, asks, or hands off.
Photos in chat, text in the tool: designing MCP tools text-first
Under the MCP spec, a tool takes JSON Schema arguments and nothing else. There is no native image or file input. So we let the host chat model read the photo, pass the tool plain text, keep limits on the server, and add a documented file-input variant only on hosts that publish one.
The agent comes to you. Approval still ships.
A production agent can wake on a schedule, read connected systems, and prepare a PR or a message on its own. Every send and every ship still waits for a human. Proactive is not unsupervised.
Find the exact line: why our agents search plain text before vectors
The default recipe for letting an AI read your documents is chunk, embed, store in a vector database. It works, but it is often the second step taken first. Here is how we start agent search with plain keyword search over raw files, make every answer quote a line it can prove, and add vectors only when a measured gap says so.
A model has to earn its route: swapping models with tests built from real failures
Sending each task to the best model is the right idea, and a common source of quiet regressions. Here is how we gate model swaps: one case set per route, built from production failures, and a challenger only takes a route after it beats the current model on that set.
Delete one rule and rerun: how we audit an agent's instructions
Agent instructions only grow. Every rule costs tokens and steps, and some quietly make the work worse. Here is the audit we run: freeze a case set, remove one rule, rerun, compare quality and cost, and move the rules that matter into code.
Pick the harness for the bill, not the score
Run the same open-weight models through three coding harnesses and the pass rate barely moves, but the tokens spent per solved task can double. Here is how we choose a harness, cap a run, and make an agent test after its last edit.
Measure, fan out, fix once: a speed pass for agent-built apps
Making an agent-built web app fast is an engineering process, not a prompt. Baseline a production build, fan out four read-only audits, fix everything in one pass inside guardrails, then measure again the same way.
Memory is five layers, not a bigger window
Models got smarter. Long-horizon agents still re-brief from zero. The production fix is a memory stack (working, episodic, semantic, procedural, forgetting), not another context-window upgrade.
The checker is not the maker
As models and harnesses commoditize, intent, verification, and evidence gate how fast agents get adopted in a business. Separate who does the work from who governs it. Store the change ledger. No evidence, no merge.
Two speeds of a token: prefill, decode, and the latency you actually ship
Prefill is a compute burst that sets time to first token. Decode is a memory-bandwidth walk that sets inter-token latency. Shipping GenAI means budgeting both, plus the cache and the batcher behind them.
Security is a release gate, not a last look
When agents write most of the code, pre-ship security cannot be a vibe check the night before launch. Secrets, authorization, data rules, abuse limits, supply chain, and logs become numbered gates the harness runs on every release.
Brand is a skill file, not a vibe
Coding agents invent a new look every run unless taste lives as a loadable skill. Tokens, type, spacing, forbidden patterns, and a verify gate so the studio stays the same.
The agent file is the contract
Most production agents are Markdown contracts, not framework code. Role, instructions, constraints, tool refs. Describing the agent is the product surface. Description without a harness is still a costume.
Cache hit rate is a harness quality metric
Prompt stability, tool-trace shape, and cache reuse are how you score a harness. An engineered layout earns hits. A vibe layout burns the floor.
Ship know-how as skills, not as another prompt
A reusable skill is a named contract the harness can load. Role, constraints, tools, and a recipe that survives the next project. Slop skills are prompts in a costume. Production skills are how the loop stops relearning the same job.
Coding agents need numeric gates, not vibes
Verify for coding agents is a stack of measurable contracts in the harness. Pick the gates that fit the job. Fail closed. Retry or escalate. Never ship on confidence theater.
Slim context packs beat written rules
Long policy in the prompt is not control. Slim packs plus hard stops — allowlists, budgets, stop sequences, refuse-when-unsourced — are control. Evaluation is product surface.
Give the agent a filesystem it can inspect
Opaque vectors and session blobs make memory a black box. Hierarchical files, portable over MCP, are how a person opens the last write before the next action fires.
An agent is a model plus a harness
A model generates tokens. An agent finishes work. The difference is the loop, the tools, the permissions, and a test gate in front of done — the harness is the product.