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
- User types question
- Agent streams response
- User sees real-time answer
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
- Invoke agent (tool/workflow/API)
- Agent processes
- Returns complete response
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.- Create — set up agent basics (name, description)
- Configure
- Add system instructions
- Select model
- Connect datasources
- Add tools
- Set guardrails
- Deploy
- If streaming: Enable chat in PLai
- If non-streaming: Use in workflows/API
- Monitor
- View conversations (streaming)
- Track performance metrics
- Review analytics
- 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?- Configure an Agent - Learn all configuration options
- Understand Chat Mode - Interactive conversations
- Understand Structured Output - Automation & integration
- View Agent Analytics - Monitor performance
- Create Your First Agent - Step-by-step tutorial
- Agent Analytics - Track conversations and performance
- Use Tools & Datasources - Extend capabilities