Skip to content

feat(bots): let bots run on Kiro - #45533

Merged
AmoabaKelvin merged 23 commits into
stablyai:mainfrom
LDH1103:feat/kiro-bots
Nov 21, 2026
Merged

AmoabaKelvin merged 23 commits into
stablyai:mainfrom
LDH1103:feat/kiro-bots

Conversation

@LDH1103

@LDH1103 LDH1103 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #39769: review the diff against f073cd3 (#39769's head). Only feat(bots): let bots run on Kiro and the refactor after it belong to this PR.

ELI5

Bots can now run on Kiro. A bot's standing instructions reach Kiro the way Kiro takes rules from an app, so a Kiro bot knows who it is and how to behave from its first message.

Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​38 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​35
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​150 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​145

What Changed

Before: the bot agent picker had no Kiro, and Kiro's chat launch had no way to carry a bot's standing instructions.

After: Kiro is a bot agent. A new Kiro bot session carries the bot's standing instructions as one always-included Kiro steering document.

Mechanism:

  • acp-instructions.ts: deliverKiroInstructions returns sessionMeta: { kiro: { steering: [{ name: 'orca', inclusion: 'always', content }] } }. This is the same shape as Grok's rules delivery.
  • kiro-acp-launch-spec.ts: the spec's instructions is that delivery.
  • bot-types.ts: kiro joins BOT_AGENTS.
  • bot-skill-projects.ts: Kiro chats don't load the linked skill folders, so Kiro bots get the skill list, as Cursor and Hermes bots do.

Why

Kiro's V3 ACP server takes _meta.kiro.steering on session/new, up to 100 { name, inclusion, content } documents, and adds them to the session's steering next to the workspace and global ones. That is a per-session channel with no file to write, like Grok's rules.

Kiro keeps the steering with the session, so it is sent on session/new only. A reopened conversation keeps the instructions it began with, and Kiro is not in READS_INSTRUCTIONS_EACH_START.

Alternatives considered:

  • A .kiro/steering/orca.md in the bot's folder, like Hermes's .hermes.md. It writes the folder on every launch, and any Kiro session in that folder would pick it up.
  • A custom agent through --agent. It replaces Kiro's default agent configuration instead of adding to it.

The version gate LDH1103 first put in the delivery is gone: #39769 now requires kiro-cli 3.1.0, the first release with client steering, for every Kiro chat.

Linked Issue

Fixes #45532

Visual Proof

No new UI: Kiro is one more entry in the existing bot agent picker. Below is a live Kiro bot in a hidden dev build, from creation to "Memory updated":

Kiro bot home chat

Testing

macOS, on the real kiro-cli 3.5.0 and 3.1.0 binaries in scratch homes, pointed at a local fake Kiro backend. #39769's Testing section has the setup. The backend records every model request, so it shows exactly what Kiro sends to the model.

  • Codeword probe, raw ACP: the steering document held CODEWORD: PELICAN42.

    • A new session with it answered PELICAN42, on both 3.5.0 and 3.1.0.
    • A new session without it answered NONE.
    • In a fresh process, session/load with no _meta still sent the steering text to the model, under "Included Rules → ### orca".
  • Live bot in a hidden dev build:

    • Created the bot with bots.create {agent: 'kiro'} over CDP and opened it with bots.chat.open.
    • The first model request carried the bot preamble (Tools and Rules) as the orca steering rule plus the first-run block. The first-run reply was "Hi! What should I start on?".
    • A turn ran "${ORCA_CLI_COMMAND:-orca}" bot connectors through Kiro's shell tool. It succeeded as the bot: "Slack: orca slack, as Kiro Probe".
    • A turn appended a line to the bot's MEMORY.md, and the chat showed "Memory updated · 1 added".
  • Not run: a real Kiro account (no sign-in or spend), Windows, Linux and SSH.

  • Automated: acp-structured-launch-instructions.test.ts checks that Kiro gets the steering document on its new session and not on reopen. It fails with the delivery reverted. pnpm check:changed passed (29 checks).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Risk

