Loading image...Kiro

Product

  • About Kiro
  • IDE
  • CLI
  • Web
  • Mobile
  • Crew
  • Pricing
  • Downloads

For

  • Enterprise
  • Startups
  • Students

Community

  • Overview
  • Ambassadors
  • Discord
  • Events
  • Powers
  • Shop
  • Showcase

Resources

  • Docs
  • Blog
  • Changelog
  • FAQs
  • Report a bug
  • Suggest an idea
  • Billing support

Social

Site TermsLicenseResponsible AI PolicyLegalPrivacy PolicyCookie Preferences
Loading image...Kiro
  • Enterprise
  • Pricing
  • Docs
SIGN INDOWNLOADS
Loading image...Kiro

Get Started

InstallationAuthenticationYour first project

Models

OverviewAvailable modelsReasoning effort

Features

How Kiro works
Specs
Steering
Hooks
MCP
Permissions
Custom agents
Agent Skills
Powers
CompactionKiroignoreCheckpoints and rewind
Built-in tools
Configuration scopes

IDE 1.x

What's new in 1.0
Setup & First Run
Editor
Chat
Experimental
Troubleshooting0.x reference

CLI

What's new in 3.0
Setup & First Run
Terminal UI
Chat
Headless modeACPAuto complete
Experimental
2.x reference

Crew

Quick startInstallationRunning 24/7
Chat
Agent Capabilities
Features
Interfaces
Apps
Build your first app
Manifest reference
SDK / API reference
Publishing & guidelines
ConfigurationSecurityTroubleshooting

Web - Preview

Setup & First RunIdentity Center
Connect your repositories
Working with the agent
Autonomous modeAutomations
Sandbox

Mobile - Preview

Overview

Commands and Reference

CLI commandsSlash commandsBuilt-in toolsExit codesSettingsIDE keyboard shortcuts

Billing

OverviewManaging your subscriptionUpgrading your planDowngrading your planCancelling your planPurchasing add-on creditsManaging your paymentsManaging usage notificationsManaging your taxesContacting billing supportDeleting your accountRelated questions

Enterprise

ConceptsOnboarding quickstart
Connecting your identity provider
Subscribe your teamManage subscriptions
Governance
Monitor and track
SettingsManaged updatesBillingIAMSupported regions

Privacy and Security

OverviewData protectionCode referencesCompliance validationInfrastructure securityIAM permissionsFirewalls, proxies, and data perimetersVPC endpoints (AWS PrivateLink)

Guides

Overview
Language support
Learn by playing

Migration

Migrating from Q DeveloperMigrating from VSCodeUpgrading from Q CLI
  1. Docs
  2. Crew
  3. Apps
  4. SDK / API reference

SDK / API reference


How you talk to the Crew gateway depends on where your code runs. This page maps each surface to the right API.

Choosing the right SDK

Where your code runsUse
Dashboard UI page (TypeScript / React)@kirocrew/app-sdk hooks (resolved by the host at runtime)
Python app, CLI tool, or servicekirocrew-client package — pip install kirocrew-client
Node.js / Electron appCall Gateway REST/WebSocket endpoints directly via fetch()

There is no published TypeScript gateway-client npm package. The kirocrew-client method names below describe the canonical Gateway API surface — the same endpoints any client (including raw fetch) talks to.

Dashboard UI — App SDK hooks

Dashboard UI pages import permission-scoped hooks from @kirocrew/app-sdk, resolved at runtime via the host import map:

