Using InfoEmu with AI agents
InfoEmu is API-first: deploys, previews, promotion, rollback, community posts, docs content, and support tickets are all plain HTTP with scoped tokens. That means an AI agent (Claude Code, or any tool-using model) can operate your web presence — with exactly as much power as the token you hand it.
The safety model
Section titled “The safety model”Follow four rules and agent-driven operations stay boring:
- Scope the token. A deploy token works for one site only. Never give an agent your account password or portal session.
- Preview before production. Every release gets a preview URL
(
r-<release>--yoursite.<domain>). Agents deploy freely; a human looks at the preview. - Promotion is explicit. Nothing goes live until
promoteis called. Tell your agent to ask first. - Rollback is the first response. If production misbehaves,
POST /rollback— then investigate.
The agent brief
Section titled “The agent brief”Paste this into your agent’s instructions (for Claude Code, CLAUDE.md), fill
the placeholders, and export the token as an environment variable:
## InfoEmu deployment
My site is hosted on InfoEmu (instance `<INSTANCE_ID>`, portal`https://portal.infoemu.com`). The deploy token is in `$INFOEMU_DEPLOY_TOKEN` —never print it.
- Deploy built output: POST /api/deploy/<INSTANCE_ID> with multipart field "archive" (tar.gz of the built site), Authorization: Bearer token.- Raw Markdown instead: POST /api/deploy/<INSTANCE_ID>/source (InfoEmu builds it; check logs at GET /api/deploy/<INSTANCE_ID>/builds).- GET /api/deploy/<INSTANCE_ID>/releases lists releases, preview hostnames, and what's live. Always check the preview.- Rules: deploy freely; ALWAYS show me the preview URL before promoting; promote (POST .../promote) only after I approve; if I report a problem, rollback (POST .../rollback) first and investigate second.Endpoint reference for agents
Section titled “Endpoint reference for agents”Deploys (auth: Authorization: Bearer dpl_… deploy token):
| Call | What it does |
|---|---|
POST /api/deploy/{id} |
Upload built site (multipart archive, tar.gz) → new release |
POST /api/deploy/{id}/source |
Upload raw content tar → sandboxed build → new release |
GET /api/deploy/{id}/builds |
Build status + logs (failures never touch the live site) |
GET /api/deploy/{id}/releases |
Releases, preview hostnames, stage + live pointers |
POST /api/deploy/{id}/promote |
{"release": "<id>"} → make it production |
PUT/DELETE /api/deploy/{id}/stage |
Point/clear the stage-- alias |
POST /api/deploy/{id}/rollback |
Revert production to the previous release |
PUT /api/deploy/{id}/github |
Connect a GitHub repo; pushes build automatically |
Community ({your-forum}/api/forum/v1, Authentication-Token header, or
anonymous read when you enable FORUM_API_PUBLIC_READ): list forums/topics,
read threaded posts, create topics and replies. Useful for agents that seed
discussions, post release notes, or watch for unanswered questions.
Content ({your-site}/api/cms/v1, API key Authorization: Bearer blu_sk_…): content types, entries, and — when you configure your own
Anthropic API key — an AI drafting endpoint (/ai-content/generate, off by
default).
Support ({your-site}/api/helpdesk/v1): tickets, replies, categories.
Combine with the email channel (mail to your support address becomes a
ticket) and an agent can summarize the queue or draft responses for a human
to send.
The MCP server
Section titled “The MCP server”If your agent speaks MCP (Claude Code, Claude Desktop), use @infoemu/mcp
instead of raw HTTP: 23 typed tools across deploy, forum, content, and help
desk, with the safety model built in — destructive tools (promote, rollback,
production deploys, GitHub config) require an explicit confirm flag.
claude mcp add infoemu \ -e INFOEMU_DEPLOY_URL=https://portal.infoemu.com \ -e INFOEMU_INSTANCE_ID=<your-site> \ -e INFOEMU_DEPLOY_TOKEN=dpl_... \ -- npx @infoemu/mcpTenant-side groups (forum/content/help desk) activate when you add
INFOEMU_TENANT_URL with INFOEMU_TENANT_TOKEN or INFOEMU_CMS_API_KEY.
Machine-readable entry point
Section titled “Machine-readable entry point”Point agents at infoemu.com/llms.txt — a plain-text map of the platform kept in sync with these docs. For a narrative walkthrough, see the tutorial: Your AI agent can run your web presence.