Skip to main content
These are the three core building blocks you use to create AI automation in PLai Framework. Agents are the AI workers, Tools extend their capabilities, and Datasources provide them with knowledge.

Agents: Your AI Workers

An Agent is an AI assistant that performs specific tasks. Each agent has its own configuration, capabilities, and personality.

Agent Anatomy

AGENT = AI Model + Configuration + Tools + Datasources
  • AGENT: Support Bot
    • Model: Claude 3.5 Sonnet
    • Role: Answer customer Q’s
    • Tools:
      • Help Desk API
      • Email Tool
      • Knowledge Base Search
    • Datasources:
      • FAQ Database
      • Product Docs
      • Customer Guidelines
    • Guardrails:
      • No sensitive data
      • Max 2000 chars
      • Rate limit: 100/hour

Agent Configuration

When you create an agent, you configure:
  • Name: Unique identifier (e.g., “Support Bot”)
  • Description: What this agent does
  • Model: Which LLM to use (Claude, GPT-4, etc.)

Agent Capabilities


Tools: Extending Agent Power

A Tool is an external service or capability that an agent can use.

Tool Categories

Connect to REST APIs. Examples:
  • CRM systems (Salesforce, HubSpot)
  • Email services (Gmail, SendGrid)
  • Webhooks
  • Custom APIs
Use when: You need to integrate with external systems
Use Perplexity AI to search the web.Use when: Agent needs current information, recent events, or data outside your datasources
Automate web interactions and scraping.Use when: You need to navigate websites, extract data, or perform automated actions
Connect via Model Context Protocol. Advanced integrations with:
  • Custom protocols
  • Specialized services
  • Complex integrations
Use when: Building advanced, standardized integrations
Access external databases and datasources.Use when: Agent needs real-time data from databases or external systems

Tool Setup Process

1

Select Tool Type

Choose which type of tool you need (API, Web Search, Browser, etc.)
2

Configure Credentials

Provide authentication details (API keys, tokens, etc.)
3

Set Parameters

Define how the tool works (endpoints, methods, etc.)
4

Assign to Agent

Choose which agents can use this tool
5

Test

Verify the tool works correctly before production

Tool Credentials

All tools that need authentication use Credentials - securely stored API keys, tokens, and passwords.
  • ✅ Encrypted storage
  • ✅ Audit logged (who accessed what, when)
  • ✅ Scoped access (only agents you assign can use them)
  • ✅ Rotatable (update without recreating tools)
🔗 Learn more: Security & Compliance

Datasources: Agent Knowledge Bases

A Datasource is a collection of documents, files, or data that agents can search and reference.

Datasource Types

How Agents Use Datasources

Agent “FAQ Bot” needs to answer: “What are your hours?”
  1. Search in Datasources:
    • FAQ Database — found: “Hours: 9-5 EST”
    • Company Handbook — found: “Contact hours”
    • Website Content — found: “Support hours”
  2. Agent combines results and responds: “We’re open 9 AM to 5 PM EST, Monday-Friday”

Datasource Features

Search

Agents search datasources to find relevant information

Context

Information from datasources becomes part of agent context

Metadata

Tag and categorize documents for better search results

Versioning

Track changes and maintain document versions

Creating a Datasource

1

Create Datasource

Go to your project and create a new datasource
2

Choose Type

Select the datasource type (Files, URLs, Content, etc.)
3

Add Resources

Upload files, add URLs, or enter content
4

Add Metadata

Tag and categorize for better searching
5

Assign to Agents

Choose which agents can access this datasource

How They Work Together

Example: Customer Support Agent

  1. Customer query: “How do I reset my password?”
  2. Agent: Support Bot (Claude 3.5 Sonnet, support role) uses:
    • Tool: Help Desk API — send tickets
    • Datasource: FAQ Database — search for answer
  3. Response: “Click Settings → Security → Reset Password. Check your email for confirmation link.”

Example: Data Processing Agent

  1. Task: Process daily sales data
  2. Agent: Data Processor (Claude + Python execution) uses:
    • Tool: Agent Tool — transform data
    • Tool: Database API — load/save data
  3. Results:
    • Processed: 1,245 records
    • Valid: 1,200 (96.4%)
    • Invalid: 45 (3.6%)
    • Saved to database

Best Practices

One Agent = One Role

Each agent should have a clear, focused purpose

Organized Datasources

Group related documents in datasources, use metadata tags

Test Before Use

Test agent + tools + datasource combinations before production

Monitor Performance

Track agent accuracy, speed, and tool usage

Agent Naming Convention

Use descriptive names that indicate purpose and scope: Good names:
  • “Support Bot - FAQ”
  • “Data Processor - Daily Sales”
  • “Content Summarizer - Blog Posts”
  • “Lead Scorer - Sales Pipeline”
Poor names:
  • “Agent 1”
  • “Bot”
  • “Process”
  • “Tool”

Troubleshooting

Solutions:
  • Check datasource has the information
  • Review datasource metadata and tags
  • Verify agent has access to datasource
  • Improve search query or agent instructions
Solutions:
  • Verify credentials are correct
  • Check API endpoint is accessible
  • Review tool configuration
  • Check agent has permission to use tool
Solutions:
  • For Files: Re-upload the document
  • For URLs: Check website is accessible
  • For Content: Manually update entries
  • For Google Drive: Re-sync folder
Solutions:
  • Add correct information to datasource
  • Update agent system instructions
  • Remove conflicting datasources
  • Test with different prompts

Next Steps