> ## Documentation Index
> Fetch the complete documentation index at: https://docs.darwin.so/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript SDK

> Manage a Connect application and operate linked agents from a trusted JavaScript backend.

Use `@darwinso/sdk` on a trusted Node.js backend. The generated client follows the combined API Reference, including application resources and Product API resources.

```bash theme={null}
npm install @darwinso/sdk
```

Use an application credential for application management, ephemeral goals, application balance, and webhooks. Create a separate client instance with the user's OAuth access token when operating a linked agent.

Never send an application secret or user refresh token to browser code. Keep each user token bound to the application session and linked-agent grant that produced it.

```typescript theme={null}
import { DarwinClient } from '@darwinso/sdk';

const connect = new DarwinClient({
  token: process.env.DARWIN_CONNECT_TOKEN!,
});
```

The SDK uses goals—not tasks—as the canonical durable-work resource. Deprecated task methods exist only for older integrations.

<Card title="API Reference" href="/reference/introduction">
  Browse generated Connect and Product operations.
</Card>
