Search documentation

Search for docs or ask AI

Plans

Plans are multi-step sequences that the AI creates when a user's request requires multiple actions. Instead of suggesting a single action, the AI creates a guided checklist that walks users through the entire process.

How It Works

1
User requests help with a complex task

"Help me set up my workspace"

2
AI analyzes and creates a Plan

A checklist of steps: Create a new project, Add your first knowledge source, Configure the assistant, Invite your team.

3
User sees a checklist in the panel

Each step is presented with clear instructions and progress tracking.

4
Each step triggers your Action handlers

Your registered handlers execute as the user progresses through the plan.

No Extra Code Required

Plans work automatically with your existing Actions. The SDK:

  • Executes each step using your registered action handlers
  • Tracks progress and updates the checklist UI
  • Persists plans across page refreshes
  • Handles step completion, skipping, and cancellation

You don't need to write any plan-specific code. Just define your actions, and the AI will combine them into plans when appropriate.

Example: Onboarding Flow

Here's how a plan might guide a new user through onboarding:

User asks: "Help me get started"

AI creates plan:

  1. Create your first project → Opens project creation modal
  2. Add a knowledge source → Opens source wizard
  3. Test the assistant → Opens AI tester
  4. Invite your team → Opens invite modal

Each step executes your registered action handlers, and the checklist updates as users complete each step.

Design for Composability

Since the AI combines your actions into plans, design them to work well together:

examples/features/plans/composability.tsx
// Good: Focused, single-purpose actions
create_project: { ... }
add_source: { ... }
invite_member: { ... }
// Less ideal: Monolithic action that does too much
setup_everything: { ... }

Next Steps