Skip to main content
MIRA’s renderer and main process communicate through a typed IPC bridge. The preload script exposes window.api using Electron’s contextBridge. All channel names and payload types are defined in src/shared/ipc-types.ts.

Usage pattern

// Invoke (request → response)
const result = await window.api.invoke('sessions:list', undefined)

// Event listener (main → renderer)
const unsubscribe = window.api.on('rlm:status-change', (payload) => {
  console.log(payload)
})
// cleanup
unsubscribe()

Invoke channels

Sessions & Messages

ChannelDescription
sessions:listList all sessions
sessions:getGet a session by ID
sessions:createCreate a new session
sessions:updateUpdate session title or pinned state
sessions:deleteDelete a session and all its messages
messages:listList messages for a session
messages:addAdd a message to a session
messages:deleteDelete a message

RLM Engine

ChannelDescription
rlm:querySend a prompt to the RLM engine
rlm:cancelCancel an in-flight RLM query
rlm:statusGet current RLM engine status
rlm:restartRestart the RLM Python subprocess

Native Agent Engine (NAE)

ChannelDescription
nae:querySend a prompt to the NAE engine
nae:cancelCancel an in-flight NAE query
nae:statusGet current NAE engine status
nae:restartRestart the NAE Python subprocess
nae:set-modeSet NAE agent mode (single / multi / auto)
nae:reset-sessionReset NAE session context

Documents

ChannelDescription
documents:listList all uploaded documents
documents:list-sessionList documents active in a session
documents:uploadUpload and parse a new document
documents:removeRemove a document
documents:toggle-sessionToggle a document’s active state in a session

Skills

ChannelDescription
skills:listList all skills
skills:getGet a skill by ID
skills:createCreate a new custom skill
skills:updateUpdate a skill
skills:deleteDelete a skill
skills:list-versionsList version history for a skill
skills:restore-versionRestore a previous skill version
skills:prune-versionsDelete old versions beyond retention limit
skills:exportExport a skill as JSON
skills:importImport a skill from JSON
skills:duplicateDuplicate an existing skill
skills:get-sessionGet the skill attached to a session
skills:apply-sessionAttach a skill to a session
skills:detach-sessionRemove the skill from a session
skills:open-file-dialogOpen the OS file picker for import

Workflows

ChannelDescription
workflows:listList all workflows
workflows:getGet a workflow by ID
workflows:createCreate a new workflow
workflows:updateUpdate workflow metadata
workflows:deleteDelete a workflow
workflows:add-stepAdd a step to a workflow
workflows:update-stepUpdate an existing step
workflows:delete-stepRemove a step
workflows:reorder-stepsReorder all steps
workflows:list-versionsList version history for a workflow
workflows:restore-versionRestore a previous workflow version
workflows:prune-versionsDelete old versions beyond retention limit
workflows:exportExport a workflow as JSON
workflows:importImport a workflow from JSON
workflows:duplicateDuplicate an existing workflow
workflows:get-sessionGet the workflow attached to a session
workflows:apply-sessionAttach a workflow to a session
workflows:detach-sessionRemove the workflow from a session
workflows:advance-stepAdvance to the next step (after human review)
workflows:reset-sessionReset session workflow state
workflows:update-session-statusUpdate the workflow run status for a session
workflows:open-file-dialogOpen the OS file picker for import

MCP Tools

ChannelDescription
mcp:listList all configured MCP servers
mcp:addAdd a new MCP server
mcp:updateUpdate an MCP server config
mcp:removeRemove an MCP server
mcp:toggleEnable or disable an MCP server globally
mcp:testTest connectivity to an MCP server
mcp:list-sessionList MCP servers active in a session
mcp:toggle-sessionToggle an MCP server for a specific session
mcp:list-toolsList tools exposed by a connected server
mcp:save-secretsSave secrets for an MCP server to the keychain
mcp:delete-secretsDelete secrets for an MCP server from the keychain
mcp:list-secret-keysList secret key names (not values) for a server

Credentials

ChannelDescription
credentials:aws-statusCheck if AWS credentials are stored
credentials:save-awsSave AWS credentials to the keychain
credentials:clear-awsRemove AWS credentials from the keychain
credentials:test-awsTest AWS credentials via sts:GetCallerIdentity
credentials:list-tokensList stored API token key names
credentials:save-tokenSave an API token to the keychain
credentials:delete-tokenRemove an API token from the keychain

Settings & App

ChannelDescription
settings:getRead all app settings
settings:saveWrite app settings
app:open-logsOpen the MIRA log directory in Finder / Explorer
app:get-versionGet the installed MIRA version string
app:check-updateTrigger an update check
app:reset-dataFactory-reset all data (destructive)

Eval Framework

ChannelDescription
eval:createCreate an eval definition
eval:updateUpdate an eval definition
eval:archiveArchive an eval definition
eval:listList all eval definitions
eval:getGet an eval definition by ID
eval:testRun a single test case against an eval (required before activation)
eval:results:queryQuery stored eval results
eval:results:runTrigger a results scoring run
eval:results:exportExport results as CSV or JSON
eval:results:human-reviewSubmit a human override score for a result
eval:scores:runRecompute aggregated scores for a run
eval:profiles:listList all eval profiles
eval:profiles:createCreate an eval profile
eval:profiles:updateUpdate an eval profile
eval:profiles:deleteDelete an eval profile
eval:settings:getRead eval framework settings
eval:settings:saveWrite eval framework settings
eval:cleanup:nowPrune old eval run data immediately
eval:workers:pausePause the background eval worker pool
eval:workers:resumeResume the background eval worker pool
eval:workers:statusGet current worker pool status
eval:runs:listList eval run records
eval:runs:summariesGet aggregated summaries for eval runs
eval:runs:deleteDelete an eval run and all its results
eval:ab:compareCompute an A/B diff between two runs

Other

ChannelDescription
dialog:confirmShow a native confirmation dialog

Event channels (main → renderer)

Listen with window.api.on(channel, handler). The call returns an unsubscribe function.

RLM Engine events

ChannelDescription
rlm:iterationA single reasoning iteration completed (streaming)
rlm:finalRLM produced a final answer for a query
rlm:errorRLM raised an error for a query
rlm:warningA non-fatal RLM warning
rlm:status-changeRLM engine lifecycle state changed
rlm:active-queriesUpdated count of in-flight RLM queries

NAE events

ChannelDescription
nae:chunkA streamed token chunk from NAE
nae:finalNAE produced a final answer
nae:errorNAE raised an error
nae:warningA non-fatal NAE warning
nae:status-changeNAE engine lifecycle state changed
nae:active-queriesUpdated count of in-flight NAE queries
nae:status-updateDetailed NAE status update
nae:tool-callNAE is calling an MCP tool
nae:tool-resultAn MCP tool call returned a result
nae:sub-agentNAE spawned or completed a sub-agent
nae:token-budgetCurrent token budget usage update

Workflow events

ChannelDescription
workflow:step-startA workflow step has begun executing
workflow:step-completeA workflow step completed successfully
workflow:completeThe entire workflow run completed
workflow:failedThe workflow run failed
workflow:human-reviewA human_review step is awaiting user input

Eval events

ChannelDescription
eval:worker:statusBackground worker pool status update
eval:completeAn eval run finished
eval:throttle:statusEval throttle / rate-limit status update

Other events

ChannelDescription
console:logA log entry for the REPL Console
document:parse-progressDocument parse status update
mcp:status-changeMCP server connection status changed
app:update-availableA newer MIRA version is available
app:deep-linkApp was opened via a deep link URL
Edit this page — Open a pull request