Search documentation

Search documentation

Server SDKs

Pillar's server SDKs let you define tools that run on your backend instead of in the browser. When a user triggers a server tool through the co-pilot, Pillar Cloud sends a webhook to your server, your handler runs with full access to your database and APIs, and the result flows back to the conversation.

When to use server tools

Use server-side tools when the operation requires:

  • Database access — look up records, update state, run queries
  • Secret credentials — third-party API keys, payment processing
  • Business logic — pricing calculations, permission checks, data validation
  • Side effects — sending emails, creating invoices, provisioning resources

Use client-side tools when the operation is purely in the browser — navigating to a page, opening a modal, or copying text to the clipboard.

Client vs server tools

Client toolsServer tools
Where they runIn the user's browserOn your backend
Defined withusePillarTool / defineTool in frontend codedefineTool (TypeScript) or @pillar.tool() (Python)
Access toDOM, app state, routerDatabase, APIs, secrets
RegistrationCLI sync scans your frontend codeSDK registers via HTTP to Pillar Cloud
ConfirmationUser clicks a button in the panelConfirmationResponse renders a channel-appropriate UI
Tool typesnavigate, trigger_tool, query, inline_ui, etc.Single type — just an execute handler
FrameworkReact, Vue, Angular, Vanilla JSExpress, Fastify, Hono, Next.js, Django, Flask, FastAPI

How it works

  1. You define tools with defineTool (TypeScript) or @pillar.tool() (Python)
  2. The SDK registers your tools with Pillar Cloud on startup
  3. A user asks something like "Look up sarah@acme.com"
  4. Pillar Cloud matches the intent to your lookup_customer tool
  5. Pillar Cloud sends a signed webhook to your server
  6. Your execute handler runs and returns a result
  7. The result appears in the conversation

All webhook payloads are signed with HMAC-SHA256 so you can verify they come from Pillar. See Webhook Security for details.

Available SDKs

LanguagePackageInstall
TypeScript / Node.js@pillar-ai/servernpm install @pillar-ai/server
Pythonpillar-ai-serverpip install pillar-ai-server

Both SDKs have the same capabilities — tools, confirmations, signature verification, and framework adapters. Pick the one that matches your backend.

Next steps