Live in San Francisco
TechByte
TechByteENGINEERING & AGENTS
All notes
FIELD NOTES

Agent Context, the @ reference

Why rich, interactive references need identity, serialization, hydration, and bidirectional sync to remain useful throughout an agent workflow.

HedraContextEditor architecture
Agent Context: interactive @ references connect a prompt to named visual assets.

Adapted from my article originally published on LinkedIn.

Read original on LinkedIn

Agent products are often discussed in terms of prompts, tools, and model quality. In practice, the experience can break earlier: the product cannot help someone attach the right assets, preserve what those assets mean, or recover the same context after editing and reload.

That is the problem I wanted to solve with Hedra’s @ reference system.

The prompt box as a structured context layer

I wanted the composer to do more than accept text. Instead of asking someone to write “use the second image above,” it should let them insert a reference with a clear identity.

Typing @ opens a context system that can surface thread assets such as images, audio, and video; references already attached to the prompt; and public elements that are useful before the user uploads anything.

Selecting a reference creates a rich badge in the editor. The user gets a simple interaction. The system gets context it can identify, reason about, and preserve.

Illustrated reference library with named characters, locations, objects, and visual assets.

Rich inline nodes, rather than decorated text

A reference badge is a UI node with identity and behavior. It can:

  • Display the referenced context inside the editor.
  • Open more information when clicked.
  • Be removed inline.
  • Participate in selection and keyboard deletion.

If the reference is only a string, the product loses important information. It no longer knows exactly which asset the user meant, how the reference should behave, or how to reconstruct it in a later session.

The rich node is what makes the visual interaction correspond to something durable in the underlying prompt.

Serialization is the harder problem

Rendering a badge once is not enough. The reference has to survive editing, saving, copying and pasting, prompt prefills, server round-trips, and editor rehydration.

The node therefore needs a serialized form. In Hedra, a rich badge can be converted into a portable text representation, then hydrated back into a structured node when the prompt returns to the editor.

The useful property is the combination: rich in the interface, durable in transport. A reference that looks good but loses its meaning in history or after reload is only part of a feature.

Keeping the editor and attachments in sync

Prompt attachments are not static. Users add, remove, and reorder references while composing.

Reordering must preserve the relationship between the badge and the attached asset. If the attachment order changes, serialized references need to remain aligned with the new order instead of silently pointing at something else.

Bidirectional sync makes the badge and the reference model behave like one system. Deleting a badge should update the underlying reference. A change to the reference model should be reflected in the prompt.

Hydration restores the structured experience when a saved or pasted prompt returns to the editor. Without it, rich context becomes ordinary text and loses much of its value.

These are editor architecture concerns, but they directly shape the quality of the agent interaction.

One interaction, more kinds of context

Once the @ pattern exists, it can extend across relevant asset types and context sources: images, audio, video, files, reusable prompt artifacts, and public reference libraries.

The user does not need to learn a new workflow for each source. The product keeps the same interaction while giving the agent richer ways to ground its work.

I built this system to improve what the agent could do by improving how the product handles context. Better models matter, but so do interfaces that let people attach information through nodes that can be rendered, interacted with, serialized, and restored reliably.

When context is composable, the agent becomes more capable.

Adapted from my LinkedIn article published March 25, 2026. The original article’s assets were made with Hedra’s agent using the @ reference feature.

Stay curious. Keep building.Aura