Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.asapp.com/llms.txt

Use this file to discover all available pages before exploring further.

A “use case” in GenerativeAgent can take several forms depending on the resolution needed:
  • A routing destination (TopicHandoff) for human agent escalation
  • A deterministic workflow (Topic → Task) for automated handling like processing a refund or looking up order status
  • A direct task entry where GenerativeAgent is given a specific Task on conversation start and jumps straight into it (no Topic routing)
This page covers how to create a Task, the component that enables deterministic automation. Tasks define what GenerativeAgent can accomplish for your customers, and Functions are the tools that enable those tasks by connecting to your backend systems.

How Users Reach a Task

When a Topic article relevant to the conversation references a Task, GenerativeAgent switches into that Task automatically.See Topics & Knowledge Base for how to set up Topics.
A Task can be specified at conversation start via the integration layer. GenerativeAgent skips Topic-based routing entirely and begins executing the Task immediately. This is useful when the upstream IVR or system has already determined the caller’s intent.
If no Topic article clearly matches, GenerativeAgent may ask for clarification or escalate to a human agent. Make sure your Topics library covers the intents you expect.

Step 1: Define Your Use Case

Start by clearly defining the business scenario you want GenerativeAgent to handle:
  • Customer goal: What does the customer want to accomplish?
  • Business context: What type of issue or request is this?
  • Success criteria: How do you know when the task is complete?
  • Required actions: What backend operations does the task need?
Customer goal: “I want to check where my order is”Business context: Customer service inquiry about order trackingSuccess criteria: Customer receives current order status and tracking informationRequired actions: Look up order details, retrieve tracking information, provide status update
Customer goal: “I need to book a doctor’s appointment”Business context: Healthcare appointment bookingSuccess criteria: Customer has a confirmed appointment with detailsRequired actions: Check availability, book appointment, send confirmation

Step 2: Create the Task

Navigate to the Tasks page and create a new task that represents your use case:
1

Navigate to Tasks

Go to the Tasks page in your GenerativeAgent configuration.
2

Create New Task

Click “Create task” to start creating your task.
3

Define Task Details

Provide the following information:
  • Task name: Clear, descriptive name for your use case
  • Task selector description: How GenerativeAgent identifies when to use this task
  • Task message (optional): Initial response when this task is selected
  • Channels: Which channel(s) this task will support
GenerativeAgent Task creation interface
4

Write Task Instructions

This is the most critical part of creating a successful use case. Your task instructions determine how GenerativeAgent behaves and whether it handles your use case correctly.In the task configuration, provide:
  • Procedures: Detailed guidance on how to handle this use case
  • Voice settings: Policies and communication guidelines that are specific to the Voice channel
  • Chat settings: Policies and communication guidelines that are specific to the Chat channel
When writing your procedures, reference the functions you’ll need for this task. You’ll create these functions in the next step and connect them back to this task.Effective task instructions should:
  • Be specific and actionable: Tell GenerativeAgent exactly what to do in each scenario
  • Include examples: Provide common customer requests and expected responses
  • Plan for edge cases: Define what to do when things go wrong
  • Set clear boundaries: Specify when to escalate to human agents
Need help writing effective instructions? See our comprehensive guides:
5

Configure Knowledge Base Filtering

Specify knowledge base metadata to restrict GenerativeAgent to using only topics with matching metadata for this specific use case.This helps ensure GenerativeAgent uses the most relevant information for each specific use case, improving accuracy and reducing irrelevant responses.
If you followed the Build your first GenerativeAgent guide, you already have a Knowledge Base with Topics configured.Otherwise you can connect your knowledge base now.

Step 3: Create Required Functions

Functions enable GenerativeAgent to perform actions similar to a live agent. Based on the procedures you defined in your task instructions, create the functions needed to enable those actions.

Available Function Types

API Functions

Connect to your existing APIs to fetch data or perform actions. The most common function type for integrating with backend systems.

Mock API Functions

Define ideal API interactions before connecting to real systems. Perfect for testing and development.

Set Variable Functions

Store conversation data as reference variables for future use. Useful for tracking customer information across the conversation.

System Transfer Functions

Signal that control should be transferred to an external system or end the conversation with relevant data.

Recite Message Functions

Define phrases GenerativeAgent will recite verbatim, such as legal disclaimers or specific instructions.

HILA Functions

Seamlessly involve a human agent in a conversation when GenerativeAgent determines human intervention is necessary.
Use Handoffs to initiate any transfer to a human agent queue, whether triggered from a Topic or from inside a Task. System transfer functions define the transfer parameters and are associated with Handoffs via the transfer_function_name field.

Creating Functions

1

Navigate to Functions

Go to the Functions page in your GenerativeAgent configuration.
2

Create New Function

Click “Create Function” to start defining your function.
3

Define Function Details

Provide the following information:
  • Function name: Clear, descriptive name for the function
  • Description: How GenerativeAgent should use this function
  • API Connection: The backend system this function connects to
4

Choose Function Type

Select the appropriate function type based on your use case needs:
For functions that need to interact with your live backend systems.
  1. Select an existing API connection
  2. Choose the API version if the system offers multiple versions
  3. Save the function
GenerativeAgent will call the real API during customer interactions.

Step 4: Connect Functions to Your Task

Once you’ve created the necessary functions, connect them to your task:
  1. Return to your task configuration
  2. Select the functions this task should use
  3. Ensure the functions align with the actions your use case requires
  4. Test the task with the Previewer to verify everything works correctly

Step 5: Test Your Use Case

Use the Previewer tool to test your new use case. If your Task is associated with a Topic, test the full flow: caller utterance → Topic match → Task entry → function execution → resolution.
1

Access the Previewer

Navigate to the Previewer in your GenerativeAgent configuration.
2

Test Realistic Scenarios

Create test conversations that represent how customers would interact with your use case. Use Test Scenarios to define customer profiles and test different edge cases.
3

Verify Function Execution

Ensure the system calls all functions correctly and they return expected results.
4

Refine as Needed

Make adjustments to task instructions or function configurations based on test results.

Call on Entry

Many deployments need to fetch caller information before the first turn (a CRM lookup, an account status check, or an entitlement query) and use that result to shape how the conversation proceeds. Pattern: engage GenerativeAgent with a specific entry Task, then add a Function to that Task with Call on Entry enabled. That Function runs immediately at conversation start. Its output is available as reference variables to the rest of the Task, and can influence KB answering, Task switching, or Handoff routing. For example: fetch the caller’s account type at conversation start, store it as a reference variable, then use that variable in Task instructions to determine which workflow to follow or which Handoff to trigger. To target a specific entry Task, pass it via the taskName attribute on the /analyze request. See Enter a specific Task for details.

Next Steps

Handoff Configuration

Configure availability-aware routing to human agent queues for Topics that need human escalation.

Test Your Use Case

Use the Previewer to test your new use case with realistic scenarios.

Connect Your Knowledge Base

Import and organize Topics for better context and routing coverage.

Integrations

Explore integration options for connecting GenerativeAgent to your existing systems.

Deploy to GenerativeAgent

Learn how to deploy your configured GenerativeAgent to production.