Actions
Actions are the bridge between Pillar's co-pilot and your application. They represent things users can do—like navigating to a page, opening a modal, or triggering a workflow—and the co-pilot suggests them when relevant.
Why Actions Matter
Without actions, the co-pilot can only answer questions. With actions, it becomes an assistant that helps users do things:
| Without Actions | With Actions |
|---|---|
| "Here's how to invite a team member..." | "Here's how to invite a team member. [Invite Team Member]" |
| User reads instructions, navigates manually | User clicks the action, modal opens automatically |
Actions turn help content into executable guidance.
How It Works
Describe what each action does in natural language the AI can understand.
"How do I change my billing plan?"
The co-pilot finds your "Upgrade Plan" action based on semantic similarity.
Your handler runs—navigates to billing, opens the upgrade modal, whatever you defined.
Action Types
Pillar supports five action types for different use cases:
| Type | What It Does | Example |
|---|---|---|
navigate | Goes to a page in your app | Settings, dashboard, detail pages |
trigger_action | Runs your custom logic | Opens modals, starts wizards, toggles features |
inline_ui | Shows interactive UI in the chat | Confirmation forms, data previews |
external_link | Opens a URL in a new tab | Documentation, external resources |
copy_text | Copies text to clipboard | API keys, code snippets |
Auto-Run Behavior
Some actions run automatically without user confirmation:
navigateactions auto-run by default (just takes user to a page)external_linkactions auto-run (opens a new tab)trigger_actionrequires user confirmation (executes custom logic)
You can override this with the autoRun property on any action.
Data Extraction
Actions can define a dataSchema that tells the co-pilot what data to extract from the conversation:
{name: 'invite_member',dataSchema: {email: { type: 'string', description: 'Email address to invite' },role: { type: 'string', enum: ['admin', 'member', 'viewer'] },},}
When the action runs, your handler receives the extracted data:
onTask('invite_member', (data) => {// data.email and data.role are populated from the conversationinviteUser(data.email, data.role);});
Context Requirements
Actions can specify required context to only appear in relevant situations:
- An "Edit Project" action only appears when
context.projectIdis set - An "Admin Settings" action only appears when
context.userRole === 'admin'
This keeps suggestions relevant and prevents users from seeing actions they can't execute.
Composability with Plans
When users ask for help with complex tasks, the co-pilot automatically chains your actions into Plans—multi-step checklists that guide users through workflows.
You don't need to define these workflows explicitly. Just define focused, single-purpose actions, and the AI composes them as needed.
Next Steps
- Setting Up Actions — Step-by-step implementation guide
- Action Types Reference — Detailed specs for each type
- Plans — How actions combine into workflows