Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: edgematic-studio-api description: Use when developing against the Edgematic Studio HTTP API — creating or managing projects, applying pipeline graph descriptors, triggering builds or deployments, starting and stopping runs, invoking agentic tools via /agent/invoke or /agent/chat WebSocket, querying devices or models, configuring LLM settings, or writing Playwright integration tests in the tests/ directory. Do not use for Neat Library C++/Python application development, device-side model compilation, or web-ui React component work.
Edgematic Studio API
Overview
Edgematic Studio is a REST + WebSocket server (Rust/Axum backend) that manages AI vision pipeline projects for SiMa.ai edge devices. Clients create projects, compose pipeline graphs, build and deploy to devices, and invoke an agentic coding assistant.
Default local base URL: http://localhost:8080. Set STUDIO_BASE_URL to override.
Workflow
- Verify the server is reachable.
GET /api-doc/openapi.jsonshould return 200 and parse as JSON. Do NOT probe
/openapi.json — it is not a route, and the SPA fallback answers it with index.html and a 200, so the check passes on a page of HTML.
- Understand the endpoint contract before writing code.
- Read
references/api-surface-map.mdfor the full endpoint list with request/response shapes. - For graph operations, read
references/graph-model.md. - For the agentic API (invoke/chat/history), read
references/agent-api.md.
- Choose the right resource for the task.
- New AI vision pipeline → create project, apply graph, build, deploy to device.
- Interact with the AI assistant → use
/agent/invoke(stateless tool call) or/agent/chat(WebSocket stream). - Manage edge devices → use
/devicesendpoints. - Download pre-built applications → use
/applicationsendpoints. - Browse the SiMa Model Zoo catalog → use
GET /modelzoo/models(server fetches it via sima-cli's Developer-Portal sign-in).
- Before claiming success on integration tests, run the Playwright suite.
pnpm test:integrationfrom thetests/directory.- All tests must pass with zero failures against a live server.
Defaults
- All JSON endpoints use
Content-Type: application/json. - File content endpoints (
/projects/:id/files/content) useContent-Type: text/plain. - Project IDs are UUIDs (v4).
- The
ir_versionfield in graph payloads is always"v1". - Builds are async — poll
GET /projects/:id/builduntilbuild.statusis"ok"or
"failed". "pending" and "building" are BOTH non-terminal; treating != "pending" as done deploys mid-build and fails with project_not_built.
- Deployments require a device registered first via
POST /devices. - Error envelopes have the shape
{"error": {"code": "snake_case_code", "message": "human-readable"}}.
Key Patterns
Create a project and apply a graph
POST /projects{"name": "my_pipeline", "type": "PYTHON"}# `type` is REQUIRED ("PYTHON" | "CPP"); the body is deny_unknown_fields,# so any extra key (there is no `description`) is a 400.POST /projects/{id}/graph/apply{"ir_version": "v1", "nodes": [...], "edges": [...]}
Build and deploy
POST /projects/{id}/build{}# Poll until build.status is "ok" or "failed"GET /projects/{id}/buildPOST /projects/{id}/deploy{"device_id": "<device-uuid>"}
Invoke an agentic tool
# Discover available toolsGET /agent/tools# Invoke a toolPOST /agent/invoke{"name": "tool_name", "params": {"key": "value"}}# OpenAI-compatible catalog (for external LLM tool-use)GET /agent/tools/catalog.json
Configure LLM backend
GET /settings/llm/providers -- list supported providers and their modelsGET /settings/llm -- get current configPUT /settings/llm{"provider": "anthropic", "model": "claude-sonnet-4-6","auth_mode": "api_key", "api_key": "sk-..."}
API Selection
- `/projects/:id/graph/apply` — replace the project's entire graph.
- `/projects/:id/graph/diff` — preview graph changes before applying (dry run).
- `/reverse/python` or `/reverse/cpp` — parse existing source code back into a graph descriptor.
- `/agent/invoke` — single synchronous tool invocation; returns JSON immediately.
- `/agent/chat[?project_id=<uuid>]` — WebSocket; streams a live turn (
token/tool_call/tool_result/clarification_request/code_preview/done/error). Bind withproject_idto persist + replay.code_previewfires only under a tool-emitting provider, notclaude-code. - `/projects/:id/agent/transcript` — persisted conversation as ordered turns (replay/seed counterpart of the WS).
- `/projects/:id/agent/history` — paginated conversation history per project.
Boundaries
- Do not edit
backend/(Rust) orweb-ui/(React) source. Onlytests/andplaybooks/are in scope for QA work. - Do not hardcode
localhost:8080— useprocess.env.STUDIO_BASE_URL ?? 'http://localhost:8080'. - Do not commit integration tests without running the full suite against a live server.
- Do not guess endpoint behavior — use the
describe_endpointtool (it reads the in-process
OpenAPI document; no HTTP call needed), or verify against /api-doc/openapi.json.
References
references/api-surface-map.mdreferences/graph-model.mdreferences/agent-api.md