Signpost AI Logo

Understanding Workers: The Building Blocks of Your AI Agent

Think of workers as the specialized tools in your AI agent's toolkit. Each worker has a specific job, and together they make your agent capable of handling complex tasks intelligently.

What Are Workers?

Workers are pre-built components that give your AI agent specific abilities. Instead of building everything from scratch, you can mix and match workers to create exactly the AI assistant you need.

The Toolbox Analogy

Imagine you're building a house. You don't need to invent hammers, saws, and drills - you use the right tool for each job. Workers are like those tools:

  • AI Worker = Your master craftsman (can think, reason, and create)
  • Search Worker = Your research assistant (finds specific information)
  • Document Generator = Your secretary (creates formatted documents)
  • Message Worker = Your communications specialist (sends messages to users)

Core Workers: The Essential Tools

AI Worker - The Brain

What it does: This is your agent's intelligence. It can understand complex questions, think through problems, and generate helpful responses.

When to use it:

  • Complex conversations that require reasoning
  • Creative tasks like writing content
  • Situations where context and nuance matter
  • When you need natural, conversational responses

Real-world example:

User: "I'm worried about my child's vaccination schedule because we missed some appointments due to the pandemic"

AI Worker Response: "I understand your concern about missed vaccinations during the pandemic. This is very common, and it's great that you're thinking about getting back on track. Let me help you understand what vaccines your child might need and how to safely catch up..."

Search Worker - The Researcher

What it does: Quickly finds specific information from your knowledge base or documents.

When to use it:

  • Factual questions that need precise answers
  • Looking up specific information (dates, numbers, procedures)
  • High-volume queries where speed matters
  • When you need consistent, reliable information

Real-world example:

User: "What are the clinic hours on Saturdays?"

Search Worker Response: "Our clinic is open Saturdays from 9:00 AM to 2:00 PM. We offer vaccinations, basic health screenings, and emergency care during these hours."

Document Generator - The Writer

What it does: Creates structured documents, reports, or formatted content based on information.

When to use it:

  • Generating reports or summaries
  • Creating formatted documents (letters, certificates, forms)
  • When you need consistent document structure
  • Producing multiple documents with the same format

Real-world example:

User: "I need a letter confirming my child's vaccination record"

Document Generator Response: Creates a properly formatted letter with clinic letterhead, vaccination dates, and professional formatting.

Message Worker - The Communicator

What it does: Sends messages to users through different channels (SMS, WhatsApp, email).

When to use it:

  • Sending responses to users
  • Delivering notifications or reminders
  • Following up with users after conversations
  • Broadcasting important information

Real-world example:

Message Worker sends: "Hi Maria, this is a reminder that your child's next vaccination is due on March 15th. Please call us to schedule an appointment."

Specialized Workers: Advanced Tools

Combine Worker - The Coordinator

What it does: Takes information from multiple sources and combines them into a single, coherent response.

When to use it:

  • When you need information from different databases
  • Combining search results with AI-generated explanations
  • Creating comprehensive responses from multiple sources

Real-world example:

User: "What services do you offer for pregnant women?"

Combine Worker: Pulls information from health services database, adds clinic schedule information, and combines with AI-generated explanation of prenatal care importance.

Selector Worker - The Decision Maker

What it does: Chooses the best response or action based on certain conditions or criteria.

When to use it:

  • Routing users to different services based on their needs
  • Choosing different responses based on user characteristics
  • Implementing business rules and logic

Real-world example:

Selector Worker: "If user is pregnant → provide prenatal care information. If user has emergency → escalate to human staff. If user needs routine care → provide appointment booking information."

Persist Worker - The Memory Keeper

What it does: Saves important information from conversations for future use.

When to use it:

  • Remembering user preferences
  • Tracking conversation history
  • Storing important data for follow-up
  • Building user profiles over time

Real-world example:

Persist Worker saves: "User Maria prefers Spanish language, has a 2-year-old child, and last visited on February 10th for vaccination."

The Critical Role of Chat History in Agentic AI

Why Chat History Matters

Chat history is the memory of your AI agent - it's what transforms a simple question-and-answer system into an intelligent, context-aware assistant that can have meaningful conversations and provide personalized help over time.

Without chat history:

User: "What vaccines does my child need?"
Agent: "Children typically need vaccines for measles, mumps, rubella..."

User: "When should she get them?"
Agent: "I don't know who 'she' refers to. Can you provide more context?"

With chat history:

User: "What vaccines does my child need?"
Agent: "Children typically need vaccines for measles, mumps, rubella..."

User: "When should she get them?"
Agent: "Based on our previous conversation about your child's vaccines, the recommended schedule for a girl her age would be..."

How Structured and Template Workers Enhance Chat History

