Skip to main content

Skillset Engine

The Skillset Engine powers CogniAgent’s conversational AI capabilities. It turns traditional forms into natural conversations — instead of filling out fields, users simply talk to an AI that guides them through providing information.

What is a skillset?

A skillset is a conversational AI agent that knows how to collect specific information through dialogue. Think of it as a smart assistant that:
  • Asks questions naturally, not like a form
  • Understands various ways people might answer
  • Handles corrections and changes gracefully
  • Knows when to ask for clarification
  • Can search knowledge bases for answers
  • Escalates to humans when needed
Skillsets are configuration-driven. Add new conversation capabilities by creating a JSON config file — no code changes required.

Key capabilities

Natural conversations

Users provide information through natural dialogue, not rigid forms.

Smart data collection

Collects structured data while handling variations in how people respond.

Knowledge integration

Search your knowledge base to answer questions during conversations.

Automatic escalation

Transfers to human agents when the AI can’t help or the user requests it.

How it works

1

Conversation starts

A workflow triggers the skillset (via the Ask a Person node) with initial context and any pre-filled data.
2

AI guides the conversation

The skillset engine sends a greeting and begins collecting required information through natural dialogue.
3

User responds

Each user message is analyzed. The AI decides whether to accept the answer, ask for clarification, or move to the next question.
4

Data is collected

As the conversation progresses, structured data is extracted and stored. Users can update previous answers at any time.
5

Confirmation and completion

Once all required information is collected, the AI confirms the details and completes the conversation.

Conversation tools

The skillset engine uses a set of conversation tools to manage dialogue flow. The AI chooses which tool to use based on the user’s response:
ToolWhat it does
Accept answerUser provided a valid answer — save it and move on
Reject answerAnswer needs clarification — ask the user to try again
Skip fieldUser can’t or won’t answer — skip this optional field
Update fieldUser wants to change a previous answer
Mark unknownUser explicitly doesn’t know the answer
Confirm completeAll data collected — ask user to confirm before finishing
Transfer to humanUser needs human help — escalate the conversation
End conversationConversation is complete — wrap up
Search knowledgeUser asked a question — search the knowledge base for answers
The AI makes these decisions automatically based on context. You don’t need to program conversation flows — just define what information to collect.

Defining what to collect

Skillsets collect form fields through conversation. Each field has:
{
  "id": "budget_range",
  "name": "Budget Range",
  "description": "How much the customer is willing to spend",
  "type": "selection",
  "required": true,
  "options": ["Under $10k", "$10k-$50k", "$50k-$100k", "Over $100k"],
  "maxAttempts": 3
}

Field properties

id
string
required
Unique identifier for the field. Used to reference collected data.
name
string
required
Human-readable name shown in summaries and confirmations.
description
string
required
What information this field collects. The AI uses this to understand what to ask for.
type
string
default:"text"
Data type: text, number, selection, date, boolean, email, phone.
required
boolean
default:"true"
Whether this field must be collected before completing.
options
array
For selection fields, the valid choices the user can pick from.
maxAttempts
number
default:"3"
How many times to ask before skipping (optional fields) or escalating (required fields).

Dynamic fields

Fields can be generated dynamically from workflow data. Use templates to create fields at runtime:
{
  "formFieldsMapping": {
    "sourceField": "survey_questions",
    "isArray": true,
    "template": {
      "id": "answer_{{item.id}}",
      "name": "{{item.title}}",
      "description": "{{item.question}}",
      "required": "{{item.required}}"
    }
  }
}
This generates a form field for each item in the survey_questions array from your workflow.

Skillset configuration

A complete skillset configuration includes:
{
  "agentId": "lead-qualifier",
  "name": "Lead Qualification",
  "version": "1.0.0",
  "description": "Qualify inbound leads through conversation",

  "persona": {
    "agentName": "Alex",
    "organization": "Acme Corp",
    "tone": "Professional, friendly, and helpful"
  },

  "inputVariables": [
    {
      "name": "contact_name",
      "description": "Name of the person we're talking to"
    }
  ],

  "settings": {
    "maxFieldAttempts": 3,
    "maxConsecutiveClarifications": 3,
    "requireConfirmation": true
  },

  "formFieldsMapping": {
    "company_size": {
      "template": {
        "id": "company_size",
        "name": "Company Size",
        "description": "Number of employees",
        "type": "selection",
        "options": ["1-10", "11-50", "51-200", "200+"],
        "required": true
      }
    },
    "budget": {
      "template": {
        "id": "budget",
        "name": "Budget",
        "description": "Available budget for the project",
        "type": "text",
        "required": true
      }
    }
  },

  "knowledgeBaseId": "kb_product_info"
}

Configuration sections

Defines the AI’s personality:
  • agentName — What the AI calls itself
  • organization — Company the AI represents
  • tone — How the AI should communicate (professional, casual, empathetic)
Data passed from your workflow to personalize conversations:
  • Contact name, company name, account details
  • Previous interaction history
  • Any context the AI should know
Conversation behavior controls:
  • maxFieldAttempts — Attempts before skipping/escalating a field
  • maxConsecutiveClarifications — Rejections before auto-escalating
  • requireConfirmation — Whether to confirm data before completing
