Skip to content

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.

Follow four rules and agent-driven operations stay boring:

  1. Scope the token. A deploy token works for one site only. Never give an agent your account password or portal session.
  2. Preview before production. Every release gets a preview URL (r-<release>--yoursite.<domain>). Agents deploy freely; a human looks at the preview. Preview and stage URLs are basic-auth protected (username preview; password in the aliases.auth field of the releases response) — production is not.
  3. Promotion is explicit. Nothing goes live until promote is called. Tell your agent to ask first.
  4. Rollback is the first response. If production misbehaves, POST /rollback — then investigate.

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. Preview/stage URLs need HTTP
basic auth: username "preview", password in that response's aliases.auth
(include both when you give me the URL).
- 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.

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, preview basic-auth creds (aliases.auth)
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.

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.

Terminal window
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/mcp

Tenant-side groups (forum/content/help desk) activate when you add INFOEMU_TENANT_URL with INFOEMU_TENANT_TOKEN or INFOEMU_CMS_API_KEY.

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.