Break a large, uncertain task into short, controlled loops: Division of labor · Review · Single-step redo · Memory and reuse.
H2 Harness (H2HN for short)
H2 Harness is not a call loop wrapped around a model. It is a server-side agent runtime architecture: state, memory, orchestration, gates, approval checkpoints and model routing have all been redesigned on the server side.
Illustrative animation, using a short drama as the example. Text (T), images (I), audio (A) and video (V) are all first-class nodes on the task graph; when a node fails, only that node is sent back, and nodes that have already passed stay untouched.
A common harness is a loop wrapped around a model: send a prompt, call tools, retry on error, with state kept on the client. H2 Harness turns this into a server-side runtime, with dedicated engineering optimizations in seven places.
| Area | Common harness designs | The H2 Harness design | What you get |
|---|---|---|---|
| Where it runs | Runs on the client or in a single process; state goes wherever the window goes. | Server-side runtime: an append-only event log plus cross-process locks. The server is the single source of state; the device only displays it. | Close the page, lose the connection or switch devices, and the task still resumes. |
| Context assembly | Carries the full history, or simply truncates once the length limit is reached. | Recent turns keep their original text; earlier turns get a “three-line compression” (original words, conclusion, tool summary); skill bodies already loaded are deduplicated globally. | The model gets the smallest sufficient context: fewer tokens spent, no conclusions lost. |
| Roles and budgets | One prompt both writes the body text and checks the format. | Scheduling, writing, review, revision and archiving each get their own minimal context; scheduling and review run on short output budgets, writing and revision on long output budgets. | Steps that should be fast are fast; steps that need length are written in full. |
| Quality checks | The model is asked to check its own work. | Countable checks such as missing sections, fields, format and counts go to programmatic gates and consume no tokens; AI review looks only at semantics and returns a diff list. | Basic errors are stopped before they reach review. |
| High-risk actions | No approval checkpoints; a retry after a timeout may run the action twice and charge twice. | Approval checkpoint state machine: atomic server-side confirmation plus a write-ahead log; the same approval takes effect only once across multiple devices. | Actions such as publishing, billing and writing to business systems are controllable and traceable. |
| Multimodality | Attachment links are pasted into the text. | Task graph: text, images, audio and video are all nodes, with upstream and downstream dependencies; change a node and only the affected part is rerun. | A local change does not mean redoing the whole chain. |
| Working with the model layer | The model is called as a black-box API. | Designed together with H2 Model Combo and H2 GPU Combo: session affinity follows the “call the model, wait for tools, call the model again” rhythm, so history that has already been read still hits the cache on the next step. | About 1 second to first token on long contexts Measured |
“Common harness designs” is a summary of common forms, for comparison only; for the capabilities of any specific product, refer to its official documentation.
At 95% per step, the chance of 30 steps in a row all going right is only about 21% — nearly eight in ten long tasks hit an error along the way (illustrative math, assuming independent steps).
H2 Harness adds a gate and a review after every step, and redoes only the step that fails. Drag the sliders to see the two curves separate.
Illustrative model, assuming every attempt is independent and review can identify a failed result: per-step success rate after redo = 1 − (1 − p)³. It explains the mechanism; it is not a measured metric.
Together, the four mechanisms keep long tasks from losing their memory or drifting off course, and make them auditable.
Each role gets only its own minimal context, dedicated prompt and acceptance criteria. Writing roles get a long budget, review roles a short one; there is no single do-everything prompt shared by all.
Programmatic gates run deterministic checks first, then the review role scores item by item. A result that fails is sent back to the same step and redone against a diff list.
Only the failed step is rerun. Steps that have passed stay untouched; the whole segment is not reworked.
Session and workspace memory stay on the server. Characters, master images and templates are distilled into records and skills that the next project calls directly.
Rules such as missing fields, format, word count and duration, and billing idempotency are checked directly by programs: no tokens consumed, and the results are reproducible.
Semantic issues such as plot logic, visual consistency and data rigor are scored item by item by the review role, which outputs actionable revision notes.
We do not bet on any one underlying model natively understanding every modality. Each output is written back to a node on the graph, and later steps fetch exactly what they need by reference; nobody has to carry assets back and forth by hand.
At nodes such as public release, large compute charges and writes to business systems, the task stops at an approval checkpoint automatically. Approve from either a phone or a computer; the result is written back idempotently to the same timeline.
Memory lives on the server, not in a browser tab. Switch devices and the work resumes; switch people and someone else can take over.
Illustrative animation: the top half shows one person switching devices while the server-side timeline stays unbroken; the bottom half shows member B taking over the workspace and inheriting its records and skills.
Each session is stored on the server as an append-only event log, with monotonic sequence numbers and cross-process locks. The most recent turns keep their original text; earlier turns are compressed into three lines: original words · conclusion · tool summary. Close the browser or change computers, and progress and context resume as usual.
Character and scene master images, company standards and stage results are written by dedicated roles into structured records and stored in the workspace. When someone new on the team takes over, they inherit verified facts and methods directly.
Only four kinds of capability slots are exposed to agents (supplied slot by slot by H2MC). Each slot has a primary provider and a backup provider, with automatic switchover on rate limiting, timeout or failure. Replacing the underlying model, changing the quality tier or moving to a private-deployment node changes only the routing configuration; memory, roles, skills and approval checkpoints stay untouched.
Skills hold methods · messages hold facts · gates do the checking
Skills are stored at three levels: platform, team and personal. A few candidates are recalled by metadata first, and only then are their bodies assembled. For a new industry, swap only the skill pack and the gate rules, and the same core can be embedded in a new product; timeline, memory, orchestration, task graph, approval checkpoints and primary–backup failover are all reused.
Users never see H2 Harness, but every long task in Yingma and H2 Code runs on it.
Specialized agents for scriptwriting, master-image audit, storyboard direction, camera-parameter orchestration, and dubbing and editing work together; a production-run series is released in 1 day, and one-click full-series generation runs unattended for up to 100 minutes.
Live-comment understanding, knowledge-base retrieval, show direction and compliance filtering run in parallel, driving RayWorld Live to stream in real time.
Industry research reports, cross-analysis of multiple spreadsheets, business processes that span systems; every step is checked and revised automatically, and high-risk actions stop at an approval checkpoint.
Long tasks often run for dozens of turns, with contexts of hundreds of thousands of tokens. Stateful cache and session affinity bring long contexts to about 1 second to first token (measured); that is what makes multi-role orchestration fast and affordable.
Learn about H2MC ↓ L1 World model · CallsIt sends structured camera pose parameters (position xyz + orientation yaw / pitch / roll) to R1, and pushes live scripts and interaction branches to Live — a camera that agents can control programmatically.
Learn about RayWorld ↑ L3 Applications · Embedded inThe orchestration core behind the short-drama pipeline, one-click full-series generation and the real-time live hub.
Learn about Yingma ↑ L3 Applications · Embedded inLong tasks that stay on course, device switches that lose nothing and multimodal delivery in one place all rest on this core.
Learn about H2 CodeError accumulation, the four mechanisms, task graph and approval checkpoints, dual-scope memory, capability slots and the three-level skill library. The same content as this page.