Creating Agents
Paal AI enables users to create custom agents to enhance workflows, automate tasks, and integrate external systems. Agents can be REST API agents, knowledge-based agents, or IoT (MQTT) agents. This documentation provides a comprehensive guide to creating and deploying agents.
Types of Agents
1. REST API Agent
Purpose: Integrate external APIs to execute custom actions or automate workflows.
Examples: CRM integration, stock price fetching, email automation.
2. Knowledge Base Agent
Purpose: Store and retrieve data from documents, audio, or videos to generate responses.
Examples: Summarize uploaded documents, answer queries from uploaded datasets.
3. IoT (MQTT) Agent
Purpose: Interact with IoT devices for real-time data collection and control.
Examples: Manage smart devices, monitor environmental conditions.
Steps to Create an Agent
Step 1: Choose Agent Type
Navigate to "Create Agent".
Select the agent type:
REST API Agent: Integrate external APIs.
Knowledge Base Agent: Use uploaded data to create a responsive agent.
IoT (MQTT) Agent: Set up for IoT device interaction.
Click Next to proceed.
Step 2: Configure Basic Agent Details
Agent Name:
Assign a descriptive name (e.g., "Stock Price Fetcher").
Agent Icon:
Upload an image to represent the agent visually.
Agent Type:
Select from Chat Agent or File Agent based on the agent's purpose.
Agent Category:
Assign a category for organization (e.g., Finance, Health, Data Analytics).
Description:
Briefly describe what the agent does (e.g., "Fetches stock prices via API").
Conversation Starters:
Add sample prompts or commands to guide user interaction (e.g., âFetch the latest BTC priceâ).
Step 3: Configurations
For REST API Agents
Operation ID:
Define the action the agent will perform.
Keys and Authentication:
Add required fields such as API keys, tokens, headers, or query parameters.
Specify if the fields are required or should be masked for security.
OpenAPI Schema:
Import schema details from a URL or upload a JSON file to define API endpoints and capabilities.
For Knowledge Base Agents
Upload Knowledge Files:
Add documents, videos, or audio files.
Supported formats: PDF, TXT, DOCX, MP4, MP3, and more.
Knowledge Scope:
Define whether the uploaded content will be global or specific to the agent.
Privacy Policy:
Add terms to ensure data privacy compliance.
For IoT (MQTT) Agents
Configure MQTT Credentials:
Set up broker details and credentials for device communication.
Topics:
Define MQTT topics for publishing or subscribing to device data.
Schema:
Add a schema to specify device interactions (e.g., set temperature, turn on lights).
Step 4: Advanced Settings
Configurations Fields:
Add custom fields like API endpoints, environment variables, or user-defined parameters.
Scope:
Choose whether the configuration is creator-defined or user-specific.
Error Handling:
Add fallback actions for scenarios where the agent cannot complete a task.
Step 5: Test and Deploy
Test:
Validate the agent using sample prompts or API calls.
Adjust configurations if necessary.
Deploy:
Click Deploy to make the agent available in the My Agents section.
Post-Deployment Actions:
Assign the agent to workflows or integrate it using its unique Agent ID.
Examples of Agents
REST API Agent Example
Name: "Stock Price Fetcher"
Use Case:
Fetch stock prices from a financial API.
Combine data with LLM prompts to generate daily financial insights.
Workflow:
Trigger: Daily at 9 AM (Cron Schedule).
Fetch stock data via the agent.
Use LLM to format insights and send via email.
Knowledge Base Agent Example
Name: "Legal Document Analyzer"
Use Case:
Summarize and analyze uploaded legal documents.
Workflow:
Upload PDFs or Word files to the agent.
Query the agent for summaries or specific clauses.
IoT (MQTT) Agent Example
Name: "Smart Light Controller"
Use Case:
Manage smart lights in a home automation setup.
Workflow:
Trigger: Based on sunset time (API or Cron).
Publish a "turn on lights" command to MQTT broker.
Confirm via a status update.
FAQs
1. Can I combine multiple agents in one workflow?
Yes, agents can be combined using the Agents Flow Builder to create complex workflows.
2. How secure is the data uploaded to knowledge base agents?
All uploaded data is encrypted, and sensitive data can be masked or restricted using privacy policies.
3. Can I modify an agent after deployment?
Yes, agents can be unpublished, modified, and redeployed as needed.
4. How do I integrate agents with external applications?
Use the agent's unique Agent ID for API-based integrations or link it in workflows.
Last updated