Skip to Content
Overview

Welcome to Computer Agents

Computer Agents is a platform for executing AI-powered agents in isolated cloud environments. Build agents that can write code, execute commands, and manage files with real-time streaming support.

What You Can Build

  • Coding Assistants - Agents that write, test, and debug code automatically
  • Automation Pipelines - Multi-step workflows for complex tasks
  • Code Review Bots - Automated PR review and suggestions
  • Documentation Generators - Auto-generate docs from code
  • Development Tools - Custom tooling powered by AI

Two Ways to Build

TypeScript SDK

The recommended way to integrate Computer Agents:

import { ComputerAgentsClient } from 'computer-agents'; const client = new ComputerAgentsClient({ apiKey: process.env.COMPUTER_AGENTS_API_KEY }); // Execute a task with streaming const result = await client.run('Create a REST API with Express', { environmentId: 'env_xxx', onEvent: (event) => { if (event.type === 'response.item.completed') { console.log('Progress:', event.item.type); } } }); console.log(result.content);

View SDK Guide →

REST API

Direct HTTP access for any language:

curl -X POST https://api.computer-agents.com/v1/threads \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [{ "role": "user", "content": "Create a hello.py file" }], "stream": true }'

View API Reference →

Core Concepts

Environments

Isolated execution contexts with their own file systems, environment variables, and configurations.

const env = await client.environments.create({ name: 'my-project', internetAccess: true, environmentVariables: [ { key: 'NODE_ENV', value: 'development' } ] });

Threads

Persistent conversation contexts that maintain state across multiple executions.

// First task const r1 = await client.run('Create a Node.js project', { environmentId: env.id }); // Continue the conversation const r2 = await client.run('Add Express server', { environmentId: env.id, threadId: r1.threadId // Same thread! });

Real-time Streaming

Get progress updates as agents work with Server-Sent Events:

const result = await client.run('Build a complex feature', { environmentId: env.id, onEvent: (event) => { switch (event.type) { case 'response.started': console.log('Started processing...'); break; case 'response.item.completed': console.log('Completed:', event.item.type); break; case 'stream.completed': console.log('Tokens:', event.run.tokens); break; } } });

Key Features

FeatureDescription
SSE StreamingReal-time progress updates during execution
Multi-turn ConversationsThread-based sessions with context preservation
File ManagementUpload, download, and manage files in environments
Subscription PlansTiered Compute Token allowances
Git IntegrationCommit and push changes automatically
Scheduled TasksAutomate recurring agent operations

Documentation Structure

Getting Help

Last updated on