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
Sessions
Message controls
Prompt optimizer
Voice
Rich output & widgets
Agent Capabilities
Features
Interfaces
Apps
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. Chat
  4. Prompt optimizer

Prompt optimizer


The prompt optimizer rewrites a vague or hedged prompt into a specific, scoped, actionable one — before you send it to the agent. Trigger it with Cmd+Shift+Enter (macOS) / Ctrl+Shift+Enter (Linux), or click the ✨ sparkle button in the input toolbar.

The flow

  1. Type a prompt in the dashboard textarea
  2. Press Cmd+Shift+Enter (or click ✨)
  3. Dark overlay appears: "✨ Optimizing prompt…" — textarea becomes read-only and dimmed
  4. The rewritten text replaces the textarea content — review before sending
  5. Press Enter to send (no auto-send)

On error or unchanged text, the original is restored silently. Typical overhead: 2–5 seconds.

When to use it

Optimization helps most when the original is:

  • Vague — "fix that thing" → gets scope, files, and constraints added
  • Under-specified — "add auth" → gets required components and edge cases
  • Missing structure — a wall of text → gets numbered steps
  • Uncertain — hedged with "maybe" or "if you could" → replaced with direct verbs

Optimization is unnecessary when the prompt is already:

  • Specific and scoped
  • Short and unambiguous ("What's 2+2?")
  • Referencing a specific file the agent should already understand

The optimizer knows this — it returns the original unchanged when there's nothing worth adding.

The rules the optimizer follows

The optimizer's system prompt encodes six rules (earlier wins on conflict):

  1. Never change your intent — no added requirements, no invented values
  2. Return unchanged if the prompt is already specific, scoped, and actionable
  3. When rewriting, add what you skipped: scope, constraints, structure, uncertainty handling
  4. Replace hedging ("maybe", "if you could") with direct verbs
  5. Add "preserve existing behavior" when the change is to existing work
  6. Never exceed min(3 × original length, 250 words)

Example

Before:

fix the zoom bug in the dashboard

After:

Fix the zoom bug in the dashboard chat input. Scope: - `website/src/hooks/useZoom.ts` — cleanup CSS custom properties on unmount - `website/src/components/ChatInput.tsx` — cache the `effectiveVh()` result per render Constraints: - Preserve existing zoom-in and zoom-out gestures - Do not change the public API of `useZoom` - Run `npm run build` and `npm run test` before completing If you find related issues while fixing this, list them but do not fix them in this change.

Same intent, but the agent now knows the files, the constraints, and where to stop.

What context the optimizer sees

The optimizer receives:

  • Your prompt in <original_prompt> tags
  • The last ~10 conversation messages (truncated to 2,000 chars)

Context makes the optimizer smarter when you're mid-conversation: it picks up file names, error messages, and prior scope from the recent history. In a fresh session, it works from the prompt alone.

Under the hood

The optimizer runs on a dedicated _optimizer session with the kirocrew-lite agent — a small, tools-disabled agent tuned for single-shot rewrites.

  • Independent from the shared _bg session (which handles title generation and folder categorization)
  • No tool calls — any tool permission request during optimization is rejected outright
  • 30-second asyncio.wait_for wraps the entire operation (session claim + stream + release)
  • LLM output has "UNCHANGED" detection built in — if the LLM decides the prompt is fine, the original is returned

On timeout or error, the original text is silently restored. The optimizer never fails loudly.

Security

Output is passed through redact_credentials() and redact_exfiltration_urls() before it reaches your textarea. If the optimizer ever surfaces a credential pattern from context, it's redacted.

Page updated: August 4, 2026
Message controls
Voice