# Cogram Studio

> A hosted CAD/BIM workstation for AI agents. Create and modify parametric
> building models with real FreeCAD tools over MCP, upload and export
> IFC/STEP/DXF/STL/OBJ, and hand your human a live browser view plus a claim
> link. One unauthenticated POST provisions an ephemeral session; no account,
> OAuth, or card required.

Start with the skill file. It is the whole contract: provisioning, MCP setup,
upload, export, and handoff in one fetch.

- [Agent skill](https://studio.cogram.com/skill.md): setup + full usage contract (markdown)

## Skills

Studio's own agent operating knowledge, written from real failures. Read
before a non-trivial build; also available over MCP as `list_skills` and
`read_skill`.

- [core-principles](https://studio.cogram.com/skills/core-principles.md): How Studio expects an agent to work: verify with geometry rather than assumption, commit in phases, and recover from failed scripts. Read this first if you are new to Studio.
- [architecture](https://studio.cogram.com/skills/architecture.md): Building and architectural design using native FreeCAD hierarchy, wall geometry rules, room layout, storeys, and openings.
  - [architecture-guide](https://studio.cogram.com/skills/architecture/architecture-guide.md)
  - [known-issues](https://studio.cogram.com/skills/architecture/known-issues.md)
- [build-patterns](https://studio.cogram.com/skills/build-patterns.md): Script patterns, stage decomposition, and plan scaffolds for complex multi-step builds. Activates for vehicles, machines, furniture, or any task requiring multiple build stages.
  - [build-pattern-guide](https://studio.cogram.com/skills/build-patterns/build-pattern-guide.md)
- [drawings](https://studio.cogram.com/skills/drawings.md): Create, inspect, edit, and verify Studio Views, Sheets, Tables, and annotations with the first-class application tools.
  - [mechanical-features](https://studio.cogram.com/skills/drawings/mechanical-features.md)
- [freecad-capabilities](https://studio.cogram.com/skills/freecad-capabilities.md): Native FreeCAD module selection for Part, BIM, Sketcher, Assembly, FEM, TechDraw, Mesh, Spreadsheet, and Surface work in the isolated worker.
  - [freecad-capabilities-guide](https://studio.cogram.com/skills/freecad-capabilities/freecad-capabilities-guide.md)
- [parametrics](https://studio.cogram.com/skills/parametrics.md): Parametric and adjustable models using VarSet, spreadsheets, and expressions. Activates when the user wants configurable, adjustable, parametric, or variable-driven geometry.
  - [object-data](https://studio.cogram.com/skills/parametrics/object-data.md)
  - [parametrics-guide](https://studio.cogram.com/skills/parametrics/parametrics-guide.md)
- [verification](https://studio.cogram.com/skills/verification.md): Verification scripts and FreeCAD measurement APIs for checking geometry — dimensions, validity, connections, hollowness, intersections. Activates when writing verification scripts or checking build results.
  - [verification-api](https://studio.cogram.com/skills/verification/verification-api.md)
  - [verification-examples](https://studio.cogram.com/skills/verification/verification-examples.md)

## Endpoints

- Provision a session: `POST https://studio.cogram.com/agent/sessions` with `{"email": "<your user's email>"}`
- MCP: `https://studio.cogram.com/mcp` — streamable HTTP; authenticate with the `mcp.authorization` header value from provisioning
- Model upload and export run over HTTP with the same bearer token; the exact URLs arrive in the provisioning response

## Tools

The MCP tool list is self-describing. Highlights: `run_script` and
`query_script` (Python against the real FreeCAD kernel), `describe_model`,
`read_docs`/`search_docs` (11k-entry FreeCAD API index), plus first-class
Views, Sheets, annotations, and Schedules.

## Before your first call

- Ask your user for their email if you do not know it; Studio uses it once,
  for the claim link.
- Sessions are ephemeral and capacity is limited. The window is idle-based:
  work keeps it open, and a hard ceiling still ends an abandoned one. A 503 on
  provisioning means every concurrent agent session is taken, which is a
  separate limit from model-worker capacity; back off and retry.
- Show the `watch_url` to your user right away and the `claim_url` when you
  finish. Unclaimed sessions and their files are deleted at expiry.
- Budgets arrive in the provisioning `limits`: new sessions per address per
  day, one project per session, script calls per session, MCP requests per
  minute. Over a budget the call fails with `AGENT_SESSION_LIMIT_REACHED`.
- An `agt_` Authorization value is temporary and must not be retained as a
  persistent account connector. Claiming or expiry invalidates it; continuing
  afterward requires a fresh OAuth connection without that static header.
