/mirra:aifrom mirra
Use Mirra API to access multi-provider AI services (chat, decisions, streaming, agents, computer use, transcription). Supports Anthropic and OpenAI models via REST.
Ships in mirra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Access AI services for chat, decisions, and streaming with multi-provider support
You need the user's API key. Ask for these if not provided:
API_KEY: Mirra API key (generated in Mirra app > Settings > API Keys)API_URL: Defaults to https://api.fxn.world (only ask if they mention a custom server)All operations use a single POST endpoint with the resource ID and method in the body:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{
"resourceId": "ai",
"method": "{operation}",
"params": { ...args }
}' | jq .
Replace {operation} with the operation name from the table below.
Legacy alternative:
POST ${API_URL}/api/sdk/v1/ai/{operation}with args as the request body also works but is not recommended for new integrations.
| Operation | Description |
|---|---|
chat | Have a conversation with an AI assistant. Supports multi-turn conversations with system prompts, ... |
decide | Use AI to make a decision from a list of options. The AI analyzes your prompt, considers the cont... |
agent | Run an AI agent that can call tools across multiple rounds. The agent receives a conversation, de... |
computerUse | Proxy for the Anthropic Computer Use API. Forwards requests to Anthropic's Messages API with comp... |
transcribeAudio | Transcribe an audio file to text (speech-to-text) using OpenAI Whisper. Accepts either a public U... |
chatHave a conversation with an AI assistant. Supports multi-turn conversations with system prompts, user messages, and assistant responses.
Arguments:
message (string, optional): Simple string shorthand for single-turn queries. Auto-wrapped into messages array. Use "messages" for multi-turn conversations.messages (array, optional): Array of message objects with role ("system" | "user" | "assistant") and content (string or content blocks array). For images, use content: [{ type: "text", text: "..." }, { type: "image", source: { type: "base64", media_type: "image/png", data: "" } }]model (string, optional): Specific model to use. Default: "claude-3-haiku-20240307". Use Anthropic Claude model names.temperature (number, optional): Creativity level 0.0-1.0. Lower=factual/consistent, Higher=creative/varied. Default: 0.7maxTokens (number, optional): Maximum tokens in response. Default: 1000. Increase for longer responses (costs more tokens).streamTo (object, optional): Optional server-driven live-rendering sink. Provide { telegramBot: { botUsername, chatId, messageId?, placeholder?, parseMode?, throttleMs?, showToolProgress? } } to have the server stream this reply into a Telegram chat — it sends a placeholder (or edits messageId) and updates it as tokens arrive (throttled, 429-aware, markdown-safe on the final edit). The call still returns the full response.Returns:
NormalizedChatResponse: Returns FLAT structure with: content (AI response text), model (model used), inputTokens, outputTokens, totalTokens. No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"ai","method":"chat","params":{"message":"What is the capital of France?"}}' | jq .
decideUse AI to make a decision from a list of options. The AI analyzes your prompt, considers the context, and selects the most appropriate option with reasoning.
Arguments:
prompt (string, required): The decision prompt - what needs to be decided and whyoptions (array, required): Array of options to choose from. Each option must have: id (unique identifier), label (descriptive name), and optional metadata (additional data)context (string, optional): Additional context to help the AI make a better decisionmodel (string, optional): Specific model to use. Defaults to system default.Returns:
NormalizedDecideResponse: Returns FLAT structure with: selectedOption (chosen option ID), reasoning (explanation of why chosen). No nested objects.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"ai","method":"decide","params":{"prompt":"User sent message: \"I need to schedule a meeting next Tuesday\"","options":[{"id":"calendar","label":"Calendar/Scheduling"},{"id":"email","label":"Email Management"},{"id":"tasks","label":"Task Management"},{"id":"general","label":"General Query"}]}}' | jq .
agentRun an AI agent that can call tools across multiple rounds. The agent receives a conversation, decides which tools to use, executes them, and continues until the task is complete or max rounds are reached.
Arguments:
messages (array, required): Conversation messages array with role and contenttools (array, optional): Adapter names to give the agent access to. Omit for all adapters.systemPrompt (string, optional): System prompt to guide agent behaviormodel (string, optional): Model to use. Default: claude-sonnet-4-20250514temperature (number, optional): Temperature 0.0-1.0. Default: 0.5maxTokens (number, optional): Max tokens per LLM call. Default: 4096maxRounds (number, optional): Max tool-calling rounds. Default: 10, max: 25streamTo (object, optional): Optional server-driven live-rendering sink. Provide { telegramBot: { botUsername, chatId, messageId?, placeholder?, parseMode?, throttleMs?, showToolProgress? } } to have the server stream this agent run (text + tool progress) into a Telegram chat — placeholder + throttled edits, 429-aware, markdown-safe on the final edit. The call still returns the full AgentResponse. For manual control, use mirra.ai.agentStream(params) instead.Returns:
AgentResponse: Final text, token usage, round count, and full tool call history
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"ai","method":"agent","params":{"messages":[{"role":"user","content":"Find my meetings tomorrow and summarize them"}],"tools":["googleCalendar","memory"]}}' | jq .
computerUseProxy for the Anthropic Computer Use API. Forwards requests to Anthropic's Messages API with computer use beta headers and returns the raw response. You handle the tool execution loop (screenshots, clicks, typing) on your side — Mirra handles auth and billing.
Arguments:
messages (array, required): Anthropic-format messages array. Include tool_result blocks with base64 screenshots when responding to tool_use requests.tools (array, optional): Anthropic computer use tool definitions. Defaults to computer tool with 1024x768 display if omitted.model (string, optional): Model to use. Default: claude-sonnet-4-6. Only Sonnet models are supported.maxTokens (number, optional): Maximum tokens in response. Default: 4096.system (string, optional): System prompt to guide computer use behavior.temperature (number, optional): Temperature 0.0-1.0. Default: 1.0 (Anthropic recommended for computer use).Returns:
ComputerUseResponse: Raw Anthropic response with content blocks (text + tool_use), token usage, and tokensCharged (after 4x multiplier).
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"ai","method":"computerUse","params":{"messages":[{"role":"user","content":"Open the browser and navigate to example.com"}],"tools":[{"type":"computer_20251124","name":"computer","display_width_px":1024,"display_height_px":768}]}}' | jq .
transcribeAudioTranscribe an audio file to text (speech-to-text) using OpenAI Whisper. Accepts either a public URL to an audio file or base64-encoded audio bytes, and returns the transcript.
Arguments:
url (string, optional): Public URL to an audio file to download and transcribe. Provide either "url" or "base64".base64 (string, optional): Base64-encoded audio bytes to transcribe (optionally a data URI). Provide either "url" or "base64".mimeType (string, optional): MIME type of the audio (e.g. "audio/ogg", "audio/mpeg", "audio/mp4"). Helps Whisper detect the format. Defaults to "audio/mpeg".language (string, optional): Optional ISO-639-1 language code (e.g. "en", "es") to improve accuracy when the language is known.prompt (string, optional): Optional text prompt to bias the transcription (e.g. expected vocabulary, names, or prior context).Returns:
NormalizedTranscription: Returns FLAT structure with: text (the transcript), language (detected/specified ISO code or null), durationSeconds (audio length or null), model (transcription model used).
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"ai","method":"transcribeAudio","params":{"base64":"<base64-audio>","mimeType":"audio/ogg"}}' | jq .
All SDK responses return the operation payload wrapped in a standard envelope:
{
"success": true,
"data": { ... }
}
The data field contains the operation result. Error responses include:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message"
}
}
jq . to pretty-print responses, jq .data to extract just the payloaddata.results or directly in data (check examples)--fail-with-body to curl to see error details on HTTP failuresexport API_KEY="your-key"What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
39 skills in this plugin
/channelsUse Mirra to the places a space publishes to — its corporate x, blog, newsletter — and the drafted copy waiting to go out to them. use listchannels to see what this space.... Covers all Space Channels SDK operations via REST API./contactsUse Mirra to manage user contacts - list, add, remove, search, block, and unblock contacts. Covers all Contacts SDK operations via REST API./coworkCowork with another person's Claude Code over a shared Mirra group chat. Post questions, wait for replies in near-real-time (long-poll), and hand off follow-ups. Rides the Mirra Messaging adapter — no extra integration to install.Other plugins' skills for the same job
npx claudepluginhub oz-networks/mirra-sdk --plugin mirra