Install docs

Install Mirai as a plugin.

Install the Mirai plugin/profile for Codex, Claude Code/CLI, or Hermes. Mirai still uses MCP under the hood, but users do not need to install the MCP package manually.

Codex plugin
codex plugin marketplace add zakyirsyaad/mirai-ai --ref main --sparse .agents --sparse plugins/mirai-codex
codex plugin add mirai-codex@mirai-ai
Claude Code/CLI plugin
claude plugin marketplace add zakyirsyaad/mirai-ai --sparse .claude-plugin plugins/mirai-claude
claude plugin install mirai-claude@mirai-ai
Hermes plugin profile
hermes plugins install zakyirsyaad/mirai-ai --enable
hermes mcp add mirai --command npx --env MIRAI_API_URL=http://mirai.43-129-56-85.sslip.io --args -y @mirai-agent/mcp@latest mcp
Capabilities

What Mirai can do.

Mirai is a hosted CROO Provider for licensed X content work. The plugin gives buyers a local command surface while the VPS runtime handles OAuth, scheduling, content generation, posting, and proof.

License and entitlement

  • Activate a signed CROO-delivered Mirai license.
  • Check service, scopes, expiry, and posting limits before sensitive actions.
  • Run hosted entitlement checks for start, resume, post, report, and delivery.

X account connection

  • Connect the buyer's own X account through hosted OAuth.
  • Encrypt X OAuth tokens at rest inside the hosted runtime.
  • Use real X posting in production and mock X only for local smoke tests.

Autonomous campaigns

  • Create a 7-day, 14-post campaign from a short campaign brief.
  • Plan scheduled post slots and stop automatically at license expiry.
  • Pause, resume, inspect status, and retrieve campaign proof from the plugin.

Content intelligence

  • Extract or accept a voice profile for consistent tone.
  • Ground drafts with owned X reads, trends, and campaign history.
  • Generate five OpenModel draft variants and pick a winner through draft tournament ranking.

Policy and safety

  • Restrict allowed topics, blocked topics, blocked phrases, language, and tone rules.
  • Reject URLs, near-duplicates, unsafe phrases, and approval-only subjects before posting.
  • Keep user-supplied queue edits locked after a slot claims the item.

Proof and reports

  • Record tweet URLs, timestamps, metrics, draft tournament metadata, and learning summaries.
  • Deliver CAP/CROO proof with upstream order data and downstream A2A summaries.
  • Expose reports through `mirai_get_report` and hosted API endpoints.
Command surface

Plugin commands map to hosted tools.

Buyers can operate Mirai from Codex, Claude Code/CLI, or Hermes. The same hosted API enforces licenses, expiry, X connection, and campaign state behind each command.

/mirai statusCheck hosted health, license state, X connection, and campaign state.
/mirai setup <license>Run the guided first-time setup flow.
/mirai activate <license>Store and verify the signed CROO license.
/mirai connect-xStart hosted X OAuth for the buyer account.
/mirai create <brief>Create an autonomous or user-supplied campaign.
/mirai policySet content restrictions before autopost approval.
/mirai startStart autopost after explicit approval.
/mirai pausePause scheduled posting without deleting the campaign.
/mirai resumeResume an active, unexpired campaign.
/mirai reportFetch proof-of-work, post URLs, metrics, and CAP/A2A evidence.
/mirai ideasGenerate read-only voice and content ideas without posting.
Guided setup

The client calls tools. Mirai owns the runtime.

Most users start with `/mirai setup <license>`. The plugin walks through activation, X OAuth, campaign brief, content policy, and the final approval gate.

Autopost campaign flow
mirai_activate_license01
mirai_connect_x02
mirai_create_campaign03
mirai_set_voice_profile04
mirai_set_content_policy05
mirai_list_content_items06
mirai_update_content_item07
mirai_start_autopost08
mirai_get_campaign09
mirai_get_report10

`mirai_set_content_policy` controls allowed topics, blocked topics, blocked phrases, language, tone rules, format rules, and approval-only subjects before any draft can be posted.

Hosted API

Advanced clients can call the hosted API through the MCP runtime.

Normal buyers use plugin commands, but the hosted API is intentionally narrow and auditable. License-protected endpoints require a Bearer Mirai license and never expose private provider keys.

GET /healthHosted API health and database connectivity.
POST /mcp/activateLicense activation and hosted entitlement bootstrap.
POST /oauth/x/startHosted X OAuth start.
POST /mcp/campaignCreate or inspect campaign state.
GET /mcp/contentList queued user-supplied content.
PATCH /mcp/content/:idRevise pending queued content.
DELETE /mcp/content/:idRemove pending queued content.
POST /mcp/startStart autopost after approval.
POST /mcp/pausePause autopost.
POST /mcp/resumeResume autopost.
POST /mcp/reportRetrieve campaign proof and metrics.
POST /entitlements/checkValidate hosted action authorization.
Content queue

Revise user-supplied content before Mirai uses it.

In user-supplied mode, buyers can inspect queued content, revise pending items, or remove them before a scheduled slot claims the item. Once an item has been used by the posting pipeline, it is locked so the campaign report stays consistent.

Queue commands
/mirai content list
/mirai content edit <id> <revised text>
/mirai content delete <id>
`PENDING` items can be edited or deleted.
`USED` items are locked after Mirai claims them for a post slot.
Hosted API mirrors the commands with `GET /mcp/content`, `PATCH /mcp/content/:id`, and `DELETE /mcp/content/:id`.
FYP-inspired ranking

Mirai adapts the public X algorithm shape for autonomous content.

The recommendation layer is inspired by the open-source xai-org/x-algorithm repository. Mirai does not run X's production ranking system; it uses the same retrieval, ranking, filtering, and selection pattern for a transparent CROO content agent.

ACQUIRE gathers owned X signals from timeline, own tweets, and trends.
The recommendation engine ranks signals by freshness, topical match, engagement quality, and campaign history.
COMPOSE generates five variants, then the draft tournament selects the safest and strongest candidate.
RECORD stores engagement metrics so future slots can prefer angles that already performed well.
Troubleshooting