
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A toolkit for developing and integrating OpenClaw AI agents into your projects
A toolkit for developing and integrating OpenClaw AI agents into your projects. Build powerful, autonomous digital agents to automate tasks, manage data, and interact with other systems.
npm install claw-sdk
import { ClawClient } from 'claw-sdk';
const client = new ClawClient({
apiKey: 'your-api-key',
});
// Create an agent
const agent = await client.agents.create({
name: 'My Assistant',
description: 'A helpful AI agent',
model: 'openclaw-1',
instructions: 'You are a helpful assistant that answers questions.',
});
// Chat with the agent
const response = await client.agents.chat(agent.id, {
message: 'Hello! What can you do?',
});
console.log(response.message.content);
fetch// List all agents
const agents = await client.agents.list();
// Get a specific agent
const agent = await client.agents.get('agent-id');
// Update an agent
await client.agents.update('agent-id', {
instructions: 'Updated instructions',
});
// Start / Stop / Pause
await client.agents.start('agent-id');
await client.agents.stop('agent-id');
await client.agents.pause('agent-id');
// Delete an agent
await client.agents.delete('agent-id');
// Create a task
const task = await client.tasks.create({
agentId: 'agent-id',
name: 'Data Analysis',
description: 'Analyze the latest sales data',
priority: 'high',
input: { dataset: 'sales-q4' },
});
// Check task status
const status = await client.tasks.get(task.id);
console.log(status.status); // 'running' | 'completed' | 'failed'
// Get task result
const result = await client.tasks.getResult(task.id);
// List tasks by agent
const tasks = await client.tasks.list({ agentId: 'agent-id', status: 'completed' });
await client.streaming.streamChat('agent-id',
{ message: 'Tell me a story' },
{
onMessage: (event) => {
if (event.type === 'message.delta') {
process.stdout.write(event.data as string);
}
},
onComplete: () => console.log('\nDone!'),
onError: (err) => console.error('Error:', err),
}
);
// Create a data store
const store = await client.data.createStore({
name: 'user-preferences',
agentId: 'agent-id',
});
// Set and get values
await client.data.set(store.id, 'theme', 'dark');
const item = await client.data.get(store.id, 'theme');
// Query data
const results = await client.data.query(store.id, {
filter: { category: 'settings' },
sort: { field: 'createdAt', order: 'desc' },
limit: 10,
});
// Register a webhook
const webhook = await client.webhooks.create({
url: 'https://your-app.com/webhooks/claw',
events: ['task.completed', 'agent.error'],
});
// Verify incoming webhook payloads
const isValid = client.webhooks.verifySignature(
requestBody,
requestHeaders['x-claw-signature'],
webhook.secret,
);
const client = new ClawClient({
apiKey: 'your-api-key', // Required
baseUrl: 'https://api.openclaw.ai/v1', // Optional, default API endpoint
timeout: 30000, // Optional, request timeout in ms
maxRetries: 3, // Optional, retry count for failed requests
logLevel: 'info', // Optional: 'debug' | 'info' | 'warn' | 'error' | 'silent'
});
import { ClawClient, AuthenticationError, RateLimitError, NotFoundError } from 'claw-sdk';
try {
const agent = await client.agents.get('non-existent-id');
} catch (error) {
if (error instanceof AuthenticationError) {
console.error('Invalid API key');
} else if (error instanceof RateLimitError) {
console.error(`Rate limited. Retry after ${error.retryAfter}s`);
} else if (error instanceof NotFoundError) {
console.error('Agent not found');
}
}
MIT
FAQs
A toolkit for developing and integrating OpenClaw AI agents into your projects
We found that claw-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.