Local AI development
Connect a local AI coding agent to a running d6e instance and develop/test Plugins and workspace assets — no special deploy step until you are ready to ship.
The core idea: everything the hosted AI agent can do is available as a public HTTP API / MCP. Your laptop gets the same ~96 d6e_* tools the built-in chat uses.
flowchart LR agent["Local AI agent<br/>Cursor / Claude Code / Codex"] inst["d6e instance<br/>MCP :8081/mcp → Rust /api/v1/* → PostgreSQL"] agent -->|"MCP"| inst agent -->|"REST"| inst
Text version (ASCII)
┌────────────────────┐ ┌────────────────────────────────────┐│ Local AI agent │ MCP │ d6e instance ││ (Cursor / Claude │───────▶│ MCP :8081/mcp → Rust /api/v1/* ││ Code / Codex) │ REST │ → PostgreSQL │└────────────────────┘───────▶└────────────────────────────────────┘This page is a summary. Full steps, differences, and troubleshooting live in the source guide:
Canonical: local-ai-development.md
0. Install Agent Skills (recommended)
Section titled “0. Install Agent Skills (recommended)”Before asking an agent to design, answer questions, or implement Plugins / Docker STFs / custom frontends, install the skills. When unsure, install everything.
npx skills add d6e-ai/d6e-plugin-skills --skill '*' -ynpx skills add d6e-ai/d6e-docker-stf-skills --skill '*' -ynpx skills add d6e-ai/d6e-custom-frontend-skills --skill '*' -ySee Installing Agent Skills for details.
1. Issue an API key (~1 minute)
Section titled “1. Issue an API key (~1 minute)”- Log into the console (
${D6E_BASE_URL}) - Avatar → API keys (
/{locale}/user/api-keys) - Create a key and copy the
d6e_…value (shown once)
Smoke test:
curl -s ${D6E_BASE_URL}/api/v1/workspaces \ -H "Authorization: Bearer ${D6E_API_KEY}"API keys are tied to your user account and inherit workspace membership. Add X-Workspace-ID for workspace-scoped endpoints.
2. Connect MCP (recommended)
Section titled “2. Connect MCP (recommended)”The instance exposes MCP over HTTP (default port 8081, path /mcp).
Cursor — .cursor/mcp.json:
{ "mcpServers": { "d6e": { "url": "http://<instance-host>:8081/mcp", "headers": { "Authorization": "Bearer d6e_YOUR_API_KEY" } } }}After connecting, you can ask the agent to:
- “List tables in the current workspace”
- “Run this SQL and summarize the result”
- “Instant-run this STF”
See MCP tools for the full catalog.
3. What to test where
Section titled “3. What to test where”| What you want to test | Where it runs | How |
|---|---|---|
| Workspace SQL | Remote (real DB) | POST .../sql or d6e_sql |
| JS STF | Remote (QuickJS) | POST .../stfs/instant-run or d6e_instant_run_stf |
| Docker STF logic | Local docker run |
stdin/stdout JSON; point api_url at the live instance for integration |
| SaaS calls | Remote | POST .../saas-proxy or d6e_call_external_api |
| Workflows | Remote | POST .../workflows/{id}/execute or d6e_execute_workflow |
4. Plugin vs frontend scope
Section titled “4. Plugin vs frontend scope”- This guide: developing and testing workspace contents (Plugins)
- Custom frontend: an independent web app — see Custom frontend and frontend-and-instance.md