agentcloudservice
v1.0.0
Published
AgentCloudService SDK - Cloud hosting for autonomous AI agents
Maintainers
Readme
ACS SDK for Node.js
Official Node.js/TypeScript SDK for AgentCloudService - Cloud hosting for autonomous AI agents.
Installation
npm install @acs/sdk
# or
yarn add @acs/sdk
# or
pnpm add @acs/sdkQuick Start
import { ACS } from '@acs/sdk';
// Register a new agent (no auth required)
const result = await ACS.register({ name: 'my-research-agent' });
console.log(`API Key: ${result.apiKey}`);
// Create client with API key
const client = new ACS({ apiKey: result.apiKey });
// Deploy an OpenClaw agent
const agent = await client.deploy({
name: 'research-agent',
type: 'openclaw',
config: {
model: 'claude-sonnet-4',
channels: ['telegram', 'discord'],
skills: ['web_search', 'coding']
},
region: 'us-east-1'
});
console.log(`Agent deployed: ${agent.url}`);Features
- TypeScript First - Full type definitions included
- No CAPTCHA, No Phone Verification - Just API keys and code
- OpenClaw Native - Deploy pre-configured AI agents
- ESM & CommonJS - Works with any module system
- Zero Dependencies - Uses native fetch
Authentication
import { ACS } from '@acs/sdk';
// Option 1: Pass API key directly
const client = new ACS({ apiKey: 'acs_live_xxx' });
// Option 2: Use environment variable
// export ACS_API_KEY=acs_live_xxx
const client = new ACS();API Reference
Registration (No Auth Required)
// Register new agent
const result = await ACS.register({
name: 'my-agent',
email: '[email protected]', // Optional
wallet: '0x...' // Optional, for USDC payments
});
console.log(result.agentId);
console.log(result.apiKey);
// Check service status
const status = await ACS.status();
console.log(status);Agent Management
const client = new ACS({ apiKey: 'acs_live_xxx' });
// List all agents
const agents = await client.listAgents();
for (const agent of agents) {
console.log(`${agent.name}: ${agent.status}`);
}
// List running agents only
const running = await client.listAgents('running');
// Get specific agent
const agent = await client.getAgent('agent_xxx');
// Start/stop agent
await client.startAgent('agent_xxx');
await client.stopAgent('agent_xxx');
// Delete agent
await client.deleteAgent('agent_xxx');Deployment
// Deploy OpenClaw agent
const agent = await client.deploy({
name: 'my-agent',
type: 'openclaw',
config: {
model: 'claude-sonnet-4',
channels: ['telegram', 'discord', 'slack'],
skills: ['web_search', 'coding', 'browser'],
memory: true
},
region: 'us-east-1'
});
// Deploy Docker container
const agent = await client.deploy({
name: 'custom-agent',
type: 'docker',
config: {
image: 'my-org/my-agent:latest',
env: { API_KEY: 'xxx' }
}
});
// Deploy serverless function
const agent = await client.deploy({
name: 'webhook-handler',
type: 'function',
config: {
runtime: 'nodejs20',
handler: 'index.handler'
}
});Usage & Billing
// Get usage metrics
const usage = await client.getUsage();
console.log(`Requests (24h): ${usage.requests24h}`);
console.log(`Compute used: ${usage.computeUsed} GB`);
console.log(`Current bill: $${usage.currentBill}`);
// Get billing info
const billing = await client.getBilling();
// Create checkout session
const checkout = await client.checkout('micro');
console.log(`Checkout URL: ${checkout.checkoutUrl}`);
// Pay with USDC
const payment = await client.payUsdc('19.00');Regions
| Region | Location |
|--------|----------|
| us-east-1 | US East (Virginia) |
| us-west-2 | US West (Oregon) |
| eu-west-1 | EU West (Ireland) |
| eu-central-1 | EU Central (Frankfurt) |
| ap-southeast-1 | Asia Pacific (Singapore) |
| ap-southeast-2 | Asia Pacific (Sydney) |
Error Handling
import { ACS, ACSError, AuthenticationError, ValidationError } from '@acs/sdk';
try {
const client = new ACS({ apiKey: 'invalid' });
const agents = await client.listAgents();
} catch (error) {
if (error instanceof AuthenticationError) {
console.log('Invalid API key');
} else if (error instanceof ValidationError) {
console.log(`Validation failed: ${error.message}`);
} else if (error instanceof ACSError) {
console.log(`API error: ${error.message} (status: ${error.statusCode})`);
}
}Links
License
MIT License - Copyright (c) 2026 VibeCaaS / NeuralQuantum.ai LLC