Structured Workers and Template Workers work together to create rich, contextual chat history that makes your AI agent more effective:

Structured Workers: Organizing Information

What they do: Structured workers take messy, unorganized information and format it consistently so the AI agent can understand and use it better.

Example of structured chat history:

{
  "conversation_id": "conv_123",
  "user_profile": {
    "name": "Maria",
    "language": "Spanish",
    "children": [{"age": 3, "gender": "female", "last_visit": "2024-01-15"}]
  },
  "conversation_history": [
    {
      "timestamp": "2024-02-01T10:30:00Z",
      "user_message": "What vaccines does my child need?",
      "agent_response": "Based on your 3-year-old daughter's records...",
      "context_used": ["child_age", "vaccination_schedule", "previous_visits"]
    }
  ]
}

Template Workers: Consistent Context Delivery

What they do: Template workers ensure that chat history is presented to the AI agent in a consistent, useful format every time.

Example template for chat history:

CONVERSATION CONTEXT:
User: Maria (Spanish speaker)
Child: 3-year-old daughter, last visit Jan 15, 2024

RECENT CONVERSATION:
- User asked about vaccines for her child
- Agent provided vaccination schedule
- User expressed concern about missed appointments
- Agent offered to help reschedule

CURRENT REQUEST: [New user message]

INSTRUCTIONS: Use this context to provide personalized, relevant assistance.

How These Components Work Together with LLM Agents

The Complete Flow

  1. User sends message → "When is my daughter's next appointment?"

  2. Structured Worker processes chat history:

    • Extracts relevant past conversations
    • Identifies user profile information
    • Organizes context by importance and recency
  3. Template Worker formats context:

    • Creates consistent format for the LLM
    • Includes relevant history and user details
    • Provides clear instructions for the AI
  4. LLM Agent receives enriched context:

    CONTEXT: Maria (Spanish speaker) has a 3-year-old daughter. Previous conversation about vaccines. User concerned about missed appointments.
    
    USER MESSAGE: "When is my daughter's next appointment?"
    
    RESPOND: Provide specific appointment information using the context about her daughter and previous vaccination discussions.
  5. LLM Agent generates contextual response: "Based on our previous discussion about your daughter's vaccines, her next appointment should be scheduled for her 4-year checkup. Since you mentioned concerns about missed appointments, I can help you schedule this now..."

The Power of Combined Context

Without structured history + templates:

  • AI treats each message as isolated
  • Loses important context between conversations
  • Provides generic, less helpful responses
  • Cannot build relationships with users over time

With structured history + templates:

  • AI remembers previous conversations
  • Understands user preferences and needs
  • Provides personalized, relevant responses
  • Builds trust through consistent, caring interactions

Real-World Example: Complete Workflow

Scenario: A refugee mother needs help accessing healthcare services

Initial Conversation (Day 1):

User: "I need help finding a doctor for my children"
Structured Worker: Records user profile, children info, healthcare needs
Template Worker: Formats context for AI
LLM Agent: Provides healthcare options, asks follow-up questions

Follow-up Conversation (Day 7):

User: "I went to the clinic you recommended but they said I need documents"
Structured Worker: Retrieves previous conversation about healthcare
Template Worker: Formats context including previous recommendation
LLM Agent: "I remember recommending the community clinic. Let me help you understand what documents you need and how to get them..."

Later Conversation (Day 14):

User: "My son has a fever, should I take him to the same clinic?"
Structured Worker: Retrieves full conversation history
Template Worker: Includes context about previous clinic visits, document issues
LLM Agent: "Since you've been working with the community clinic and resolved the document issue, yes, they would be the best place for your son's fever. Based on your previous visits, you should bring..."

Best Practices for Chat History Management

1. Structure Your History Strategically

Include:

  • User preferences and profile information
  • Previous problems and solutions
  • Important dates and appointments
  • Emotional context (stress, urgency, satisfaction)

Example structured context:

USER PROFILE:
- Name: Ahmed
- Language: Arabic (prefers English for medical terms)
- Family: Wife + 2 children (ages 5, 8)
- Status: Recently arrived refugee
- Concerns: Healthcare access, children's education

CONVERSATION SUMMARY:
- Helped find pediatrician (successful)
- Assisted with school enrollment (ongoing)
- Provided mental health resources (user interested)

CURRENT MOOD: Grateful but stressed about upcoming appointments

2. Use Templates for Consistency

Create templates for different scenarios:

Healthcare Template:

MEDICAL CONTEXT: [Previous health discussions]
CURRENT PROVIDERS: [Known doctors, clinics]
ONGOING TREATMENTS: [Active medical care]
USER CONCERNS: [Health worries, barriers]

Education Template:

EDUCATION CONTEXT: [School enrollment, academic needs]
CHILDREN'S AGES: [Grade levels, special needs]
LANGUAGE SUPPORT: [ESL needs, translation help]
PARENT INVOLVEMENT: [Engagement level, barriers]

3. Optimize Context for LLM Performance

Keep context relevant and concise:

  • Include only recent, relevant conversations
  • Summarize older interactions
  • Highlight urgent or ongoing issues
  • Remove outdated information

Example optimized context:

RECENT CONTEXT (Last 7 days):
- User successfully enrolled children in school
- Still needs help with after-school care
- Expressed gratitude for previous assistance

ONGOING NEEDS:
- Childcare solutions
- Transportation to appointments
- English language classes for adults

COMMUNICATION STYLE:
- Prefers step-by-step instructions
- Appreciates cultural sensitivity
- Responds well to encouragement

How Workers Work Together

The Orchestra Analogy

Think of workers like musicians in an orchestra. Each has their specialty, but together they create beautiful music:

Scenario: A parent asks about their child's health

  1. Structured Worker organizes chat history and user profile
  2. Template Worker formats context for optimal AI understanding
  3. Search Worker finds the child's medical records
  4. AI Worker interprets all information and generates a caring, contextual response
  5. Document Generator creates a health summary if needed
  6. Message Worker sends the response to the parent
  7. Persist Worker saves the interaction for future reference

Real-World Flow Example

User: "My 3-year-old has a fever of 102°F. What should I do?"

Worker Coordination:

Search Worker → Finds fever guidelines for children
AI Worker → Analyzes the situation and generates caring advice
Selector Worker → Decides this needs immediate attention
Message Worker → Sends urgent response with clear instructions
Persist Worker → Records the interaction for follow-up

Result: Parent gets immediate, accurate, and caring guidance about their child's fever.

Choosing the Right Workers

Start Simple

Begin with these essential workers:

  • AI Worker - for intelligent conversations
  • Search Worker - for finding information
  • Message Worker - for sending responses

Add Complexity Gradually

As you need more features, add:

  • Document Generator - for creating reports
  • Combine Worker - for complex information gathering
  • Selector Worker - for smart routing

Advanced Features

For sophisticated applications:

  • Persist Worker - for remembering users
  • Specialized workers - for specific tasks

Best Practices for Using Workers

1. Match Workers to Tasks

Don't use a sledgehammer to hang a picture. Choose the right worker for each job:

  • Simple questions → Search Worker
  • Complex conversations → AI Worker
  • Document creation → Document Generator
  • User communication → Message Worker

2. Test Worker Combinations

Try different combinations to see what works best:

  • Test with real users
  • Monitor response quality
  • Adjust based on feedback
  • Optimize for your specific needs

3. Consider Costs

Different workers have different costs:

  • Search Worker - Usually low cost, fast
  • AI Worker - Higher cost, more intelligent
  • Document Generator - Moderate cost, structured output
  • Message Worker - Cost depends on messaging platform

4. Plan for Scale

Think about how your worker setup will handle:

  • Increased user volume
  • More complex requests
  • Different types of users
  • Peak usage times

Common Worker Combinations

Basic Information Assistant

  • Search Worker + Message Worker
  • Good for: FAQ systems, information lookup
  • Cost: Low
  • Complexity: Simple

Intelligent Support Agent

  • AI Worker + Search Worker + Message Worker
  • Good for: Complex customer support, personalized help
  • Cost: Moderate
  • Complexity: Medium

Document Processing System

  • AI Worker + Document Generator + Message Worker
  • Good for: Report generation, form processing
  • Cost: Moderate
  • Complexity: Medium

Comprehensive Service Platform

  • All workers working together
  • Good for: Full-service applications
  • Cost: Higher
  • Complexity: High

Troubleshooting Common Issues

Problem: Responses are too generic

Solution: Add AI Worker for more intelligent, contextual responses

Problem: Information is outdated

Solution: Use Search Worker with regularly updated knowledge base

Problem: Users get confused by responses

Solution: Use AI Worker to generate clearer, more helpful explanations

Problem: High costs

Solution: Use Search Worker for simple queries, AI Worker only when needed

Problem: Inconsistent responses

Solution: Use Document Generator for structured, consistent output

Key Takeaways

  1. Workers are tools - Choose the right one for each job
  2. Start simple - Begin with essential workers and add complexity
  3. Test combinations - Find what works best for your specific needs
  4. Consider costs - Balance functionality with budget
  5. Plan for growth - Design your worker setup to scale with your needs

Remember: The goal isn't to use every worker - it's to use the right workers to create the best experience for your users while staying within your budget and complexity comfort zone.


Next Steps: Once you understand workers, you can start building your first agent using the visual flow builder in Signpost AI. The platform makes it easy to connect workers together without any technical knowledge required!