The Simple AI SDK (@simple-ai-lab/sdk) is a typed TypeScript client for the Simple AI API. It works in two places:
- Inside code actions — bundled when you save and authenticated automatically; just import it.
- In your own applications — install it from npm and authenticate with an API key.
- In an Agent repository — define action-first agents and publish them with the
simple CLI.
Inside a Code Action
No installation or keys are needed. Simple bundles the SDK when you save the Action, and the handler’s client is ready to use:
In Your Own Application
Create an API key in the dashboard under Settings → API Keys (/organization/settings/api-keys), then:
Error Handling
Every non-2xx API response throws a SimpleAIError with the HTTP status, a machine-readable code when available, and the parsed response body:
What’s Included Today
client.data — full custom data access: query, records, bulk upserts, and tables
defineAction — typed code-action handlers, including steering the conversation to another node
defineAgent — typed Agent v2 graphs, settings, prompts, extraction schemas, and resource references
action.* — HTTP, code, custom-data, and knowledge-base Actions
simple CLI — pull, typecheck, diff, and publish an Agent branch
Last modified on September 3, 2026