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
"Help me set up my workspace"
A checklist of steps: Create a new project, Add your first knowledge source, Configure the assistant, Invite your team.
Each step is presented with clear instructions and progress tracking.
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:
- Create your first project → Opens project creation modal
- Add a knowledge source → Opens source wizard
- Test the assistant → Opens AI tester
- 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:
// Good: Focused, single-purpose actionscreate_project: { ... }add_source: { ... }invite_member: { ... }// Less ideal: Monolithic action that does too muchsetup_everything: { ... }
Next Steps
- Learn about Actions and what the AI can do
- Set up Actions for implementation details
- See Plan Types Reference for advanced customization