Skip to main content

Agents

A SenseFlow Agent is a conversational AI, or chatbot, that you can deploy to interact with users across various channels.

SenseFlow Agent Diagram

Diagram: SenseFlow Agents can connect to various channels and data sources.

Creating an Agent

  1. Navigate to SenseFlow → Agents and click the + New button.
  2. You have two options for initial setup:
    • Manual Setup: Fill in the configuration fields yourself for maximum control.
    • Create with AI: Describe your agent's purpose in plain language (e.g., "Create a chatbot for a dental clinic that can book appointments and answer questions about services"). The AI will auto-populate the Name, Description, and Instructions fields for you.

The Agent Playground

The agent editor screen serves as your Playground. The left side contains the configuration tabs, and the right side features a real-time chat interface. Any changes you make to the configuration are applied instantly*, allowing you to test and iterate on your agent's behavior in real time.

Note About Instant Updates

Some changes, like switching the LLM model or changing instructions may require you to create a new conversation thread to take effect.

Chat Interface Features

  • Start a new message: The main input field for sending messages to your agent.
  • File attachment: Located to the left of the input field, this allows you to upload files directly into the conversation. The agent can then analyze, summarize, or answer questions about the file's content. See the File Attachments section below for supported file types.
  • Conversation history: The chat interface displays the current conversation thread. To start a new conversation and clear the history, simply refresh the page.
  • Feedback: Each agent response has thumbs-up and thumbs-down icons, allowing you to provide feedback on the quality of the response.

Agent Configuration Tabs

The agent editor is organized into several tabs to configure every aspect of its behavior.

Configuration Tab

This tab controls the agent's core identity and instructions.

  • Name: A unique, human-readable name for your agent (e.g., Lead Classifier).
  • Description: A brief, internal-facing summary of what the agent is for.
  • Enable Document AI: Toggling this on allows the agent to connect to and query knowledge bases you've created in the Document AI module. This feature is dependent on your subscription plan.
  • Model: The underlying Large Language Model (LLM) that powers your agent. The choice of model affects cost, speed, and capabilities.
    • Google Gemini Family: Includes models like Gemini 2.0 Flash (fast, multimodal) and Gemini 2.5 Pro (state-of-the-art, complex reasoning).
    • OpenAI GPT Family: Includes models like GPT-4o Mini (balanced performance) and GPT-4.1 (high performance).
  • Instructions (System Prompt): This is the most critical field for defining your agent's behavior. It sets the context, rules, and personality for the LLM. Use a structured format for best results.
Important

Some models, like Gemini 2.5 Flash-Lite, are optimized for scale and cost but do not support advanced features like Topics and Actions. The UI will indicate these limitations.

Example of a detailed system prompt:

# Role
You are an AI assistant for "Ironmax," a hardware store. Your name is Max.

# Objective
Your main goal is to assist users by answering questions about products, services, and technical benefits based on the provided knowledge base. You must also be able to direct users to a human agent for complex inquiries.

# Personality
- Tone: Friendly, helpful, and concise.
- Language: Use simple and direct language, avoiding technical jargon unless necessary.

# Rules
- Provide only real product information. If you don't know the answer, state that you don't have the information and offer to connect the user to a human expert.
- When asked for a product, check the knowledge base for its availability and specifications.
- You can interact in both English and Spanish.

Knowledge Base Tab

This is a quick way to provide your agent with specific information. Upload documents directly to the agent. This data is only accessible to this specific agent.

  • Supported file formats: .TXT, .MD, .PDF, .JSON, .PPTX
  • Maximum file/request size: 10 MB

Topics Tab

Link pre-built conversational flows to your agent. See the Topics Documentation for more details.

Customization Tab

Control the look and feel of the embedded chat widget.

  • Avatar: Upload an image to represent your agent. Recommended dimensions 256×256 or 1:1 aspect ratio. Only JPG and PNG are supported.
  • Chat colors: Set the primary and accent colors.
  • Greeting: The initial message the user sees.
    • Static: A fixed message you write.
    • Generated: An AI-generated message that changes every 24 hours.
    • None: The chat window will be blank until the user types.
  • Conversation starters: Pre-defined prompts that appear as buttons for the user. This helps guide them. Enter one prompt per line.

Integration & Sharing Tab

Deploy your agent.

API Integration

Use the provided code snippets to interact with your agent from any application. You will need an API Key (see Integrations Documentation).

cURL Example: Create a thread and send a message

# Step 1: Create a new conversation thread and get a thread_id
curl -X POST https://external.elaniin.com/api/teams/{teamId}/agents/{agentId}/threads \
-H "Authorization: Bearer YOUR_API_KEY"

# Step 2: Send a message to that thread
curl -X POST https://external.elaniin.com/api/teams/{teamId}/agents/{agentId}/threads/{threadId} \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "Hello, how are you?"}'

Embed Agent (Widget)

Copy the HTML <script> tag to embed the chat widget on your website.

  • Allowed origins: For security, you must add the domains where you will embed the agent (e.g., https://www.yourcompany.com). The widget will not load on any other domain.
  • Link WhatsApp number: Connect your agent to a WhatsApp Business number configured in the Integrations section.

File Attachments and Supported File Types

You can upload files to your agent in two ways: in the Knowledge Base tab for persistent context, or in prompts for in-conversation analysis. The supported file types depend on the model family you have selected for your agent.

Supported Prompt File Types

These are the file types you can upload directly into the chat interface for real-time analysis.

Model familyFile typeSupported formats
OpenAI (GPT models)Documents
  • Word Document (.doc, .docx)
  • PDF (.pdf)
  • PowerPoint (.pptx)
  • Text (.txt)
  • Markdown (.md)
  • JSON (.json)
  • LaTeX (.tex)
Code
  • C (.c)
  • C++ (.cpp)
  • C# (.cs)
  • CSS (.css)
  • Go (.go)
  • HTML (.html)
  • Java (.java)
  • JavaScript (.js)
  • PHP (.php)
  • Python (.py)
  • Ruby (.rb)
  • Shell Script (.sh)
  • TypeScript (.ts)
Google (Gemini models)Images
  • PNG (.png)
  • JPEG (.jpeg, .jpg)
  • WebP (.webp)
Audio
  • AAC Audio (.aac)
  • M4A Audio (.m4a)
  • MP3 Audio (.mp3)
  • WAV Audio (.wav)
Video
  • QuickTime Video (.mov)
  • MP4 Video (.mp4)
  • WebM Video (.webm)
Documents
  • PDF (.pdf)
  • Text (.txt)
  • CSV (.csv)

Supported Knowledge Base File Types

These are the file types you can upload to the Knowledge Base tab for long-term, retrieval-based context.

Model familyFile typeSupported formats
OpenAI (GPT models)Documents
  • Word Document (.doc, .docx)
  • PDF (.pdf)
  • PowerPoint (.pptx)
  • Text (.txt)
  • Markdown (.md)
  • JSON (.json)
  • LaTeX (.tex)
Google (Gemini models)Documents
  • Text (.txt)
  • PDF (.pdf)
  • CSV (.csv)
  • Excel (.xlsx)
  • JSON (.json)
  • Markdown (.md)