AIOS Platform Documentation
Welcome to the AIOS Platform documentation. This guide will help you understand how to build, deploy, and manage AI agents using our platform.
AIOS Platform provides a comprehensive suite of tools and services for AI agent development, including multiple LLM support, smart LLM routing, agent memory service, and RAG (Retrieval-Augmented Generation) capabilities.
What is AIOS Platform?
AIOS (AI Agent Operating System) Platform is a cloud service that provides developers and enterprises with cloud-based agent hosting services. Developers can build agents based on AIOS APIs and deploy them to reach millions of users.
Key features include:
- Multiple LLM support (GPT-4, Claude, Llama, etc.)
- Smart LLM routing for optimal performance and cost efficiency
- Agent memory service for persistent context
- RAG service for enhanced knowledge retrieval
- One-click deployment and scaling
Quick Start
Get started with AIOS Platform in minutes. Follow these steps to create and deploy your first AI agent.
1. Install the AIOS SDK
# Using npm npm install @aios/sdk # Using yarn yarn add @aios/sdk # Using pip pip install aios-sdk
2. Initialize Your Agent
// JavaScript/TypeScript import { Agent } from '@aios/sdk'; const agent = new Agent({ name: 'My First Agent', description: 'A simple AI assistant', apiKey: 'your-api-key', defaultModel: 'gpt-4' });
3. Define Agent Behavior
// Define how your agent responds to user input agent.onMessage(async (message, context) => { const response = await agent.llm.generate({ prompt: message.content, systemPrompt: 'You are a helpful assistant.', maxTokens: 500 }); return { content: response.text }; });
4. Deploy Your Agent
// Deploy to AIOS Platform const deployment = await agent.deploy(); console.log(`Agent deployed: ${deployment.url}`);
Authentication
To use the AIOS Platform API, you need to authenticate your requests using an API key. You can generate an API key from your AIOS Platform dashboard.
API Key Authentication
Include your API key in the request headers:
// JavaScript example const response = await fetch('https://api.aiosplatform.com/v1/agents', { headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } });
# cURL example curl -X GET \ 'https://api.aiosplatform.com/v1/agents' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json'
Agent API
The Agent API allows you to create, manage, and deploy AI agents on the AIOS Platform.
Create an Agent
Create a new AI agent with the specified configuration.
Request Parameters
Parameter | Type | Description |
---|---|---|
name Required | string | The name of the agent |
description Optional | string | A description of the agent's purpose and capabilities |
defaultModel Required | string | The default LLM model to use (e.g., "gpt-4", "claude-2") |
systemPrompt Optional | string | The system prompt that defines the agent's behavior |
Example Request
POST /v1/agents Content-Type: application/json Authorization: Bearer YOUR_API_KEY { "name": "Customer Support Agent", "description": "An agent that handles customer support inquiries", "defaultModel": "gpt-4", "systemPrompt": "You are a helpful customer support agent for ACME Inc." }
Example Response
{ "id": "agt_123456789", "name": "Customer Support Agent", "description": "An agent that handles customer support inquiries", "defaultModel": "gpt-4", "systemPrompt": "You are a helpful customer support agent for ACME Inc.", "createdAt": "2025-05-04T12:34:56Z", "status": "created" }
Model API
The Model API allows you to interact with various LLM models supported by AIOS Platform.
Generate Text
Generate text using the specified LLM model.
Request Parameters
Parameter | Type | Description |
---|---|---|
prompt Required | string | The prompt to generate text from |
systemPrompt Optional | string | System instructions for the model |
maxTokens Optional | integer | Maximum number of tokens to generate (default: 1000) |
temperature Optional | float | Controls randomness (0-1, default: 0.7) |