ConfigureClient
The main entry point for the Configure TypeScript SDK. Creates module instances for authentication, profile management, tool operations, and storage access.
This section documents SDK methods and types. The endpoint-by-endpoint wire contract is separately navigable as the API Reference.
Import
typescript
import { ConfigureClient } from 'configure';Constructor
typescript
new ConfigureClient(apiKeyOrOptions?: string | ConfigureClientOptions, options?: ConfigureClientOptions)Creates a new ConfigureClient instance.
If apiKey is omitted, the SDK reads from the CONFIGURE_API_KEY environment variable.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
apiKeyOrOptions | string | ConfigureClientOptions | No | Your Configure API key (sk_... or pk_...), or an options object. Falls back to CONFIGURE_API_KEY env var. |
options | ConfigureClientOptions | No | Client configuration options (only when first argument is a string). |
Options
| Name | Type | Default | Description |
|---|---|---|---|
apiKey | string | CONFIGURE_API_KEY | API key when using an options object. |
baseUrl | string | https://api.configure.dev | API base URL. Also reads from CONFIGURE_BASE_URL env var. |
agent | string | CONFIGURE_AGENT | Agent slug. Required when the key's developer account has more than one agent. |
userId | string | undefined | External user ID. Sends X-User-Id for unlinked server-side profiles. Requires sk_... for API access. |
timeout | number | undefined | Request timeout in milliseconds. |
fetch | typeof fetch | globalThis.fetch | Custom fetch implementation for environments without native fetch. |
Example
typescript
// Reads API key from CONFIGURE_API_KEY env var
const client = new ConfigureClient();
// Server-side — secret key (full API access)
const client = new ConfigureClient('sk_your_api_key');
// Client-side — publishable key (auth, profile reads, tool connections)
const client = new ConfigureClient('pk_your_publishable_key');
// Options object as first argument
const client = new ConfigureClient({
apiKey: 'sk_your_api_key',
agent: 'my-agent',
baseUrl: 'https://api.configure.dev',
userId: 'user_123',
});
// String API key + options object
const client = new ConfigureClient('sk_your_api_key', {
baseUrl: 'https://api.configure.dev',
timeout: 30000,
});Module Access
All SDK functionality is accessed through module properties on the client instance.
| Module | Property | Description |
|---|---|---|
| Auth | client.auth | OTP authentication (send/verify). |
| Profile | client.profile | User profile CRUD, memories, ingestion, agent kit composition, storage access. |
| Tools | client.tools | Tool connections and live search/action operations. |
| Self | client.self | Agent's own storage filesystem (API key only, no user token). |
API Reference
Use the API Reference for direct clients in languages without an official SDK and for validating agent-generated integrations. The OpenAPI contract is published at openapi.yaml.
Factory Methods
peer
typescript
client.peer(name: string): PeerModuleReturns a PeerModule for read-only access to another agent's storage. Permission-gated by the target agent's /permissions node.
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Target agent's name (e.g., 'wealthbot'). |
typescript
const soul = await client.peer('wealthbot').read('/soul/soul.md');