Skip to content
Dashboard
API Reference

Creating Agents ​

Create, update, duplicate, and delete agent templates through the API.

You can now create and maintain agents directly from the public API.

Endpoints ​

Generation Agents ​

For AI Avatar, Video Generation, Audio Generation, and Image Generation, create a metadata-only agent with POST /agent/create, then add the generation node with POST /agent/{agent_id}/update.

Generation-only agents do not need Video Input nodes. Run them with POST /agent/{agent_id}/run and no video inputs.

See Run Agent for generation-only run examples.

Agent Graph Model ​

Graph mutations happen via POST /agent/{agent_id}/update using ordered operations with create/update/delete node/connection steps.

In this contract:

  • Node params are validated server-side using tile metadata and node schemas.
  • Position is backend-managed (auto-layout), not client-managed.
  • Agent node responses are represented as agent_node_id, node_type, and params_used (node_type contains node_type_id and docs metadata).
  • New nodes in create_node operations can only use request-scoped temp_ref_id; persisted agent_node_id values are backend-generated and returned in the response.
  • temp_ref_id values are never persisted and only work within the single update request where they are created.

Optional Dashboard Flow ​

You can still create agents in edit.mosaic.so and use the API to run them.

Next Steps ​