AgentsOS Documentation

Quick Start

Welcome to AgentsOS! This guide will help you get up and running in minutes.

Prerequisites:
  • Node.js 16+ or Python 3.9+
  • An AgentsOS account
  • Your API key

Installation

Install the AgentsOS SDK using npm or pip:

npm install @agentsos/sdk # or pip install agentsos-sdk

Creating Your First Agent

Here's a simple example to create and run your first agent:

const AgentsOS = require('@agentsos/sdk'); const agent = new AgentsOS.Agent({ name: 'MyFirstAgent', model: 'gpt-4', tools: ['web_search', 'calculator'] }); agent.run('What is 2+2?').then(result => { console.log(result); });

Agents

Agents are autonomous entities that can perceive their environment, make decisions, and take actions. In AgentsOS, agents are the building blocks of your intelligent systems.

Each agent has:

  • Model: The LLM backbone (GPT-4, Claude, etc.)
  • Tools: Actions the agent can take
  • Memory: State and context management
  • Goals: Objectives to accomplish

Orchestration

Orchestration is the coordination of multiple agents to work together toward a common goal. AgentsOS provides powerful orchestration primitives:

  • Sequential Execution: Agents run one after another
  • Parallel Execution: Multiple agents run simultaneously
  • Conditional Logic: Branching based on agent outputs
  • Error Handling: Graceful failure recovery

DAG Workflows

Directed Acyclic Graphs (DAGs) provide a powerful way to define complex workflows. Each node represents a task or agent, and edges represent dependencies.

const workflow = new AgentsOS.DAG(); const researched = workflow.addTask('research', researchAgent); const analyzed = workflow.addTask('analyze', analyzeAgent); const report = workflow.addTask('report', reportAgent); researched.connectTo(analyzed); analyzed.connectTo(report); await workflow.execute();

Agents API

The Agents API allows you to create, configure, and manage agents programmatically.

Create an Agent:

POST /api/v1/agents { "name": "MyAgent", "model": "gpt-4", "tools": ["web_search"] }

Workflows API

Create and manage DAG-based workflows through the REST API.

Events API

Subscribe to real-time events from your agents and workflows using WebSockets.

For more detailed documentation, visit our full documentation site.