Skip to main content
An Agent is an AI assistant you create and configure to perform specific tasks. Agents can chat with users, use tools, access knowledge bases, and integrate into workflows.

Core Concept

Agent = AI Model + Configuration + Tools + Datasources + Safety Rules Your agent is made up of:
  • LLM Model (Claude, GPT-4)
  • System Instructions
  • Tools & Integrations
  • Knowledge Bases
  • Safety Guardrails

Agent Capabilities

Every agent can:

Understand

Process natural language and context

Access Tools

Call APIs, search web, execute code

Reference Knowledge

Query datasources and knowledge bases

Follow Rules

Apply guardrails and safety filters

Two Ways to Use Agents

Agents can be used in two fundamentally different ways:

1. Streaming Enabled: Conversational Chat

Use case: Chat interface, interactive conversations. Chat Conversational:
  • Real-time streaming
  • Interactive chat UI
  • Conversation history
  • Multiple agent tabs
  • Best for: User interaction
Flow:
  1. User types question
  2. Agent streams response
  3. User sees real-time answer
When to use: Customer support chatbots, conversational assistants, interactive Q&A 🔗 Read more: Conversational Chat

2. Streaming Disabled: Structured Output

Use case: Structured responses, integrations, automation. Structured Output:
  • Complete JSON response
  • As tools in other agents
  • In workflows
  • Via API calls
  • Best for: Automation
Flow:
  1. Invoke agent (tool/workflow/API)
  2. Agent processes
  3. Returns complete response
When to use: Data processing, API integrations, workflow automation, batch processing 🔗 Read more: Structured Output

Quick Comparison


How Agents Work

Step-by-Step Process

1

Configuration

You set up the agent with instructions, model, tools, and datasources
2

Invocation

User or system calls the agent (via chat, API, workflow, or as a tool)
3

Processing

Agent receives input, accesses knowledge, calls tools if needed
4

Response

Agent returns streamed (chat) or structured (output) response

Example: Customer Support Agent

  • Configuration:
    • Name: “Support Bot”
    • Model: Claude 3.5 Sonnet
    • System Instructions: “Help customers with product issues”
    • Datasources: FAQ database, product docs
    • Tools: Help desk API, email
    • Guardrails: No sensitive data exposure
  • Invocation (via Chat):
    • Customer: “How do I reset my password?”
    • Agent: (Searches FAQ) “Found answer…”
    • Agent: (Streams response) “You can reset by…”
    • Result: Customer sees real-time answer
  • Invocation (as Tool in Workflow):
    • Workflow receives customer message
    • Calls Support Bot as tool
    • Gets complete response (JSON)
    • Workflow routes to escalation if needed

Key Concepts

Agent Versions

Agents can have multiple versions. Switch between versions to:
  • Test new configurations
  • A/B test different prompts
  • Roll back to previous behavior
  • Maintain history

Agent Slug

A unique, URL-friendly identifier for your agent (e.g., support_bot). Used in:
  • API calls: /agents/{slug}
  • Workflows: Reference the agent
  • Tools: Invoke agent by slug

Prompt/System Instructions

The base personality and behavior of your agent. Example:

Datasources & Tools

  • Datasources - Knowledge the agent can search (FAQs, docs, databases)
  • Tools - Actions the agent can take (send email, call API, etc.)

Agent Lifecycle

The agent lifecycle moves through five stages: Create, Configure, Deploy, Monitor, Improve.
  1. Create — set up agent basics (name, description)
  2. Configure
    • Add system instructions
    • Select model
    • Connect datasources
    • Add tools
    • Set guardrails
  3. Deploy
    • If streaming: Enable chat in PLai
    • If non-streaming: Use in workflows/API
  4. Monitor
    • View conversations (streaming)
    • Track performance metrics
    • Review analytics
  5. Improve
    • Optimize prompts
    • Update datasources
    • Adjust configuration

Common Use Cases

Customer Support

Streaming chat agent to handle customer inquiries 24/7

Data Processing

Non-streaming agent in workflow to transform data

Content Generation

Streaming agent to generate marketing content interactively

API Integration

Non-streaming agent to fetch and process external data

Code Analysis

Streaming agent to explain and review code snippets

Batch Processing

Non-streaming agent in workflow to process 1000s of records

Next Steps

Ready to create an agent?
  1. Configure an Agent - Learn all configuration options
  2. Understand Chat Mode - Interactive conversations
  3. Understand Structured Output - Automation & integration
  4. View Agent Analytics - Monitor performance
Or jump to: