Agents

Overview

Agents are the core building blocks of your AI-powered applications. This guide will walk you through creating, configuring, and managing agents.

Creating Your First Agent

Via Dashboard

  1. Log in to oblien.com
  2. Navigate to the Agents section
  3. Click New Agent or Create Agent button
  4. Fill in the required information:
    • Name: A descriptive name for your agent
    • Description: Brief explanation of the agent's purpose
    • Collections (optional): Organize agents into collections
  5. Click Create

After creation:

  • Your agent is created with a unique Agent ID
  • Copy the Agent ID - you'll need it to integrate

Agent ID Format: agent-xxx or a unique identifier shown in the agent details

Via API

You can also create agents programmatically using the API:

curl -X POST https://api.oblien.com/ai/agents/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support Agent",
    "description": "Handles customer inquiries and support tickets",
    "prompts": {
      "identity": "You are a helpful customer support agent..."
    },
    "collectionIds": ["collection-id-123"]
  }'

Getting Your Agent ID

After creating an agent, you need its Agent ID to integrate it into your app.

Where to Find Agent ID

  1. Go to your dashboard
  2. Click on your agent
  3. Look for Agent ID in the agent details
  4. Copy the ID (format: agent-xxx or unique identifier)

You'll use this Agent ID when creating sessions with the Core SDK.

API Credentials (Required for Integration)

To use your agent in your application, you need API credentials.

Create API Credentials

  1. Go to oblien.com/dashboard
  2. Navigate to Settings (or Developer section)
  3. Click API Credentials or Create API Key
  4. Give it a name (e.g., "Production API Key")
  5. Click Create

You'll receive:

  • Client ID - Format: oblien_xxx...
  • Client Secret - Format: sk_xxx...

⚠️ Important:

  • Copy the Client Secret immediately - it's only shown once
  • Store both securely - never commit to git
  • Use environment variables in your code

Example Credentials

# .env file
OBLIEN_API_KEY=oblien_a1b2c3d4e5f6g7h8i9j0...
OBLIEN_API_SECRET=sk_x1y2z3a4b5c6d7e8f9...

What You Need to Integrate

For integration, you need 3 things:

  1. Client ID (oblien_xxx) - From API credentials
  2. Client Secret (sk_xxx) - From API credentials
  3. Agent ID (agent-xxx or unique ID) - From your agent

See Integration Guide for using these credentials.

Agent Configuration

Basic Settings

Each agent has the following core properties:

  • Name: Display name of the agent
  • Description: Purpose and capabilities description
  • Status: Active or inactive state
  • Agent ID: Unique identifier (auto-generated)
  • Collections: Organizational groupings

Agent Instructions

Instructions (prompts) define your agent's behavior, personality, and capabilities. See Agent Instructions for detailed configuration.

# Identity
You are a professional customer support agent specializing in technical support.

# Capabilities
- Answer product questions
- Troubleshoot technical issues
- Escalate complex problems

# Guidelines
- Always be polite and professional
- Ask clarifying questions when needed
- Provide step-by-step solutions

Agent Collections

Collections help organize your agents into logical groups:

Creating Collections

// Create a new collection
const collection = await request('ai/collections/create', {
  name: 'Customer Support',
  description: 'All customer-facing support agents'
}, 'POST');

Benefits of Collections

  • Organization: Group related agents together
  • Access Control: Manage permissions at collection level
  • Batch Operations: Perform operations on multiple agents
  • Filtering: Quickly find agents by collection

Agent Status

Active vs Inactive

  • Active: Agent can receive and respond to messages
  • Inactive: Agent is paused and won't process requests

Toggle agent status:

// Toggle agent status
await request(`ai/agents/${agentId}`, {
  isActive: true
}, 'PUT');

Duplicating Agents

Create copies of existing agents with all their configurations:

const duplicateAgent = async (sourceAgent) => {
  const payload = {
    name: `${sourceAgent.name} (Copy)`,
    description: sourceAgent.description,
    prompts: sourceAgent.prompts,
    collectionIds: sourceAgent.collections.map(c => c.id)
  };
  
  return await request('ai/agents/create', payload, 'POST');
};

Agent Metadata

Agents include metadata for tracking and analytics:

interface Agent {
  id: string;
  name: string;
  description: string;
  prompts: string | object;
  isActive: boolean;
  collections: Collection[];
  createdAt: string;
  updatedAt: string;
  // ... additional fields
}

Best Practices

Naming Conventions

  • Use descriptive, purpose-driven names
  • Include the domain or use case (e.g., "Sales Assistant", "Technical Support")
  • Avoid generic names like "Agent 1" or "Test Agent"

Organization

  • Create collections before adding many agents
  • Use consistent naming across related agents
  • Group agents by function, team, or customer segment

Testing

  • Start with inactive agents during development
  • Test thoroughly before activating for production
  • Use separate collections for staging and production agents

Security

  • Review agent instructions regularly
  • Monitor agent activity and requests
  • Implement proper access controls via collections
  • Rotate API keys periodically

Deleting Agents

Deleting an agent is permanent and cannot be undone. All associated data, sessions, and history will be lost.

// Delete an agent
await request(`ai/agents/${agentId}`, {}, 'DELETE');

Next Steps