Build AI agents in PromptOwl - simple prompts, sequential workflows, and multi-agent supervisors with RAG knowledge retrieval and citations.
This comprehensive guide explains how to build AI agents in PromptOwl, including the different agent types, how knowledge retrieval (RAG) works, version management, and citation systems.
In PromptOwl, an "agent" is an AI-powered prompt that can answer questions, perform tasks, and retrieve information from your documents. Agents come in three types:
Type
Best For
Complexity
Simple
Single-purpose tasks, Q&A
Low
Sequential
Multi-step workflows
Medium
Supervisor
Complex multi-agent orchestration
High
Choosing the Right Agent Type
Simple Agents
Simple agents are the foundation of PromptOwl. They consist of a single system context that defines the AI's behavior.
Need to answer questions from documents?
→ Simple Agent with RAG
Need to process in stages (research → analyze → format)?
→ Sequential Agent
Need multiple specialists working together?
→ Supervisor Agent
You are a helpful customer support agent for [Company Name].
Your role:
- Answer questions about our products and services
- Help users troubleshoot common issues
- Escalate complex problems to human support
Guidelines:
- Be friendly and professional
- Only answer based on the provided knowledge base
- If you don't know something, say so honestly
- Never make up information
You are a support agent. Use this knowledge base to answer questions:
{knowledge_base}
Only answer based on the information provided above.
Block 1 (key: research)
Output: "Key findings about market trends..."
Block 2 prompt:
"Analyze the following research: {{research}}"
Becomes: "Analyze the following research: Key findings about market trends..."
┌─────────────────────────────────────────────┐
│ User Query │
└──────────────────────┬──────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Block 1: Research │
│ Model: GPT-4 | Dataset: Research Docs │
│ Output saved as {{research}} │
└──────────────────────┬──────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Block 2: Draft │
│ Model: Claude 3 | Input: {{research}} │
│ Output saved as {{draft}} │
└──────────────────────┬──────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Block 3: Polish │
│ Model: GPT-4 | Input: {{draft}} │
│ Final output returned to user │
└──────────────────────┬──────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Response + Citations │
└─────────────────────────────────────────────┘
You are a supervisor coordinating a team of specialized agents.
Available agents:
- Legal Agent: Handles legal questions, contracts, compliance
- Technical Agent: Handles technical questions, troubleshooting
- Sales Agent: Handles pricing, features, comparisons
Your job:
1. Analyze the user's question
2. Route to the appropriate agent(s)
3. Combine responses into a coherent answer
If a question spans multiple domains, call multiple agents.
User: "I was charged twice and the product doesn't work"
Supervisor routes to:
1. Billing Agent → Handles duplicate charge
2. Technical Agent → Troubleshoots product issue
Supervisor combines both responses into unified answer.
Create Agent → Save Draft (v1)
↓
Make Changes → Save Draft (v2)
↓
Test & Verify → Publish (v2 becomes Production)
↓
Make More Changes → Save Draft (v3)
↓
Problem Found → Rollback to v2 (v2 republished)
User asks: "What is the return policy?"
↓
┌───────────────────────────────────────┐
│ 1. SEARCH │
│ Query your document database │
│ Find relevant passages │
└────────────────────┬──────────────────┘
↓
┌───────────────────────────────────────┐
│ 2. RETRIEVE │
│ Extract matching text chunks │
│ Rank by relevance (similarity score) │
└────────────────────┬──────────────────┘
↓
┌───────────────────────────────────────┐
│ 3. AUGMENT │
│ Inject retrieved text into prompt │
│ Give AI context to answer │
└────────────────────┬──────────────────┘
↓
┌───────────────────────────────────────┐
│ 4. GENERATE │
│ AI generates answer using context │
│ Cites sources from documents │
└───────────────────────────────────────┘