tsx
import { useAppApi, useAppEvents } from '@kirocrew/app-sdk' function MyPage() { const api = useAppApi() // permission-scoped GET/POST/PUT/PATCH/DELETE useAppEvents('notification', (e) => console.log(e)) // ... }

useAppApi() returns a client whose methods (get, post, put, patch, del) call the Gateway endpoints listed below, scoped to your permissions.api allowlist. Out-of-scope paths throw an error. The host injects auth automatically.

Hooks

HookReturnsPurpose
useAppApi()AppApiClientPermission-scoped HTTP client
useAppEvents(event, cb)() => voidSubscribe to WebSocket events; returns unsubscribe
useTheme()ThemeReactive theme (mode, accent, colorTheme)
useAppInfo()AppInfoApp metadata (name, version, permissions)
useNavigate()(path) => voidNavigate to Crew routes
useNotify()(text, opts?) => voidShow a toast notification
useNavBadge()(count) => voidUpdate sidebar badge count
useChatLauncher()LauncherFnNavigate to chat with optional agent + message

Shared UI components

Import from @kirocrew/app-sdk/ui:

Card, CardTitle, Btn, SendBtn, Input, SearchInput, Badge, AimBadge, StatCard, Skeleton, ContentSkeleton, EmptyState, PageHeader, Toggle, InfoTip, SegmentedControl, MarkdownRenderer.

Python client

bash
pip install kirocrew-client

Standalone async client using aiohttp. No dependency on the Crew main package.

python
from kirocrew_client import CrewClient async with CrewClient(app_name="my-app") as mc: ok = await mc.ping() slots = await mc.list_slots() task_id = await mc.dispatch_agent_async("my-agent", "Analyze ticket T-123") result = await mc.get_task_result(task_id)

Constructor

python
CrewClient( base_url="", # default: http://localhost:{KIROCREW_PORT or 5476} token="", # optional for localhost app_name="", # enables app-scoped storage + auto-auth timeout=30, # request timeout seconds max_retries=3, retry_base_delay=1.0, message_length_limit=40000, on_auth_expired=None, # async callback returning new token )

When app_name is set and no explicit auth is provided, the client auto-reads the app secret from ~/.kiro/crew/apps/{name}/.app_secret and exchanges it for a short-lived token via POST /api/apps/{name}/token.

Gateway API surface

Method names below use snake_case for Python; TypeScript names shown for readability. The same endpoints are reachable via raw fetch() from Node or a browser.

Authentication

TS namePythonPurpose
authenticate()authenticate()Exchange app secret for token (auto-called if appName set)
setToken(token)set_token(token)Manually set auth token on HTTP and WebSocket

Connection

TS namePythonPurpose
ping()ping()Check gateway reachability
getStatus()get_status()Gateway health (version, uptime, slots, provider)
getSystemInfo()get_system_info()CPU, memory, disk metrics

Chat slots

TS namePythonPurpose
createSlot(name, agent?)create_slot(name, agent="")Create a new chat session
listSlots()list_slots()List all active sessions
deleteSlot(id)delete_slot(id)Remove a session
getSlotHistory(id, limit?)get_slot_history(id, limit=50)Get slot message history
sendMessage(id, msg)send_message(id, msg)Send a message (validates length, auto-flushes pending context)

WebSocket events

TS namePythonPurpose
connect()(auto)Open WebSocket connection
disconnect()(auto)Close WebSocket connection
onChatChunk(slotId, cb)subscribeStream response chunks for a slot
onChatDone(slotId, cb)subscribeResponse complete for a slot
onNotification(cb)subscribeReceive notifications
onToolCall(cb)subscribeReceive tool call events
onConnectionChange(cb)subscribeConnection state changes
onRaw(cb)subscribeAll parsed WebSocket events

All subscription methods return an unsubscribe function.

Event types (partial list): chat_chunk, chat_done, chat_message, chat_error, tool_call, notification, slots, slot_title, dashboard, log, refresh, approval, subagent_done, task_update, task_complete, proactive_notification, app_reload, error.

Subagents

TS namePythonPurpose
spawn(task, agent?)spawn(task, agent="")Spawn a background subagent
spawnMany(tasks, agents?)spawn_many(tasks, agents=None)Spawn multiple subagents in parallel
listSubagents()list_subagents()List all subagents
getSubagentStatus(id)get_subagent_status(id)Get subagent output

Cron jobs

TS namePythonPurpose
addCron(name, opts)add_cron(name, **opts)Create a scheduled job
listCrons()list_crons()List all cron jobs
updateCron(id, opts)update_cron(id, **opts)Update a cron job
removeCron(id)remove_cron(id)Delete a cron job
pauseCron(id)pause_cron(id)Pause without deleting
resumeCron(id)resume_cron(id)Resume a paused job

Lessons

TS namePythonPurpose
addLesson(rule, cat, scope?)add_lesson(rule, cat, scope="")Save a learned rule
listLessons()list_lessons()List all lessons
removeLesson(query)remove_lesson(query)Remove matching lessons

Notifications

TS namePythonPurpose
sendNotification(text, opts?)send_notification(text, **opts)Send via Slack or dashboard
listNotifications()list_notifications()List notifications
ackNotifications()ack_notifications()Acknowledge all

Approvals

TS namePythonPurpose
approveAction(slot, task)approve_action(slot, task)Approve a pending tool action
rejectAction(slot, task)reject_action(slot, task)Reject a pending tool action
resolveApproval(id, ok)resolve_approval(id, ok)Resolve an approval by ID
getApprovalMode()get_approval_mode()Get current approval mode
setApprovalMode(mode)set_approval_mode(mode)Set to "auto" or "interactive"

Models

TS namePythonPurpose
listModels()list_models()List available LLM models
setSlotModel(slotId, model)set_slot_model(slot, model)Set model for a slot

MCP servers

TS namePythonPurpose
listMcpServers()list_mcp_servers()List registered MCP servers
registerMcpServer(def)register_mcp_server(name, cmd, args?, env?)Register an MCP server
removeMcpServer(name)remove_mcp_server(name)Remove an MCP server
registerAppMcp(name, entry)register_app_mcp(name, ...)Write MCP entry to ~/.kiro/crew/mcp.json
unregisterAppMcp(name)unregister_app_mcp(name)Remove MCP entry

Agent runtime

TS namePythonPurpose
dispatchAgent(agent, prompt)dispatch_agent(agent, prompt)Run agent synchronously
dispatchAgentAsync(agent, prompt)dispatch_agent_async(agent, prompt)Run in background
getTaskResult(taskId)get_task_result(id)Poll task status

Agent & skill install (Node.js SDK only)

TS namePurpose
installAgentConfig(name, config)Install agent JSON to ~/.kiro/agents/ (merges mcpServers)
removeAgentConfig(name)Remove agent config
installSkill(name, srcDir)Copy skill directory to ~/.kiro/crew/skills/
removeSkill(name)Remove skill directory

Config

TS namePythonPurpose
getGatewayConfig(key)get_gateway_config(key)Read gateway config section
setGatewayConfig(key, value)set_gateway_config(key, val)Write gateway config section

App storage

TS namePythonPurpose
getAppDataDir()get_app_data_dir() → PathApp-scoped data directory
getAppConfig()get_app_config()Read app config via REST
setAppConfig(config)set_app_config(cfg)Write app config via REST

Memory

TS namePythonPurpose
memorySearch(query, topK?)memory_search(q, top_k=8)Semantic memory search

Context injection

Silent background context — appears in the next user-initiated turn without triggering a response.

TS namePythonPurpose
injectContext(slotId, content, opts?)inject_context(slot, content, ...)Inject context (null slotId = buffer locally)
flushPendingContext(slotId)flush_pending_context(slot)Flush buffered entries
setDefaultSlot(slotId)set_default_slot(slot)Auto-flush on sendMessage

Options: { source?: string, ephemeral?: boolean, maxAge?: number }.

Proxy authentication (server-side)

For app backends: verify a request was signed by the gateway reverse proxy.

FunctionLanguagePurpose
verifyProxyRequest(req, appName, opts?)Node.jsVerify HMAC on any Node.js request
verify_proxy_request(request, app_name, ...)PythonVerify HMAC on any aiohttp / Django / FastAPI request
verify_proxy_request_raw(header, ...)PythonVerify from a raw header string

Signature is HMAC-SHA256(timestamp:method:/api/path[?query]:sha256(body)) with the app secret as the key. Timestamps must be within ±60 s of now. Uses constant-time comparison.

Gateway REST endpoints — apps

For app-lifecycle operations beyond the client wrappers:

MethodPathPurpose
GET/api/appsList all installed apps
GET/api/apps/registryList available apps from registry
GET/api/apps/blob?repo=&path=&ref=Proxy images from a registry app's git repo
POST/api/apps/installInstall from local path
POST/api/apps/registerRegister a self-managed app
POST/api/apps/registry/installInstall from registry
GET/api/apps/{name}Get app details
GET/api/apps/{name}/manifestGet app manifest
GET / PUT/api/apps/{name}/configRead / write app config
POST/api/apps/{name}/updateUpdate installed app
POST/api/apps/{name}/uninstallUninstall app
POST/api/apps/{name}/enableEnable app
POST/api/apps/{name}/disableDisable app
POST/api/apps/{name}/devToggle dev mode (body {"enabled": bool})
POST/api/apps/{name}/openLaunch app via openCommand
GET/apps/{name}/ui/{path}Serve app UI bundle files
*/apps/{name}/api/{path}Reverse proxy to app backend (HMAC-signed)

Manifest and lifecycle helpers

kirocrew-client also ships two helpers for install automation.

AppManifest

Validate and serialize app.json:

python
from kirocrew_client import AppManifest m = AppManifest.from_dict({"name": "my-app", "version": "1.0.0", ...}) errors = m.validate() # list[str] — empty if valid data = m.to_dict()

AppLifecycle

Manage app installation via the Gateway REST API:

python
from kirocrew_client import CrewClient, AppLifecycle async with CrewClient() as mc: lifecycle = AppLifecycle(mc) await lifecycle.install("/path/to/my-app") await lifecycle.enable("my-app") await lifecycle.disable("my-app") await lifecycle.uninstall("my-app") apps = await lifecycle.list()

GatewayManager

Manage the Crew gateway process (start, stop, health check):

python
from kirocrew_client import GatewayManager gm = GatewayManager(port=5476) await gm.start() healthy = await gm.is_healthy() await gm.stop()

Error handling

All kirocrew-client errors are CrewError instances with code, message, status, body.

CodeTriggerRetried?
AUTH_REQUIREDRemote connection without tokenNo
AUTH_EXPIRED401 / 403 responseNo (calls on_auth_expired if set)
VALIDATION_ERRORInvalid inputNo
NOT_FOUND404 responseNo
RATE_LIMITED429 responseYes (Retry-After or backoff)
SERVER_ERROR5xx responseYes (exponential backoff)
NETWORK_ERRORTimeout or connection failureYes (exponential backoff)
WS_DISCONNECTEDWebSocket not connectedNo
python
from kirocrew_client import CrewError try: await mc.send_message("slot-1", "hello") except CrewError as e: print(e.code, e.message, e.status)
Page updated: August 4, 2026
Manifest reference
Publishing & guidelines