HTTP client with retries
The transport wraps native fetch, applies auth headers, serializes query params, and maps response errors to typed SDK exceptions.
KeeperKit exposes a flat client for the most common operations and a namespaced client for the full module set. Both are backed by the same HTTP transport, retry policy, auth providers, and typed error model.
The main entry point is SDK/src/index.ts. It exports the client classes, helpers, models, module classes, and error types that developers need to build against the protocol.
| Category | Exports | What to use it for |
|---|---|---|
| Client | KeeperKit, createKeeperHubClient | Flat API or namespaced API access |
| Transport | KeeperKitHttpClient, HttpClientConfig | Custom transport integration or advanced control |
| Auth | ApiKeyAuth, OAuthBearerAuth, SessionAuth | Set up request headers for API key, OAuth, or cookie flows |
| Errors | KeeperKitError, AuthError, NotFoundError, RateLimitError, and more | Use precise instanceof checks for control flow |
| Helpers | createTriggerNode, createActionNode, templateRef, validateWorkflowGraph | Programmatically build and validate workflow graphs |
| Modules | WorkflowsModule, ExecutionsModule, DirectExecuteModule, and others | Advanced composition or direct access to the namespaced API |
The transport wraps native fetch, applies auth headers, serializes query params, and maps response errors to typed SDK exceptions.
Use the built-in auth providers to inject Authorization or Cookie headers without wiring them manually on every call.
GET requests retry automatically, while write methods only retry if you explicitly enable retryWrites.
Most developers should start with the flat API, then move to the namespaced modules for advanced tasks.
Use methods like listWorkflows, executeWorkflow, getExecution, and waitForExecution.
Access client.workflows.duplicate, client.integrations.test, client.chains.getAbi, and client.mcpSchemas.get.
import { KeeperKit, createKeeperHubClient } from "keeperkit";
const client = new KeeperKit({ apiKey: process.env.KEEPERHUB_API_KEY });
const full = createKeeperHubClient({ apiKey: process.env.KEEPERHUB_API_KEY });
const workflows = await client.listWorkflows();
const logs = await full.executions.getLogs("exec_123");
const abi = await full.chains.getAbi(1, "0xContractAddress");
Every failure extends KeeperKitError, which carries status, code, body, and retryability metadata.
The SDK exports workflow, execution, integration, chain, payment, and schema types so consuming projects can stay strongly typed end to end.