About
What it does
The Burgundy Seal for anyone's picture or sound: *pixels may change, but neighbourhoods rarely do*. Attach a picture and ask veil to seal it: it reads a seal from the picture itself, one that survives a crop, a resize, a re-encode or a photo of it, and keeps that seal on your Mac. Later, attach any picture, cropped, resized or edited, and ask whose it is: it finds which sealed picture it holds, how much of it, and marks where the seal was found beside the wax seal, in the colours of the arms of Lyon: a thin teal rim curling in over a burgundy face, the RR mark pressed in with a brushed-platinum sheen, three gold flakes above it. The machinery is VeilGarde's BurgundySeal (vendored in Vendor/VeilGarde); this package hands it the picture and hands back what it draws. In Craft the results open in Canvas on their own, with no #canvas needed.
What you can ask
$veil seal this picture of Ben (with a picture attached)
$veil whose picture is this? (in ask mode too)
$veil is this one of my sealed pictures?
$veil seal veil/beach.jpg as "Lisbon shoot, day 2"
$veil seal this and interlace a copy (also writes a copy that carries the seal's id)
$veil seal this song as "rao's theme" (with a WAV, AIFF, M4A, MP3 or FLAC attached)
$veil is this clip from one of my songs?Attach the picture or sound with the composer's paperclip or the capture button, or name one in the project. veil takes the attached file itself, so a request never has to say where it was saved.
What you get
- A seal, kept on your Mac. The picture's seal, the label you gave and the day, in the folder Craft keeps for the agent (
~/.rao/apps/craft/agent-support/VeilAgent/seals/), keyed by a key made once beside it (seal.key). It survives updates, rebuilds and removing the agent. The picture itself is not changed. - The seal's picture.
veil/<name>.seal.png: the picture marked with its seal, beside its wax seal, its label, day and id. - An interlaced copy, if you ask.
veil/<name>.sealed.png: a copy whose pixels carry the seal's id (no pixel moves more than three levels), so the copy itself says it is sealed. Pictures of about a megapixel and up. - A verdict on any picture. Sealed (a stored seal is found: its label, the day, how much of the original the picture holds and at what size), interlace only (a copy's id names a seal that reads only in part: a heavy edit), content mismatch (a copy's id names a seal the picture does not hold: a copied id), unknown seal, or no seal.
- The detection's picture.
veil/<name>.detection.png: the found picture marked where the seal was found, the original's outline where it sits, and the wax seal stamped when it is found. - The same for sound. A sound is sealed too, and found again after a pitch shift or a speed change:
veil/<name>.seal.pngshows the sound's seal beside the wax seal, and a detect'sveil/<name>.detection.pngshows where the original sits in the found clip. A sound's verdict is sealed or no seal, with how much of the original the clip holds, at what speed (scale), where it starts (offset) and how far it was pitched (semitones). Sound has no interlace yet.
Measured
What it finds, measured on a fresh sample of 200 final_mixed pictures in 28 changes each, held to bars fixed before the run (VeilGarde's acceptance, 2026-11-19): crops down to a quarter of the picture, resizes from half to double and JPEG down to q60, 98.7%; the three together, 98.5%; filters and colour layers over part of the picture (brightness, contrast, gamma, saturation, hue, grayscale, blur, sharpen, noise, a tint, a gradient, a vignette, a sticker), 98.9%; a simulated photo of a screen, 98.0%; no picture ever named as another's, nor among 300 phone and reel screenshots.
For sound (VeilGarde's sound acceptance, 2026-11-22, macOS voices and one composer's masters, bars fixed before the run): cuts, pitch shifts of two semitones, time-stretches and AAC at 128 and 64 kb/s, 100%; speed changes of 0.75 and 1.5×, 100%, and of 0.5 and 2×, 95.7%; gain, a telephone band, tilt EQ and noise, 99.3%; a room, and a simulated re-recording through a speaker and a microphone, 97.1%. Whole songs are found under every change. The only clips found in one another were the same sound: a song that repeats its own section, and a macOS voice that is another voice's recording pitched down. MP3 is not tested yet. Most misses are smooth abstract renders with too little texture to hold a seal. Generative edits are not measured yet; try them. A seal takes a few seconds; a detect, under a minute for a small store. One runs at a time.
Works well with
veil is one of the Rao Craft Agents. Its answer asks the host to preview the pictures it wrote (granite-answer/1's interactions); Craft opens Canvas for it, and a host without a viewer still has the files. Saved sessions recall how $veil went before in a project.
Get it
In Craft, run craft agents add https://github.com/rao-craft/VeilAgent.git, then attach a picture and say $veil. Installing compiles MLX and its Metal shaders, which takes a few minutes. A new seal arrives as a new commit here: Update in Settings › Agents (or craft agents update VeilAgent) installs it.
Requirements
- A Mac with Apple silicon on macOS 26 or later.
- The Metal toolchain, to compile MLX's shaders at install:
xcodebuild -downloadComponent MetalToolchain. - GPL-3.0-only, because it carries VeilGarde's seal, which is GPL-3.0-only: a built runner is a combined work under the GPL. It is the one agent in rao-craft that is not MIT. Craft runs it as a process of its own and links none of it.
For developers
What a call takes and answers is Schema/, and how it is tested is TESTING.md. Nothing here reads a seal: VeilAgent.perform finds the picture (PictureSource), settles where results go (PictureOutputs) and where seals and the key live (VeilStore), and calls VeilGarde's BurgundySeal, or BurgundySound for a sound.
VeilGarde is private. Its four seal targets (VeilGardeCore, VeilGardeLens, VeilSeal, and VeilGardeAudio for sound) are copied, unedited, into Vendor/VeilGarde/Sources/, and Vendor/VeilGarde/REVISION names the VeilGarde commit they came from. Never edit them here: VeilGarde's Scripts/vendor-veilagent.sh --push copies its HEAD in, builds and tests this package (the suite and the GPU round trip), commits VeilAgent: VeilGarde <sha>, … and pushes main, and the store's pin follows.
Building a computational-photography agent
VeilAgent is meant to be copied. An agent that takes a picture, runs a Swift package's machinery over it and hands pictures back follows the same ten steps:
- Take the person's pictures. Declare
static let takes = ["public.image"]. A host hands a call only the files whose type conforms, incontext.host.attachments; read the first when the call gives nopath, and keeppathoptional, so a model never has to know where an attachment was saved. - Keep what must outlive a call in the host's folder. Declare
keeps(one sentence the person sees) and write only undercontext.host.support. Craft places it at~/.rao/apps/craft/agent-support/<Name>/and keeps it across updates, rebuilds and removal. Never pick a folder under~yourself. - Write results into the project, under
<directory>/<word>/, never beside the picture: an attachment lives where the host saved it, which is not the person's project. - Name them, and ask for them to be seen. List every file in
paths, and addinteractions: [.preview([lead, …], title:)]to the answer. A client performs the interaction kinds it has (in Craft, Canvas opens with the lead in front) and ignores the rest. Storeinteractionsin your answer type, so it is encoded. - Declare `makes`, each kind with where it lands, and fill
madeandexpectedwith those kinds. - Report progress with
context.host.note: a line a step shows under the call on the host's agent map. - One GPU workload at a time:
lanes = 1, and, if two runners could share the GPU, a lock file in the support folder (BurgundySeal.configure(lockFile:)here). - Make nothing before the first call.
compute()runs on the first call, and describing the package must never touch MLX: the host describes a runner before any Metal library may be beside it. - One Frigate in the graph. Link MLX through the domain package, or, as here with the domain vendored, take Frigate by its URL once (two Frigates in one graph are refused). Craft's installer compiles MLX's shaders and puts
mlx.metallibbeside the runner; there is nothing to do in the package. - Depend on the domain package by URL when it is public, on
branch: main(or a revision): Rebuild in Craft then picks up its newest commit. When it is private, as VeilGarde is, vendor its targets and let a script in the domain repository copy, gate, commit and push them here; Update in Craft installs the new commit.
Refuse before any work, with the fix in the sentence: conform your errors to AgentRefusing and pick the kind (the input's, the call's, the host's, the device's), so a refusal writes nothing and the model can say what to change.
How you ask
Say it in your own words
Type $veil and what you want. Craft fills these in for Veil.
1 required · 3 optional
Required 1
- Action
actionWatermark: mark the picture and record it; detect: read a picture for a mark and say whose it is
One ofwatermarkdetect
Optional 3
- Path
pathThe picture, relative to the project or absolute; leave it out to use the picture the person attached
Text
- Label
labelFor a watermark: who or what the picture is recorded as, in the person's words (a name, a shoot)
Text
- Output
output
Distribution
The package
- Repository
- Hosted privately by Rao
- Product
- VeilAgent in VeilAgent
- Pinned to
- 162d7f7
- Granite
- 5f9853d
Creator
@rao · rao.nyc · 0 followers · More by @rao
Ambient, Craft and Veil. New York.
Veil
Free

