{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Kiro Integration","description":"Control the power of AI Agents in runtime.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"kiro-integration","__idx":0},"children":["Kiro Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Connect Kiro IDE to Capsule Security for complete visibility into AI coding assistant activity, including prompts, agent responses, tool execution, and session lifecycle."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This integration uses Kiro's hook system to capture AI coding assistant activity."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following activity is captured:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Event"},"children":["Event"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Session Start"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session initialization with agent metadata (MCP servers, skills, steering)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User Prompt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User messages submitted to the agent"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Agent Response"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Assistant responses"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Agent Reasoning"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The agent's internal reasoning"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tool Invocation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tool calls with arguments, results, success status, exit code, and timing"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you begin, ensure you have:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Kiro IDE"]}," installed"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capsule Security"]}," account with admin access"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-generate-the-installer","__idx":3},"children":["Step 1: Generate the Installer"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capsule Security"]}," portal"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations"]}," and locate ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Kiro"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Install"]}," — Capsule generates a platform-specific installer with:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An embedded authentication token scoped to your organization"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The hook dispatcher for your platform (bash for macOS/Linux, PowerShell for Windows)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Capsule hook definition that is fanned out to your Kiro workspaces"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select your target platform (",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mac"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Linux"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Windows"]},") to download the installer. The portal displays the exact command to run in the next step."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-run-the-installer","__idx":4},"children":["Step 2: Run the Installer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The installer runs under your user account only — no root or administrator privileges are required, and no system-wide files are modified. It performs three actions:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Writes the Capsule hook dispatcher under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.kiro/scripts/"]}," (macOS/Linux) or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["%APPDATA%\\Kiro\\scripts\\"]}," (Windows)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Adds the dispatcher to Kiro's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kiroAgent.trustedCommands"]}," in your user ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settings.json"]}," (idempotent; the original file is snapshotted on first modification)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Installs the Capsule hook (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capsule-stop.kiro.hook"]},") into every Kiro workspace registered on your machine. New workspaces are picked up automatically on the next agent turn"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"macos--linux","__idx":5},"children":["macOS / Linux"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open a terminal and run the command shown in the portal:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"bash ~/Downloads/capsule-kiro-install.sh\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"windows","__idx":6},"children":["Windows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open PowerShell and run the command shown in the portal:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"powershell","header":{"controls":{"copy":{}}},"source":"powershell -ExecutionPolicy Bypass -File \"$HOME\\Downloads\\capsule-kiro-install.ps1\"\n","lang":"powershell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Re-running the installer is safe — all operations are idempotent."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3-restart-kiro","__idx":7},"children":["Step 3: Restart Kiro"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For the hook to take effect:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Quit Kiro completely"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Reopen Kiro and your workspace"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4-verify-the-installation","__idx":8},"children":["Step 4: Verify the Installation"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open any Kiro workspace and run a simple agent task, for example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Create a new file called test.txt with the content \"Hello World\"\n"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Let the agent complete the task — the Capsule hook fires at the end of the agent turn"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capsule Security"]}," portal"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Inventory > Agents"]}," and confirm your Kiro agent appears"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click on the agent and review the audit logs to verify events are captured:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Session start event"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["User prompt"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Agent response"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tool invocations"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To view the full conversation, navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Observability"]}," and filter by ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Activity Type — Session"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"troubleshooting","__idx":9},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If events do not appear:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Confirm the installer completed without errors."]}," Re-run the installer from the portal if needed — re-runs are idempotent."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Verify the dispatcher is trusted."]}," Open your Kiro ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settings.json"]}," (Kiro → Settings → Open Settings (JSON)) and confirm ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kiroAgent.trustedCommands"]}," includes the Capsule dispatcher path."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Confirm the hook is present in your workspace."]}," Look for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".kiro/hooks/capsule-stop.kiro.hook"]}," in your workspace root."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Restart Kiro."]}," Hook changes only load on Kiro startup."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Check token expiration."]}," Tokens default to 365 days. Expired tokens require regenerating the installer from the portal."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Contact Capsule Security support"]}," if issues persist."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"policy-enforcement","__idx":10},"children":["Policy Enforcement"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Capsule's Kiro integration is observation-only at the hook layer. Policy decisions are made server-side based on Policies configured in your Capsule tenant. To enforce policies on Kiro activity:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Policies"]}," in the portal"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Define or assign policies that target Kiro agents"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Capsule evaluates captured user prompts against policy rules and surfaces violations under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Detections"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"security-considerations","__idx":11},"children":["Security Considerations"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The installer runs locally"]}," under your user account — no root or administrator privileges are required, and no system-wide files are modified"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Authentication tokens"]}," are scoped to your tenant and embedded in the dispatcher; never share the installer script outside your organization"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Inspect the dispatcher"]}," at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.kiro/scripts/"]}," (Unix) or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["%APPDATA%\\Kiro\\scripts\\"]}," (Windows) if your security team requires script review before execution"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Token lifetime"]}," can be customized (1–365 days) under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Advanced settings"]}," in the portal before downloading the installer. Shorter TTLs require more frequent reinstalls"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"support","__idx":12},"children":["Support"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For help with this integration:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email"]},": support@capsule.security"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Include"]},": your organization ID, the platform on which the installer was run, and any error messages from the installer or Kiro logs"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"references","__idx":13},"children":["References"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://kiro.dev/docs/hooks"},"children":["Kiro Hooks Documentation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.capsulesecurity.io/guides/policy-testing"},"children":["Capsule Policies"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.capsulesecurity.io/guides/webhook-events"},"children":["Capsule Webhook Events"]}]}]}]},"headings":[{"value":"Kiro Integration","id":"kiro-integration","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Step 1: Generate the Installer","id":"step-1-generate-the-installer","depth":2},{"value":"Step 2: Run the Installer","id":"step-2-run-the-installer","depth":2},{"value":"macOS / Linux","id":"macos--linux","depth":3},{"value":"Windows","id":"windows","depth":3},{"value":"Step 3: Restart Kiro","id":"step-3-restart-kiro","depth":2},{"value":"Step 4: Verify the Installation","id":"step-4-verify-the-installation","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":3},{"value":"Policy Enforcement","id":"policy-enforcement","depth":2},{"value":"Security Considerations","id":"security-considerations","depth":2},{"value":"Support","id":"support","depth":2},{"value":"References","id":"references","depth":2}],"frontmatter":{"seo":{"title":"Kiro Integration"}},"lastModified":"2026-05-20T13:51:18.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/kiro","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}