AI agents
Pargar was designed with AI agents as users from the start, not as a plugin added later. The idea is simple: if every operation is already a typed command, an agent needs no special access. It calls the same commands a person triggers from the toolbar.
Every operation is a command
Section titled “Every operation is a command”The kernel exposes one entry point that takes a JSON command and returns a JSON result. A command carries the actor that issued it, human or agent, and the resulting events land in the same hash-chained log. Agent edits undo like any other edit, and the log shows who did what.
MCP tools
Section titled “MCP tools”packages/mcp runs a Model Context Protocol server. Its tool-definitions.ts is the canonical list of 90+ tools, grouped by category:
| Category | Examples |
|---|---|
| draw | draw_line, draw_circle, draw_polyline, draw_hatch, draw_dimension |
| edit | move, copy, rotate, trim, offset, fillet, array |
| query / measure | find entities, read properties, measure distances and areas |
| layer, style, block | layers, text and dimension styles, blocks and groups |
| constraint | horizontal, parallel, coincident, distance and more |
| view, UCS | named views and coordinate systems |
Each tool has a name, a description, typed parameters and a mapping to a kernel command. Any MCP-capable client can use them.
The in-app agent loop
Section titled “The in-app agent loop”The app has an agent panel that runs the tool-calling loop in the browser, next to the kernel, so tool calls don’t round-trip through a server. It builds context from the current drawing, sends the request with the tool schemas, executes the returned tool calls against the kernel and shows each step. In development it can talk to a model running on your own machine.
Why this order
Section titled “Why this order”AI sits on top of the 2D product, not in place of it. The roadmap ships solid 2D drafting first; because the tool layer already exists, the AI phase after launch is mostly UX: a chat bar, multi-step flows, and an action log you can replay.
Pargar is open source · Code Apache-2.0 · Docs CC BY 4.0 · GitHub