Skip to content

Agents

Agents are the core unit of organization in Uranus. Each agent is an isolated AI-powered entity with its own configuration, state, and capabilities.

Overview

An agent represents:

  • A distinct AI persona with specific capabilities
  • Isolated state and configuration
  • Dedicated Durable Object instance
  • Scoped access to workflows, schedules, and data

Creating an Agent

Via Dashboard

  1. Navigate to the main dashboard
  2. Click Create Agent
  3. Fill in the details:
    • Name - Unique identifier
    • Description - Purpose of the agent
  4. Configure initial settings

Via API

bash
curl -X POST https://your-domain.com/api/agents \
  -H "Content-Type: application/json" \
  -d '{
    "name": "support-bot",
    "description": "Customer support automation agent"
  }'

Agent Configuration

LLM Settings

Configure the AI model powering your agent:

SettingDescriptionDefault
llm_providerAI provider (workers-ai, openai, anthropic)workers-ai
llm_modelModel name@cf/meta/llama-3.1-8b-instruct
llm_temperatureResponse creativity (0-1)0.7
llm_max_tokensMaximum response length2048
llm_system_promptAgent behavior instructions(default prompt)

Calendar Settings

SettingDescriptionDefault
calendar_timezoneAgent timezoneUTC
calendar_working_hours_startWorking hours start09:00
calendar_working_hours_endWorking hours end17:00
calendar_default_durationDefault task duration (minutes)30

Workflow Settings

SettingDescriptionDefault
workflow_max_concurrentMax parallel workflows5
workflow_default_timeoutTimeout in seconds300
workflow_retry_attemptsRetry count on failure3
workflow_retry_delayDelay between retries (seconds)60

Browser Settings

SettingDescriptionDefault
browser_headlessRun without UItrue
browser_viewport_widthBrowser width1280
browser_viewport_heightBrowser height720
browser_user_agentCustom user agent(browser default)
browser_default_timeoutAction timeout (ms)30000

Agent State

Each agent maintains persistent state:

typescript
interface AgentState {
  config: {
    name: string
    description: string
    model: string
    temperature: number
  }
  connectedClients: number
  mcpServers: MCPServer[]
  pendingSchedules: Schedule[]
}

Viewing State

Access the State page in the dashboard to:

  • View current configuration
  • Monitor connected clients
  • See active MCP servers
  • Review pending schedules

Updating State

State updates are synchronized across all connected clients via WebSocket.

Access Control

Roles

RolePermissions
OwnerFull access, can delete agent
AdminFull access, cannot delete
ViewerRead-only access

Managing Access

bash
# Add an admin
curl -X POST https://your-domain.com/api/agents/{id}/admins \
  -d '{"email": "user@example.com", "role": "admin"}'

Default Agent

A special default agent is always available:

  • Accessible without authentication
  • Used for initial setup
  • Cannot be deleted

Agent Isolation

Each agent is fully isolated:

┌─────────────────────────────────────────────┐
│                System                        │
├──────────────┬──────────────┬───────────────┤
│   Agent A    │   Agent B    │   Agent C     │
│              │              │               │
│  Workflows   │  Workflows   │  Workflows    │
│  Schedules   │  Schedules   │  Schedules    │
│  Contacts    │  Contacts    │  Contacts     │
│  Chat        │  Chat        │  Chat         │
│  Browser     │  Browser     │  Browser      │
│  Sources     │  Sources     │  Sources      │
│              │              │               │
│  ═══════════ │ ═══════════  │ ═══════════   │
│  Durable Obj │ Durable Obj  │ Durable Obj   │
└──────────────┴──────────────┴───────────────┘

Multi-Agent Communication

Agents can communicate via Agent Connections:

typescript
// Create connection between agents
const connection = {
  source_agent_id: 'agent-a',
  target_agent_id: 'agent-b',
  connection_type: 'webhook',
  config: {
    url: 'https://...',
    events: ['workflow.complete', 'message.received']
  }
}

Best Practices

1. Single Responsibility

Create focused agents for specific tasks:

  • support-bot - Customer support
  • data-processor - ETL workflows
  • social-manager - Social media automation

2. Environment Separation

Use different agents for:

  • Development/testing
  • Staging
  • Production

3. System Prompts

Write clear, specific system prompts:

You are a customer support agent for Acme Corp.
Your responsibilities:
- Answer product questions
- Help with order issues
- Escalate complex cases to humans

Always be polite and professional.
Never make promises you can't keep.

4. Resource Limits

Configure appropriate limits:

  • Set realistic workflow_max_concurrent
  • Use reasonable browser_default_timeout
  • Monitor quota usage

API Reference

See Agents API for complete endpoint documentation.

Released under the MIT License.