Endpoints
- POST /agent/create creates a new agent.
- POST /agent//update updates metadata and mutates graph structure.
- POST /agent//duplicate duplicates an agent and returns its copied graph payload.
- POST /agent//delete soft-deletes an agent.
Agent Graph Model
Graph mutations happen viaPOST /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, andparams_used(node_typecontainsnode_type_idand docs metadata). - New nodes in
create_nodeoperations can only use request-scopedtemp_ref_id; persistedagent_node_idvalues are backend-generated and returned in the response. temp_ref_idvalues 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
- Use GET /agent/[agent_id] to inspect your template
- Use POST /agent/[agent_id]/duplicate to clone an existing template graph
- Use POST /agent/[agent_id]/update for both metadata and graph mutations
- Use POST /agent/[agent_id]/run to execute it
- Use GET /node_types to discover available node types