The riskiest part: _meta.kiro.steering is in Kiro's server schema but not in its docs, which list only modeId, modelId and effortLevel under _meta.kiro. If a later Kiro release drops or renames it, new Kiro bot sessions would start without their standing instructions. Only Kiro bots are affected. Back it out with a plain revert.

Level: Low

AI Disclosure

LDH1103 used Claude Code (Claude Opus 5.5) for the original commit. The maintainer follow-up was also written with an AI agent.

Review

Reviewed together with #39769 in one round with Codex and Claude: no P0 or P1. The P2 about bots on kiro-cli 2.31 to 3.0 failing with a generic error was fixed by the 3.1.0 minimum in #39769.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

  • No platform, path or shortcut code.
  • On a remote host, the delivery is sent to that host's Kiro.
  • Mobile has no change; phone-created bots use the same host path.
  • No extra processes or file writes per launch.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

LDH1103 and others added 21 commits November 8, 2026 13:14
Kiro CLI 2.29.1 serves ACP through `kiro-cli acp --agent-engine v3`, so
Kiro can run as a structured chat agent like Grok, OMP and Antigravity.

- Launch the V3 engine with `--auth-method cli`, reusing the sign-in from
  `kiro-cli login`. The terminal Command setting is ignored because it
  starts the TUI, which serves no ACP.
- Normalize the file:// URIs Kiro sends as diff paths.
- Offer Ask and Full access. Full access approves each permission
  request, since V3 rejects the trust flags V2 used.
- Read models from the live session: Kiro reports them only after
  session/new returns.
- Sign in from the chat through `kiro-cli login` (device flow remotely).
- Label the agent "Kiro" instead of its raw id.
…ions

Kiro chats could only pick a model after the first session started, and
Settings > Agents had no model or effort menu for Kiro.

- List models before a chat opens with `kiro-cli chat --list-models
  --format json`; V3 `acp` rejects `--model` and `--effort`, so chats keep
  applying the picks as session config options.
- Add a static Kiro catalog with the current models and the effort levels
  and defaults each model reports in a fresh kiro-cli 2.29.1 session. It
  backs the Settings menus and passes `--model`/`--effort` to terminal
  `kiro-cli chat` launches; mid-session changes open Kiro's /model panel.
V3 engines before 2.31 ignore KIRO_HOME, so a pinned home's hooks and
settings would silently not apply in Chat. Rechecked the effort catalog
on kiro-cli 3.1.0.
kiro-cli 2.31+ ignores a KIRO_HOME that is a root or at or above the
user's home and falls back to ~/.kiro, so Chat now pins that fallback
instead of recording a home Kiro never uses.
kiro-cli loads user hooks over ACP only for clients that opt in at
initialize, as its TUI does; Chat does not, so the comments no longer
imply hooks from KIRO_HOME run there.
Main moved the provider option catalogs into options/catalog-providers/, so the Kiro catalog moves there too.
Kiro's V3 ACP server takes steering documents from the client under
_meta.kiro.steering on session/new, and keeps them with the session
across a restart and session/load. So a Kiro bot's standing instructions
go there as one always-included document, the way Grok takes its rules.
The 2.29.1 server has no such field, so a Kiro older than 3.1.0 refuses
to start a bot rather than run it without them.

Checked live on kiro-cli 3.1.0.
# Conflicts:
#	src/shared/agent-session/lifecycle/launch/agent-session-setup-commands.ts
Drop the Settings model/effort catalog, which also changed terminal launches,
and the KIRO_HOME fallback pin. Guard chat-owned sessions from terminal
--resume-id, add the installer to the setup card, skip CLI naming runs like
the other ACP agents, and cover the diff-path fix with a dialect test.
# Conflicts:
#	src/main/kiro/kiro-acp-launch-spec.ts
@AmoabaKelvin
AmoabaKelvin marked this pull request as ready for review November 20, 2026 21:51
@AmoabaKelvin

Copy link
Copy Markdown
Collaborator

Merged the updated #39769 and pushed 3975ff9: with Chat now on kiro-cli 3.1.0+, the steering delivery needs no version check of its own, so it matches Grok's rules delivery. Checked live with a Kiro bot in a dev build.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Kiro ACP launches now deliver standing instructions as an always-included orca steering entry. The launch tests cover Kiro setup and verify that no reopen metadata is set. Kiro is also included in the shared bot agent tuple and the linked-skills listing.

