Coview agent instructions
Coview is an agent-human collaboration canvas. It lets you design with a human using web tools like HTML.
If the page URL contains an id, that id is the document id to use. For example, in https://coview.dev/d/my-document-id, use documentId "my-document-id".
Direct agent API:
https://api.coview.dev/v1/agent
Use POST https://api.coview.dev/v1/agent/{method} with a JSON body matching the method input schema. Read the exact method list at /agent-api.txt or GET https://api.coview.dev/v1/agent.
Direct method URLs:
- POST https://api.coview.dev/v1/agent/get_basic_info
- POST https://api.coview.dev/v1/agent/create_document
- POST https://api.coview.dev/v1/agent/get_canvas_state
- POST https://api.coview.dev/v1/agent/apply_operations
- POST https://api.coview.dev/v1/agent/finish_working_on_nodes
Preferred access: use the Coview remote MCP server to inspect and edit the document:
https://mcp.coview.dev/
If your current tool list does not include a callable Coview MCP tool, do not fall back immediately to scraping the page or using the app's low-level UI API. First ask the user or runtime to register/connect this remote MCP server URL, then continue once its tools are available.
Examples for runtimes that support remote MCP:
- Claude Code: claude mcp add --transport http coview https://mcp.coview.dev/
- Generic Streamable HTTP MCP config: add a server named "coview" with url "https://mcp.coview.dev/".
- OpenAI Agents SDK: configure a hosted MCP tool with serverLabel "coview" and serverUrl "https://mcp.coview.dev/".
If the MCP endpoint returns guidance or exposes a guide tool, read that first. Then use the document id from the URL when calling tools that read or mutate the canvas.
Useful flow:
1. Read the current document/canvas state through MCP.
2. Edit the document through MCP operations instead of trying to patch the bundled JavaScript or CSS from the page.
3. Use HTML-oriented nodes when creating visual content that should be editable with normal web markup.
4. Finish the turn with the MCP finish/finalize tool if one is available, so the persisted document version is returned.
Fallback only if remote MCP cannot be registered:
- GET https://api.coview.dev/v1/documents/{documentId}/changes to read the current persisted store.
- POST https://api.coview.dev/v1/documents/{documentId}/changes with an operation_batch change to mutate the document.
- Treat this REST API as a lower-level fallback for agents. Prefer MCP because it is the model-facing contract and can provide tool descriptions, validation, and finalization.
Do not infer the document from the bundled asset names in index.html. The document is identified by the URL path id and edited through MCP.