Rules the AI must follow:
  • Topics to stay within
  • Information it shouldn’t share
  • Actions it should avoid

Guardrails

The skillset engine includes safety guardrails that protect conversations:

Automatic escalation

The AI automatically transfers to a human when:
  • User explicitly asks to talk to a person
  • Too many clarification attempts on the same field
  • User expresses frustration or uses inappropriate language
  • The AI can’t understand repeated responses

Content safety

Built-in checks prevent the AI from:
  • Providing professional advice (legal, medical, financial)
  • Sharing inappropriate content
  • Going off-topic for extended periods
Guardrails are safety nets, not business logic. The AI makes judgment calls; guardrails catch obvious problems.

Actions and events

Skillsets can trigger actions and emit events during conversations.

Actions

Actions perform operations when certain conditions are met:
{
  "fieldCompletionActions": {
    "budget": {
      "description": "When budget is collected, check eligibility",
      "conditions": [
        {
          "requiredFields": ["company_size", "budget"],
          "allRequiredFieldsCompleted": true
        }
      ],
      "action": "checkEligibility",
      "parameters": {
        "company_size": "{{company_size}}",
        "budget": "{{budget}}"
      },
      "expectedEvents": ["eligibilityChecked"]
    }
  }
}
Action triggers:
  • When a specific field is collected
  • When all required fields are complete
  • When the conversation ends

Events

Events notify your workflow about conversation milestones:
  • conversationStarted — Conversation began
  • fieldCollected — A field value was collected
  • conversationCompleted — All data collected successfully
  • conversationEscalated — Transferred to human agent
  • Custom events from your action definitions

Knowledge base integration

Connect a knowledge base to let the AI answer questions during conversations:
{
  "knowledgeBaseId": "kb_product_faq"
}
When users ask questions, the AI:
  1. Searches the knowledge base for relevant information
  2. Provides an answer based on what it finds
  3. Continues collecting the required information
Knowledge search is a tool the AI uses when appropriate. It won’t search for every message — only when users ask questions it can’t answer from context.

Conversation states

Every conversation has a state that tracks progress:
StateDescription
greetingSending initial message
collectingGathering information through dialogue
confirmingAsking user to confirm collected data
completedSuccessfully finished
escalatedTransferred to human agent
endedConversation closed (may be incomplete)
Access the state in your workflow: {{dispatcher_1.status}}

Example: Pizza order taker

A complete skillset for taking pizza orders:
{
  "agentId": "pizza-order-taker",
  "name": "Pizza Order Taker",
  "version": "1.0.0",
  "description": "Takes pizza orders through conversation",

  "persona": {
    "agentName": "Pizza Assistant",
    "organization": "Papa's Pizzeria",
    "tone": "Friendly, enthusiastic, helpful"
  },

  "settings": {
    "requireConfirmation": true,
    "maxFieldAttempts": 3
  },

  "formFieldsMapping": {
    "pizza_type": {
      "template": {
        "id": "pizza_type",
        "name": "Pizza Type",
        "description": "Which pizza the customer wants",
        "type": "selection",
        "options": ["Margherita", "Pepperoni", "Hawaiian", "Veggie"],
        "required": true
      }
    },
    "size": {
      "template": {
        "id": "size",
        "name": "Size",
        "description": "Pizza size",
        "type": "selection",
        "options": ["Small", "Medium", "Large"],
        "required": true
      }
    },
    "delivery_address": {
      "template": {
        "id": "delivery_address",
        "name": "Delivery Address",
        "description": "Where to deliver the pizza",
        "type": "text",
        "required": true
      }
    }
  },

  "fieldCompletionActions": {
    "size": {
      "description": "Add item to order when pizza selection is complete",
      "conditions": [
        {
          "requiredFields": ["pizza_type", "size"],
          "allRequiredFieldsCompleted": true
        }
      ],
      "action": "addToOrder",
      "parameters": {
        "item": "{{pizza_type}} Pizza",
        "size": "{{size}}"
      },
      "expectedEvents": ["orderItemAdded"]
    }
  }
}
Example conversation:
AI: Hi! Welcome to Papa’s Pizzeria. What can I get for you today? User: I’d like a pepperoni pizza please AI: Great choice! What size would you like — small, medium, or large? User: Large AI: One large pepperoni pizza! Where should we deliver it? User: 123 Main Street, Apt 4B AI: Perfect! Let me confirm your order: One large pepperoni pizza delivered to 123 Main Street, Apt 4B. Is that correct? User: Yes! AI: Your order is placed. Thank you for choosing Papa’s Pizzeria!

Using skillsets in workflows

Skillsets are used through the Ask a Person node:
1

Add Ask a Person node

Drag the node onto your workflow canvas.
2

Configure channels

Select which channels users can communicate through (email, Slack, web widget, SMS).
3

Select skillset

Choose which skillset to use, or create a new one.
4

Pass input variables

Map workflow variables to skillset inputs (contact name, context, etc.).
5

Handle completion

Connect the event handle to process collected data when the conversation completes.

Next steps