Contents
Overview
OOretz Agents are autonomous AI systems that can perform complex tasks on your behalf. They can control computers, browse the web, write code, and more.
Computer Agent
Control mouse, keyboard, files, and applications
Web Agent
Browse, interact, and extract from websites
Code Agent
Write, debug, test, and deploy code
Quick Start
1. Install the SDK
# JavaScript/TypeScript npm install @ooretz/agent-sdk # Python pip install ooretz
2. Initialize with your API key
import { OOretz } from '@ooretz/agent-sdk';
const ooretz = new OOretz({
apiKey: process.env.OORETZ_API_KEY
});3. Create and run an agent
// Create a web agent
const agent = await ooretz.agents.create({
name: 'My Web Scraper',
type: 'web'
});
// Run a task
const result = await agent.run({
task: 'Go to example.com and extract the main heading'
});
console.log(result.data);Computer Agent
The Computer Agent can control your desktop environment, execute commands, and interact with applications.
Available Actions
| Action | Description | Parameters |
|---|---|---|
| execute_command | Run a shell command | command: string |
| read_file | Read file contents | path: string |
| write_file | Write to a file | path, content: string |
| mouse_click | Click at coordinates | x, y: number |
| keyboard_type | Type text | text: string |
| take_screenshot | Capture screen | region?: object |
Example
const computer = await ooretz.agents.create({ type: 'computer' });
await computer.run({
task: "Open Terminal and create a new project folder",
steps: [
{ action: 'open_application', app: 'Terminal' },
{ action: 'keyboard_type', text: 'mkdir my-project && cd my-project' },
{ action: 'keyboard_press', key: 'Enter' }
]
});Web Agent
The Web Agent uses a headless browser to navigate websites and perform web automation tasks.
Configuration
const webAgent = await ooretz.agents.create({
type: 'web',
config: {
headless: true, // Run without visible browser
viewport: { width: 1920, height: 1080 },
timeout: 30000, // 30 second timeout
userAgent: 'custom', // Custom user agent
proxy: 'http://...', // Optional proxy
}
});Available Actions
| Action | Description |
|---|---|
| navigate | Go to a URL |
| click | Click an element by selector |
| fill | Fill a form field |
| extract | Extract data from elements |
| screenshot | Take a screenshot |
| evaluate | Execute JavaScript |
| wait | Wait for element/condition |
API Reference
Base URL: https://api.ooretz.space
/v1/agentsCreate a new agent
{
"name": "My Agent",
"type": "web",
"config": {...}
}/v1/agentsList all agents
/v1/agents/:idGet agent details
/v1/agents/:id/runRun an agent with a task
{
"task": "Your task description",
"parameters": {...},
"mode": "auto"
}/v1/agents/:id/runsGet agent run history
/v1/agents/:id/runs/:runIdGet specific run details and logs
/v1/agents/:id/runs/:runId/stopStop a running agent
/v1/agents/:idDelete an agent
Official SDKs
npm install @ooretz/agent-sdkpip install ooretzgo get github.com/ooretz/agent-gogem install ooretzWebhooks
Receive real-time notifications when agent tasks complete or encounter errors.
// Configure webhook in agent settings
const agent = await ooretz.agents.create({
type: 'web',
webhooks: {
onComplete: 'https://your-server.com/webhook/complete',
onError: 'https://your-server.com/webhook/error',
onStep: 'https://your-server.com/webhook/step' // Optional: each step
}
});
// Webhook payload
{
"event": "agent.run.completed",
"agentId": "agent_123",
"runId": "run_456",
"result": { ... },
"timestamp": "2024-01-15T10:30:00Z"
}