AgenticUniverse - Previously Formi
  1. Voice
AgenticUniverse - Previously Formi
  • Our Technical Note
    • Why Open AI is not Enough
    • How business Outcomes would Change Radically with AgenticUniverse
    • Our Research
      • STT - Nuances and Insights
      • Solving for STT Constraints
  • Generate Token
    • Login/Generate Token
      POST
  • Agent Configuration
    • Model Configuration
      • Configuration Helpers
        • Supported Providers
        • Supported Models
        • Supported Parameters
      • Get Model Configuration
      • Set Model Configuration
    • State Machine
      • Edge
        • Legacy
          • Create Edge
          • Edge Details
          • Update Edge
          • Delete Edge
        • Update edge properties
        • Get edge details
        • Delete an edge
        • Create an edge (transition) between two states
      • State
        • Create State from Template
        • Get State Information
        • Update State
        • Delete State
      • Get State Machine Structure
    • Prompt Templates
      • Get All Templates
      • Render Template
    • Tools
      • Get Tools List
      • Add Tool
      • Update Tool
      • Delete Tool
    • Get All Agents
      GET
    • Single Agent Details
      GET
    • Create Agent
      POST
    • Update Agent Details
      PUT
    • Enable Dashboard For An Outlet
      POST
    • Disable Dashboard For An Outlet
      POST
    • Get Call queue Sheet ID
      GET
  • Interactions
    • Pre-Interaction Context
      • Schedule an Interaction
      • Update an Interaction Id
      • Delete an Interaction Id
      • Clear all interactions
      • Get Summarized Interaction Info
    • Interaction Modalities
      • Video
        • Generation
          • Generate Welcome Video
      • Text
        • Start Interaction
        • Create Response
        • End Interaction
      • Voice
        • Connection Configuration
          • Quickstart
          • Connecting Twilio
          • Connecting Exotel
          • Formi WebSocket Configuration Guide
          • Create a New Connection Vendor
          • Get All Connection Vendors
          • Update a Connection Vendor
          • Delete a Connection Vendor
          • Get Agent's Connection Config
          • Add or Update Agent's Connection Config
    • Post Interaction Configuration
      • Email Destination Configuration
      • Variables CRUD
        • Get all required variables for the outlet with map
        • Modify variable definition for outlet
        • Add a new variable for the outlet
        • DELETE variable for outlet
        • Connect Variable to a destination
      • Destinations CRUD
        • Get all destinations for the outlet
        • Modify Destination for outlet
        • Add a new Destination for the outlet
        • DELETE Destinations for outlet
    • Get Interaction Summary
      GET
    • Resolve an Escalated Interaction
      POST
    • Get the Interaction list
      GET
    • Get Information regarding Single Interaction
      GET
  • Agent Utilisation
    • Get Credits Available
    • Interaction Utilisation
    • Model Utilisation
  • Webhooks
    • Get webhook URL
    • Update webhook URL
    • Get webhook metadata
    • Modify webhook metadata
    • Get reservation ingestion metadata
  • Untitled Endpoint
    POST
  1. Voice

Connection Configuration

Integration Guide for Websocket Connection#

This documentation provides a comprehensive integration guide for connecting third-party telephony platforms (like Exotel, Twilio, Knowlarity) with Formi's AI-powered voice interaction system via WebSockets.

Overview#

Formi enables intelligent AI-powered voice interactions over websocket through real-time audio streaming. This guide is for any client or partner integrating third-party telephony services (e.g., Exotel, Twilio, Knowlarity, etc.) with Formi using WebSockets.
This documentation provides a comprehensive guideline on how to:
1.
Set up call metadata exchange with Formi
2.
Initiate or reuse a session on Formi’s platform
3.
Establish a direct WebSocket connection with Formi
4.
Stream and receive audio in real-time
Screenshot 2025-06-25 at 3.42.06 PM.png

Understand Formi's Call Architecture#

When a voice interaction is initiated or answered, your telephony provider should trigger a WebSocket stream to Formi's URL that includes essential call metadata. This metadata helps Formi:
1.
Identify the interaction, session and any previous interaction context.
2.
Associate the call with the correct agent.
3.
Attach the or business logic to the session

Methods to set Interaction#

Inbound Interactions
Use Formi's Create Session API to explicitly initiate the session
Outbound Interactions
Setup and Source & Queue Calls on our System

Construct the WebSocket URL#

Formi expects WebSocket connections in the following format:

Parameters
ParameterDescription
call_typeinbound, outbound, confirmation, or missed
agent_idThe Formi agent ID
outlet_idThe outlet or business unit ID
CallFromCustomer contact ID (phone or email)
CallSidUnique call identifier generated by your system
session_idReturned by Formi Create Session API
interaction_idReturned by Formi Create Session API

Sample Usage#

Establish the WebSocket Connection#

Once the WebSocket URL is constructed, the telephony system must initiate a WebSocket connection and begin sending a predefined sequence of structured messages to Formi.

WebSocket Message Types#

Below is a list of all supported message types, along with parameters and examples
From Formi
connected
start
media
stop
mark
To Formi
clear

Final Notes#

Always call the Create Session API before the call stream starts.
Keep session_id and interaction_id safe and link them with your call.
Formi supports additional analytics, transcriptions, and AI decisioning layered on top of the stream.
Use secure wss:// URLs and validate endpoints before opening connections.
Modified at 2025-07-12 11:54:15
Previous
End Interaction
Next
Quickstart
Built with