@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
simpleCLI.
Inside a Code Action
No installation or keys are needed. Simple bundles the SDK when you save the Action, and the handler’sclient is ready to use:
In Your Own Application
Error Handling
Every non-2xx API response throws aSimpleAIError 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 tablesdefineAction— typed code-action handlers, including steering the conversation to another nodedefineAgent— typed Agent v2 graphs, settings, prompts, extraction schemas, and resource referencesaction.*— HTTP, code, custom-data, and knowledge-base ActionssimpleCLI — pull, typecheck, diff, and publish an Agent branch