Quick Start

Get up and running with the AgenticWork SDK in minutes.

Basic Chat Completion

import { AgenticWork } from '@agentic-work/sdk';

const aw = new AgenticWork({
  apiEndpoint: 'https://api.agenticwork.io',
  authToken: process.env.AGENTICWORK_TOKEN
});

await aw.init();

const response = await aw.complete({
  model: 'gpt-4o',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'What is the capital of France?' }
  ]
});

console.log(response.choices[0].message.content);
// Output: The capital of France is Paris.

Streaming Responses

Using Tools

Creating an Agent

Agents automatically handle tool execution in a loop:

Direct Provider Access

Skip the platform and connect directly to providers:

Working with Flowise Workflows

Managing Workspaces

Checking Permissions

Error Handling

Next Steps

Last updated