Skip to main content
Glama
README.md
<p align="center">
  <a href="https://jsxcultivator.github.io/agentic-design/"><img src="docs/brand/banner.png" alt="Agentic Design: design tools for AI agents" width="100%"></a>
</p>

<p align="center">
  <a href="https://jsxcultivator.github.io/agentic-design/"><b>Live demo</b></a> ·
  <a href="docs/mcp.md">MCP tools</a> ·
  <a href="docs/api.md">REST API</a> ·
  <a href="skills/README.md">Agent skills</a> ·
  <a href="docs/architecture.md">Architecture</a>
</p>

<p align="center">
  <a href="https://github.com/jsxcultivator/agentic-design/actions/workflows/ci.yml"><img src="https://github.com/jsxcultivator/agentic-design/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
  <img src="https://img.shields.io/badge/license-MIT-000000" alt="MIT License">
</p>

# <img src="docs/brand/logo.svg" width="28" height="28" alt="" align="top"> Agentic Design

Design tools for AI agents. The code and environment variables use the short name ADI (Agentic Design Infrastructure). An agent describes what it wants, ADI composes a real, editable design, renders it, and hands back the image. The agent can then inspect it, change single elements, and export production files.

ADI is not an image generator wrapper. Graphics are vector documents (artboards, layers, text, shapes, gradients, masks, images). Interfaces are typed blocks that render as real React and Tailwind components, and the exported code is the same code the screenshots were taken from.

| Exhibition poster | Coffee bag label | Festival line-up | Seed packet |
|---|---|---|---|
| ![Exhibition poster](site/assets/exhibition-poster.webp) | ![Coffee bag label](site/assets/coffee-bag.webp) | ![Festival line-up](site/assets/festival-lineup.webp) | ![Seed packet](site/assets/seed-packet.webp) |

| Product shot, built from three label renders | Ticket dashboard | App, six screens |
|---|---|---|
| ![Product shot](site/assets/coffee-shelf.webp) | ![Ticket dashboard](site/assets/box-office.webp) | ![Coffee app](site/assets/coffee-app.webp) |