Merge Risk: Low · up to 3fd6a

This change lets bots run on Kiro by delivering their standing instructions as steering on new sessions. The delivery path looks sound. One minor, previously raised resume-parsing edge case remains open and is low risk. A real Kiro account was not tested, and the steering field is undocumented, so Kiro could change it in a future release.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(bots): let bots run on Kiro" states the main change: Kiro becomes a bot agent and receives standing instructions as a steering document. It matches the changeset, which adds kiro to BO…
Description check Passed The description follows the repository template closely. It covers ELI5, What Changed (before and after plus mechanism), Why (with alternatives considered), Linked Issue (Fixes #45532), Visual Proof (…
Linked Issues check Passed Issue #45532 is the only direct linked issue, so its coding objectives apply. (1) Kiro as a bot agent: BOT_AGENTS in src/shared/bot-types.ts adds 'kiro', and BOT_AGENTS_LISTING_LINKED_SKILLS i…
Out of Scope Changes check Passed The bot-specific changes map to #45532: bot agent type and picker (bot-types.ts), skill listing for Kiro bots (bot-skill-projects.ts), instruction delivery (acp-instructions.ts, `kiro-acp-launch…
Full details: Title check

Explanation

The title "feat(bots): let bots run on Kiro" states the main change: Kiro becomes a bot agent and receives standing instructions as a steering document. It matches the changeset, which adds kiro to BOT_AGENTS, a Kiro instructions delivery, and the Kiro launch spec. The title is short and specific.

Full details: Description check

Explanation

The description follows the repository template closely. It covers ELI5, What Changed (before and after plus mechanism), Why (with alternatives considered), Linked Issue (Fixes #45532), Visual Proof (a screenshot for the UI-adjacent behavior), Testing (manual and automated, with platforms tested and not tested), Risk (with level and backout), AI Disclosure, the agent skill upstream boundary, Notes, and the checklist. The stacked-PR context and the LoC block are extra but do not block review. The Risk section names the riskiest part, the undocumented _meta.kiro.steering field, and states how to revert.

Full details: Linked Issues check

Explanation

Issue #45532 is the only direct linked issue, so its coding objectives apply. (1) Kiro as a bot agent: BOT_AGENTS in src/shared/bot-types.ts adds 'kiro', and BOT_AGENTS_LISTING_LINKED_SKILLS in src/shared/bots/bot-skill-projects.ts adds kiro, so Kiro bots receive the skill list. (2) Standing instructions as an always-included steering document under _meta.kiro.steering on session/new: deliverKiroInstructions in src/main/acp/launch/acp-instructions.ts returns sessionMeta: { kiro: { steering: [{ name: 'orca', inclusion: 'always', content }] } }, and KIRO_LAUNCH_SPEC in src/main/kiro/kiro-acp-launch-spec.ts uses it as instructions. (3) Steering kept across restart and session/load: the delivery is sent on new sessions only, and acp-structured-launch-instructions.test.ts asserts the entry on a new session and the absence of reopen metadata. Live codeword probes on kiro-cli 3.5.0 and 3.1.0 are reported in the PR description. (4) Older Kiro must not run bots without instructions: the PR drops its own version gate. The 3.1.0 minimum from parent #39769 now applies to every Kiro chat, which meets the issue intent. The latest changes since the previous review are consistent with this result. Unresolved: a real Kiro account, Windows, Linux, and SSH were not tested. The field _meta.kiro.steering is undocumented, as the issue and PR both state. This is a known risk, not a code defect.

Full details: Out of Scope Changes check

Explanation

The bot-specific changes map to #45532: bot agent type and picker (bot-types.ts), skill listing for Kiro bots (bot-skill-projects.ts), instruction delivery (acp-instructions.ts, kiro-acp-launch-spec.ts), and the ACP launch test. Supporting Kiro agent entries (agent-chat-permission-support.ts, agent-session-setup-commands.ts, agent-type-label.ts, native-chat-agent-profiles.ts, acp-launch-registry.ts) are needed for Kiro to act as a bot agent. The Kiro dialect, model listing, and launch spec base come from parent #39769, which is an ancestor of the head. Main-branch commits reachable through merges belong to other PRs and are not evaluated here. No changed file in the summarized PR is unrelated to Kiro bots or Kiro chat.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 689e04f0-d6b4-4680-80ce-ce24f884b3bb
Commits

Reviewing files that changed from the base of the PR and between 1dfb42d and 3fd6a1b.

Files selected for processing: 3

  • src/main/acp/launch/acp-structured-launch-instructions.test.ts
  • src/shared/bot-types.ts
  • src/shared/bots/bot-skill-projects.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2cc0fe09-24ee-42de-a0e5-090673253cd6
Commits

Reviewing files that changed from the base of the PR and between c0473a1 and 3975ff9.

Files selected for processing: 14

  • src/main/acp/acp-dialects/kiro-dialect.test.ts
  • src/main/acp/acp-dialects/kiro-dialect.ts
  • src/main/acp/launch/acp-instructions.ts
  • src/main/acp/launch/acp-launch-registry.ts
  • src/main/acp/launch/acp-structured-launch-instructions.test.ts
  • src/main/kiro/kiro-acp-launch-spec.ts
  • src/main/kiro/kiro-model-listing.ts
  • src/main/runtime/agent-session/naming/structured-chat-naming-runtime.ts
  • src/shared/agent-launch/permissions/agent-chat-permission-support.ts
  • src/shared/agent-session/lifecycle/launch/agent-session-setup-commands.ts
  • src/shared/agent-status/presentation/agent-type-label.ts
  • src/shared/bot-types.ts
  • src/shared/bots/bot-skill-projects.ts
  • src/shared/native-chat/input/commands/native-chat-agent-profiles.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

rowAgents: ['kiro'],
rowSessionId: (link) => link.handle.nativeId,
parseResumeArgs: (args) =>
resumeInvocationFromOptions(args, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Stop the shared resume-option scan at --.

resumeInvocationFromOptions scans the full argument list, including tokens after --. For kiro-cli chat -- --resume, the parser returns { target: null }. A null target permits any conversation, so the ownership classifier can record a resume that the command did not request. The sibling helper ownOptionsInclude already treats tokens after -- as prompt text. Limit the option scan to the tokens before --.

Suggested fix

 export function resumeInvocationFromOptions(
   args: readonly string[],
   options: { targetless: readonly string[]; markers: readonly string[] }
 ): StructuredAgentResumeInvocation | null {
-  if (args.some((token) => options.targetless.includes(token))) {
+  const terminator = args.indexOf('--')
+  const optionArgs = terminator === -1 ? args : args.slice(0, terminator)
+  if (optionArgs.some((token) => options.targetless.includes(token))) {
     return { target: null }
   }
-  const inline = args.find((token) =>
+  const inline = optionArgs.find((token) =>
     options.markers.some((marker) => token.startsWith(`${marker}=`))
   )
   if (inline !== undefined) {
     const target = inline.slice(inline.indexOf('=') + 1)
     return { target: target.length > 0 ? target : null }
   }
   return invocationAfter(
-    args,
-    args.findIndex((token) => options.markers.includes(token))
+    optionArgs,
+    optionArgs.findIndex((token) => options.markers.includes(token))
   )
 }

This change applies to every provider that uses the helper. Confirm that each provider places its options before any -- terminator.

# Conflicts:
#	src/main/kiro/kiro-acp-launch-spec.ts
# Conflicts:
#	src/main/acp/launch/acp-structured-launch-instructions.test.ts
#	src/shared/bot-types.ts
#	src/shared/bots/bot-skill-projects.ts
@AmoabaKelvin
AmoabaKelvin merged commit 25b2d9a into stablyai:main Nov 21, 2026
109 of 111 checks passed
@AmoabaKelvin

Copy link
Copy Markdown
Collaborator

Thanks @LDH1103. We merged main in, trimmed a few pieces (see the description) and landed both halves: Kiro now runs in Chat (#39769) and can host bots (this PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Let bots run on Kiro

2 participants