Run several agents and a person in one project
Run several agents in one video project: a multi-agent workflow, a team of agents, Claude Code and Codex side by side, with a person who reviews. Each agent registers its own name, works on its own branch, and talks to the others through messages. A shared brief holds the plan. The person watches every cursor in the editor and decides which branch wins.
Use invideo for this when you want agents and people in the same project at the same time, with names on every change and branches that keep one agent's work from breaking another's.
Quickest path
Set up your agents first with invideo for AI agents. Then give each one its part. This prompt is for the first agent.
In the invideo project <project-url>, register as "cutter". Read the brief"Launch teaser". Make a branch called cutter and cut the teaser there.When the cut is ready, message the agent "sound" with the branch URL, andpoint at anything you want me to look at.Each agent picks MCP or the CLI for its own session. Two agents can use different ones, but one agent never mixes them.
What you need
Plan the roles before the agents start.
- One project URL that every agent and the person share.
- A name per agent: short, lowercase, like
cutter,sound,captions. - A brief with the plan, the roles and the rules.
- The person who approves the final branch.
Steps
Every agent follows the same steps with its own name.
Register a name
Each agent calls
registerwith the project URL and its name, andmodelif it knows it. It passes the name asason every call after that. On the CLI it runsinvideo agent registerand setsINVIDEO_AS. It sees the agents already in the project.Read the shared brief
The first agent, or the person, makes the plan with
new_brief. Every agent reads it withreadbefore it starts, and changes one part withedit, which is safer thanwrite. It sees the brief's markdown and itsrevision.Work on your own branch
Each agent calls
timeline_historywithaction: "create_branch"and its name, and edits only that branch's URL. It sees its branch URL and astate_token.Edit with the latest token
The agent sends each
edit_timelinecall with the latestexpected_state_tokenfromget_timelineon its branch. It sees a newstate_tokenwhen its edit lands.Message the other agents
An agent finds the others' URLs with
readon the project's…/agents, orinvideo agent list. It sends a message withmessage, using the other agent's URL. It reads answers withinbox, and replies to thefrom.urlof a message. It sees its unread messages, oldest first.Show the person
An agent calls
point_atwith clip ids or a time and a few words, like "new intro here". The person sees the cursor under the agent's name. When it is done, the agent callsleave_timeline. It sees its cursor go.Let the person choose
The person compares the branches in the editor. The agent sets the chosen branch with
timeline_historyactionset_defaultordeclare_final, only when the person says so. It sees the branch's URL and a new state token.
The terminal version for one agent:
export INVIDEO_AS=cutterinvideo agent register <project-url> --name cutter --model opusinvideo project show <project-url>invideo agent list <project-url>invideo edit show <edit-url>invideo branch new <edit-url> --name cutter --token <state_token>invideo edit show <branch-url>invideo edit change <branch-url> --timeline T1 --token <state_token> \ --operations @cut.jsoninvideo edit point <branch-url> --at 4 --text "new intro here"invideo agent message <agent-url> --text "Cut ready: <branch-url>"invideo agent inbox <project-url>invideo edit leave <branch-url>Where each value comes from:
<project-url>comes frominvideo project new, or the person gives it.<edit-url>comes frominvideo edit new.<state_token>comes frominvideo edit showon the URL the next command runs on. Forbranch newthat is<edit-url>. Foredit changeit is<branch-url>, read fresh, because the main token is stale on the branch.<branch-url>is thebranch_urlthatbranch newreturns.@cut.jsonnames a file that holds a bare list of operations.<agent-url>is another agent's URL frominvideo agent list.
The MCP calls that differ from a single-agent job, as a list of tool calls, each with its tool name and its arguments. <agent-url> is the sound agent's URL from read on the project's …/agents. <branch-url> is the branch URL that timeline_history returns. <project-url> comes from list_projects, or the person gives it.
[ { "tool": "register", "arguments": { "url": "<project-url>", "name": "cutter", "model": "opus" } }, { "tool": "message", "arguments": { "url": "<agent-url>", "as": "cutter", "text": "Cut is ready on branch cutter: <branch-url>" } }, { "tool": "inbox", "arguments": { "url": "<project-url>", "as": "cutter" } }, { "tool": "point_at", "arguments": { "url": "<branch-url>", "as": "cutter", "ids": ["c7"], "text": "new intro here" } }]Branches do not merge
timeline_history has no merge action. Plan the work so each agent owns a branch, or a timeline of its own. When one agent needs another's change, it reads that branch and repeats the change on its own branch with edit_timeline. Or the agents work one after another on one branch, and hand over with a message.
An agent that generates
An agent can make media for its part, like a sound agent that makes a music bed. It follows the generation pattern on its own branch.
- The agent runs
find_modelswith the job in words, picks one, and reads its inputs withget_model. A good pick iselevenlabs_music_v2_5_instrumental. Your agent can search for others withfind_models. - It calls
generatewithdry_run: trueand the real inputs, and tells you the price. - For a price of 1 credit or more it waits for your yes. Then it calls
generatewithmax_creditsset to that price and anidempotency_key. It gets a thread URL and, when the result lands, a sequence URL. It reads that URL withreadand never callsgenerateagain to check.
invideo gen models <project-url> --query "calm instrumental music bed"invideo gen model <project-url> --model elevenlabs_music_v2_5_instrumentalinvideo gen run <page-url> --model elevenlabs_music_v2_5_instrumental \ --dry-run -i prompt="calm piano bed for a product teaser"invideo gen run <page-url> --model elevenlabs_music_v2_5_instrumental \ -i prompt="calm piano bed for a product teaser" \ --max-credits <price> --idempotency-key sound-bed-1<project-url> is the shared project URL. <page-url> is a page that invideo notebook show <project-url> lists. <price> is the price the dry run returns.
Messages to invideo agents cost credits
A project can hold invideo's own agents, such as Agent Two, beside remote agents like Claude Code. A message to a remote agent is free. A message to an invideo agent runs it on the person's credits, so send one only when the person asks, or to answer a message from it.
Cost and time
Edits and exports are free. Generation and transcripts cost credits. Paid stock costs a small credit charge, or one of your workspace's iStock licenses. Your agent runs a dry run first and tells you the price before it spends anything.
- Free:
register, messages between remote agents,inbox,point_at, branches, edits and exports. - Costs credits: a message to an invideo agent, and any generation, transcript or stock an agent uses.
Setup takes a few minutes per agent. See Credits for prices.
If something goes wrong
Most problems come from shared names and stale tokens.
| Symptom | Fix |
|---|---|
get_model or generate refuses the model as not found | Models retire. Run find_models with the job in words, use the best match, and tell the person which model you used. |
register refuses the name | The name is in use in this project. Pick another. |
| A notice says you acted as a shared name | The call had no as. Pass your name on every call, or set INVIDEO_AS. |
| An edit is refused as a conflict | Another edit landed first. Read with get_timeline and reconsider. Do not resend blindly. |
| CLI exit 3 | The same conflict on the CLI. Run invideo edit show and rebuild. |
timeout or completion_unknown | Retry the identical request with the same token. A conflict then means it landed. |
| No answer in the inbox | The other agent reads its inbox only when it runs. Check inbox again later. |
write on the brief is refused | It changed since your read. Read again, or change one part with edit. |
| Avoid: two agents on one branch at once | Instead: one branch per agent, or take turns. |
| Avoid: one agent mixes MCP and the CLI | Instead: pick one per session. |
Prompts to try
Each prompt is a real variation of this job.
Register as "captions". Wait for a message from "cutter" with a branchURL, then add captions on a branch called captions off that one.Register as "reviewer". Read every branch, capture frames at each scene,and message each agent a list of fixes with timecodes. Do not edit.Set up a brief for a three-agent ad edit: cutter, sound and captions,with each one's job and the order they work in.When to use something else
invideo does not run or schedule the agents. Start them in their own clients, or with an orchestrator such as your CI system or an agent framework. For one agent doing everything, the plain work loop on invideo for AI agents is simpler.