An agent made all of these through tool calls: it studied references, opened a blank artboard, placed every element, then inspected the result. The [demo site](https://jsxcultivator.github.io/agentic-design/) shows each piece with the exact calls behind it, and [`scripts/demos.ts`](scripts/demos.ts) is the source. `pnpm demo` runs a shorter agent session over the MCP server (see [examples/](examples/README.md)). The banner and logo above were drawn by the graphics engine too (`pnpm build:brand`).

## Design Studio

A web dashboard for people: projects, a visual editor for graphics (select, move, resize, edit text, layers, undo and redo), a block and theme editor for interfaces, assets, live task history, API keys, provider settings and agent connection snippets.

| Graphic editor | UI editor |
|---|---|
| ![Graphic editor](docs/screenshots/studio-graphic-editor.png) | ![UI editor](docs/screenshots/studio-ui-editor.png) |

## What an agent can do

```jsonc
// MCP tool call, or POST /v1/tools/create_graphic
{
  "type": "instagram_post",
  "description": "A premium promotional graphic for a technology brand",
  "dimensions": { "width": 1080, "height": 1350 },
  "style": "modern, bold, editorial"
}
```

The result contains a `design_id`, the layer outline with element ids, the available export formats, and the rendered PNG as image content. Typical loop:

1. **Create** with one call (`create_graphic`, `create_landing_page`, `create_mobile_app_design`, ...).
2. **Look** at the returned image, then call `inspect_design` for a machine-readable report: overflow, contrast, overlap, alignment, small text, responsive problems, each with an element id and a ready-to-apply fix.
3. **Edit** only what needs changing with `edit_graphic` or `edit_ui_component`. Every edit is a new version, with undo and redo.
4. **Export** with `export_design`.

## Tools (41)

**Graphic design:** `create_graphic`, `create_social_media_design`, `create_advertisement`, `create_poster`, `create_banner`, `create_presentation_slide`, `create_logo`, `create_illustration`, `edit_graphic`, `resize_design`, `remove_image_background`, `inspect_graphic`, `generate_design_variations`

**UI/UX design:** `create_ui_design`, `create_landing_page`, `create_website_design`, `create_dashboard_design`, `create_mobile_app_design`, `create_ui_component`, `edit_ui_component`, `create_design_system`, `generate_design_tokens`, `generate_component_variations`, `inspect_ui_design`

**General:** `get_design`, `list_designs`, `update_design`, `duplicate_design`, `delete_design`, `create_artboard`, `render_design`, `take_design_screenshot`, `inspect_design`, `export_design`, `import_asset`, `search_assets`, `get_task_status`, `cancel_task`, `analyze_design_reference`, `generate_color_palette`, `get_design_capabilities`

One registry defines every tool. MCP, the REST API and the dashboard catalog are all generated from it. Full parameter reference: [docs/mcp.md](docs/mcp.md).

## Quick start

Requirements: Node 20.11 or newer, pnpm 10, and Chrome or Chromium for UI screenshots (graphics render without a browser).

```bash
pnpm install

pnpm start:api     # REST API + MCP over HTTP on http://localhost:8787
                   # prints an admin API key once, also saved to .adi-data/admin-key.txt
pnpm dev:web       # Design Studio on http://localhost:3000
pnpm demo          # agent workflow over MCP, writes examples/output/
```

No database or cloud account is needed for local use: ADI falls back to an embedded Postgres (PGlite) and local file storage. Set `DATABASE_URL`, `S3_BUCKET` and `REDIS_URL` to use real services, or run the whole stack with `docker compose up --build`.

More: [installation](docs/installation.md), [configuration](docs/configuration.md), [deployment](docs/deployment.md).

## Connect an agent

### Hermes

Add to `config.yaml` (local mode, the engine runs inside the MCP process and needs no API key):

```yaml
mcp_servers:
  adi:
    command: node
    args: ["/absolute/path/to/agentic-design/apps/mcp-server/bin/adi-mcp.mjs"]
    env:
      ADI_DATA_DIR: "/absolute/path/to/adi-data"
    timeout: 180          # UI renders and multi-screen apps can take a while
    connect_timeout: 60
```

The handshake answers within a few seconds. The first tool call on a new data directory also waits for the embedded database to initialise, which took about 20 seconds on the 2-core machine this was developed on.

Or point it at a running ADI API:

```yaml
mcp_servers:
  adi:
    url: "http://localhost:8787/mcp"
    headers:
      Authorization: "Bearer adi_your_key"
```

### Claude Code

```bash
claude mcp add adi -- node /absolute/path/to/agentic-design/apps/mcp-server/bin/adi-mcp.mjs
# or remote
claude mcp add --transport http adi http://localhost:8787/mcp --header "Authorization: Bearer adi_your_key"
```

### Cursor, Windsurf and other `mcp.json` clients

```json
{ "mcpServers": { "adi": { "command": "node", "args": ["/absolute/path/to/agentic-design/apps/mcp-server/bin/adi-mcp.mjs"] } } }
```

### Agents without MCP (OpenAI function calling, Qwen, anything that can do HTTP)

`GET /v1/tools` returns a JSON Schema for every tool, which maps directly to function definitions. Call them with `POST /v1/tools/{name}`.

```bash
curl -X POST http://localhost:8787/v1/tools/create_landing_page \
  -H "Authorization: Bearer $ADI_API_KEY" -H "Content-Type: application/json" \
  -d '{"description":"A premium SaaS landing page for an AI analytics product","style":"minimal, editorial, sophisticated"}'
```

### Give the agent references

Designs come out generic when the agent has not looked at anything first. Two free reference servers pair with this engine: [Inspo](https://inspomcp.dev/mcp) for interfaces and [Made Good Designs](https://madegooddesigns.com/design-mcp-server/) for graphics. [docs/inspiration.md](docs/inspiration.md) has the setup and shows how what the agent finds maps onto tool parameters, and the bundled skills tell the agent to study references before it creates.

```bash
claude mcp add --transport http inspo https://inspomcp.dev/api/mcp
claude mcp add --transport http mgd https://madegooddesigns.com/inspiration/mcp
```

Details and more clients: [docs/mcp.md](docs/mcp.md), [docs/api.md](docs/api.md). Agent skills that teach an agent how to design well with these tools are in [skills/](skills/README.md).

## Architecture

```
 agents ──► MCP (stdio) ─┐
 agents ──► MCP (HTTP) ──┼──► tool registry ──► design engine ──► graphics engine ─► resvg ──► PNG/JPEG/WebP/SVG/PDF
 agents ──► REST ────────┤    (validation,      (documents,       ui engine ───────► Chrome ─► screenshots, PDF
 Design Studio ──────────┘     tasks, usage)     versions)        design system      React + Tailwind export
                                                     │
                                       Postgres or PGlite · S3 or local files · Redis (optional)
```

```
apps/
  api/            REST API, MCP over Streamable HTTP, SSE task events, API keys
  mcp-server/     MCP server (stdio; local engine or proxy to a hosted API)
  web/            Design Studio: projects, visual editor, assets, tasks, keys, providers
packages/
  shared/         document model types, colour maths, errors
  design-system/  curated themes, palettes, type pairings, tokens (DTCG, CSS, Tailwind)
  graphics-engine/ text layout with bundled fonts, layout recipes, logos, procedural art, element ops, SVG
  ui-engine/      React + Tailwind blocks, composition, block ops, HTML render, React project export
  renderer/       resvg rasteriser, sandboxed Chrome screenshots, design inspection
  export-engine/  PNG, JPEG, WebP, SVG, PDF, React, HTML, tokens, Figma import bundle
  asset-manager/  storage drivers, upload validation, SVG sanitising, safe remote fetch, background removal
  design-engine/  persistence, providers, task queue, the tool registry
skills/           agent skills (Hermes format, usable by other agents)
site/            static demo site (GitHub Pages), built by scripts/build-site.ts
docs/  examples/  tests/
```

Design decisions and their reasons: [docs/architecture.md](docs/architecture.md).

## Export formats

| Graphics | UI |
|---|---|
| `png`, `jpeg`, `webp`, `svg` (outlined or live text), `pdf`, `json`, `figma` | `react` (Vite + Tailwind v4 project), `html`, `tailwind`, `tokens`, `json`, `png`, `jpeg`, `pdf`, `figma` |

There is no direct Figma file creation. The `figma` format is an import bundle (SVG frames with named layers, or HTML for the html.to.design plugin, plus design tokens). See [docs/exports.md](docs/exports.md).

## AI providers (optional)

The native engine needs no model: it writes copy from a built-in bank and draws vector art procedurally. When a provider is configured it is used for copywriting, describing reference images and generating imagery.

- Text: OpenAI, Anthropic, Google Gemini, Ollama, any OpenAI-compatible endpoint
- Images: OpenAI, Google Gemini, any OpenAI-compatible endpoint

Configure with environment variables or in the dashboard. Keys are encrypted at rest and never sent to the browser. The adapters are unit-tested against mocked HTTP responses and have not been run against live vendor APIs in this repository. See [docs/providers.md](docs/providers.md).

## Testing

```bash
pnpm typecheck
pnpm lint
pnpm test        # unit and API tests
pnpm test:e2e    # agent workflows over MCP, with a real Chrome for UI
```

The end-to-end suite covers the four reference workflows: (A) Instagram graphic, render, PNG export; (B) SaaS landing page, React export, desktop and mobile screenshots; (C) typography and background edits, export of the new version; (D) ten-screen banking app on a shared design system.

## Security model in short

API keys are stored as SHA-256 hashes and scoped to a project. Requests are rate limited. Uploads are identified by content, size limited, and SVGs are sanitised. Remote imports refuse private addresses. UI is rendered in Chrome with JavaScript disabled and network blocked. Agents never send executable code: custom components are a declarative tree checked against an allow-list. File links are signed and expire. See [docs/architecture.md](docs/architecture.md) and [docs/limitations.md](docs/limitations.md).

## Documentation

[Architecture](docs/architecture.md) · [Installation](docs/installation.md) · [Configuration](docs/configuration.md) · [MCP](docs/mcp.md) · [REST API](docs/api.md) · [Providers](docs/providers.md) · [Exports](docs/exports.md) · [Skills](docs/skills.md) · [Inspiration](docs/inspiration.md) · [Development](docs/development.md) · [Deployment](docs/deployment.md) · [Limitations](docs/limitations.md)

## License

MIT. Bundled fonts are under the SIL Open Font License, icons are from Lucide (ISC).