EME

ENGINEERING NOTES · TEAM NYX · 31 OCTOBER 2026

Building traceable design memory with TigerGraph

Good editing tools need to remember why a design worked, and whether that preference still applies. This is how we connected EME’s design system to a graph without making the editor depend on cloud availability.

The editing problem

EME (Editing Mechanics Engine) is a local video-editing and motion-graphics tool for creators who want to work directly on a timeline or give instructions through their IDE. The IDE proposes structured edits through MCP; EME measures layouts, compiles motion, validates operations and renders verified output after review. Users compare title-card, lower-third and statistic-card candidates, record explicit preferences, and revise approved components. TigerGraph stores a connected projection of design history so the IDE can retrieve relevant examples for future edits. Local editing continues when the graph is offline.

Architecture and TigerGraph schema

We integrated TigerGraph Savanna 4.2.5 as optional design memory, with an EME graph containing seven vertex types: EMEWorkspace, EMEDesignSet, EMECandidate, EMEProfile, EMEParameter, EMEFeedback and EMEComponent. Fourteen forward edge types plus reverse edges connect ownership, styles and parameter buckets, preferred/compared candidates, feedback replacements/retractions and component revisions.

The Node adapter writes deterministic vertex/edge IDs through atomic REST++ batches with acknowledgements. It publishes a syncing manifest and only marks a projection ready after read-back verification. Queries traverse workspace/component candidate relationships, filter by recipe, style and aspect, then check namespace, revision, expected counts and summary digests. These are bounded built-in REST++ vertex/edge reads, not vector search or a custom graph-algorithm pipeline.

Our own stdio MCP tool, eme_studio_get_design_memory, exposes verified examples to the IDE. Explicit feedback and approved revisions write back through the local ledger and sync adapter; the agent cannot create votes or approve its own edits. Retractions and undo remain represented in the graph, while stale relationships are excluded. Credentials, media, exact title text and free-text feedback notes are excluded from the projection.

A recorded live Savanna test passed sync/retrieval, feedback correction/retraction, component revisions, undo/redo, native MP4 export, restart and production MCP retrieval with source=tigergraph. See schema/tigergraph.gsql and docs/studio/TIGERGRAPH.md / TIGERGRAPH_ACCEPTANCE.md. The latest availability check found the cloud workspace paused with auto-start disabled; local feedback remained durable.

Laya: structured decisions before execution

Laya is EME’s advisory decision layer. The LayaDecisionAdapter loads typed question schemas for request routing, color-mood triage and timeline arbitration. This gives the IDE bounded answers it can inspect: a subsystem route, a candidate LUT or a review request, and timeline gap-risk, pacing and snapping guidance.

The current engine MCP exposes eme_route_request, eme_triage_color_mood and eme_arbitrate_timeline in advisory shadow mode. These handlers construct the adapter without an external predictor. Routing therefore uses the deterministic baseline, while color and timeline advice use rules. The routing adapter accepts an injected externalClient.predict(state, schema) and falls back to the baseline if that client fails. This interface is implemented; a trained Laya model is not wired into these default handlers.

EMEPolicyGate checks allowed routes, confidence, multistep planning, forbidden actions and supplied media/timeline prerequisites. Ambiguous requests go to planning or creative review. Color advice does not apply a LUT, and a timeline score does not mutate the timeline. Decisions carry trace IDs so the caller can inspect the recommendation.

Laya and TigerGraph have distinct roles. Laya supplies bounded decision advice through the engine MCP; TigerGraph supplies verified design examples through Studio’s eme_studio_get_design_memory. They are separate callable surfaces, not an automatic graph-trained Laya pipeline. The IDE can use the available advice and memory when preparing an edit, while EME’s validation and review flow controls application. This separation makes it possible to change a predictor later without giving it direct editing authority.

Implementation: Laya adapter, policy gate and engine MCP handlers.

Making preferences trustworthy

EME moves repeatable editing responsibilities into the engine while keeping the IDE as the creative driver. Its design memory connects a user's explicit comparison to the measured parameters, style and component revision that produced it. This gives the IDE traceable references rather than an unstructured prompt history. A suggestion is rebuilt as a fresh candidate under current layout constraints and reviewed before application.

The distinction between preference and activity matters: approving an edit, exporting or undoing does not invent a preference vote. Corrected or withdrawn feedback must stop influencing retrieval, and mirrored graph votes are not counted twice by the local ranker. We exercised these relationships through live Savanna retrieval and regression tests. This is deterministic design/ranking plus graph recall, not a claim that we trained a new foundation model.

Why a graph?

Basic editing and local ranking intentionally work without TigerGraph. The graph's role is the connected design-memory layer: relating a candidate to its style and parameter buckets, the alternatives it was compared with, replacement or withdrawn feedback, and the approved component's revision lineage. It lets the IDE retrieve examples with those relationships intact and audit why an example is relevant or no longer current.

A flat list of designs or likes would lose that context, especially after corrections and undo. A different database could implement similar joins, so we do not claim video editing is mathematically impossible without a graph. TigerGraph provides the explicit relationship model and verified graph retrieval for this feature; current retrieval is scoped to one workspace, not a global recommendation network.

Operational lessons

The explicit schema worked well for connecting design candidates, comparisons and revision history, and a live end-to-end run succeeded on Savanna 4.2.5. Keeping a dedicated runtime role scoped to EME let us preserve the existing sample graph and separate administration from editing.

The main hurdles were distinguishing cloud-account/control-plane credentials from database credentials, and recognizing a stopped Savanna workspace. The latter returned HTTP 500 with auto-start disabled. We added explicit diagnostics, bounded retries, acknowledgement checks and durable local replay so a cloud outage does not lose feedback or block editing. Clearer paused-workspace errors and a compact end-to-end authentication example would improve the experience.

What works today and what remains

The deployed URL is the public project website; Studio and rendering run locally with Node, FFmpeg/ffprobe and Python/Pillow. Optional selected-region tracking uses a local MobileSAM/PyTorch/OpenCV worker. The last recorded live graph run passed, but the latest cloud availability check reported a paused workspace that needs resuming before a live graph demo. Controlled tracking benchmarks are documented separately from natural-footage accuracy. We preserve uncertainty and do not claim automatic reacquisition after a lost track in the production prototype.

Run and verify

The repository includes setup instructions, the GSQL schema and a configuration template. Install the documented local dependencies, create the EME graph and supply your own graph-scoped database credential in an ignored environment file. Never put credentials in the IDE configuration or source control.

git clone https://github.com/atharvgit2005/EME.git
cd EME
# Follow docs/studio/README.md and docs/studio/TIGERGRAPH.md for prerequisites and graph setup.
node --env-file=.env.local bin/eme-studio.js
# In a separate terminal:
node --env-file=.env.local bin/eme-tigergraph.js sync
node --env-file=.env.local bin/eme-tigergraph.js verify

The live verifier fails when graph retrieval falls back locally. Its isolated feedback is retracted after the test, so controlled test votes do not become human preferences.

Source and evidence