Skip to main content
Version: 3.x.x

Agent Audio & Video Call Project - Flutter

Video SDK provides an open-source agent starter project agent-starter-flutter on GitHub. This guide walks you through running a Flutter client app that connects to an AI agent deployed via the Low-Code Deployment (UI-Based) workflow on Agent Cloud.

Overview

This starter project demonstrates how to integrate a Low-Code deployed AI agent with a Flutter client using the Dispatch API. If you've already designed and deployed your AI agent from the VideoSDK dashboard without writing any backend code, this is the client-side companion you need to let users interact with that agent in real time.

Here's how it works at a high level:

  1. You configure and deploy your AI agent using the Low-Code UI on the VideoSDK Dashboard — no code required.
  2. VideoSDK gives you an Agent ID for that deployment.
  3. This Flutter app uses the Dispatch API to trigger the agent into a meeting room, where your user can then talk to it in real time.

This approach is ideal when you want to quickly ship a mobile voice agent experience without building or hosting any backend agent infrastructure yourself.

Features

  • Voice Support: Real-time audio communication with mic toggle and device switching.
  • AI Agent Integration: Interact with an AI agent with real-time responses.
  • Live Transcription: Display ongoing conversation transcripts.
  • Screen Sharing: Share your screen during sessions.
  • Device Management: Switch between audio input/output devices.

Prerequisites

  • A deployed AI agent on VideoSDK Agent Cloud. If you haven't done this yet, create and deploy your agent using the Low-Code Deployment UI on the VideoSDK Dashboard — no coding required. Once deployed, note down your Agent ID.
  • If your target platform is iOS, your development environment must meet the following requirements:
    • Flutter 3.8.0 or later
    • Dart 3.x or later
  • Valid Video SDK Account

Generate Token

To manage secured communication, every participant that connects to a meeting needs an access token. You can easily generate this token by using your apiKey and secret-key, which you can obtain from the VideoSDK Dashboard.

For development purpose, you can generate a temporary token from VideoSDK Dashboard's API section.


tip

The best practice for obtaining a token involves generating it from your backend server which will help in keeping your credentials safe.

Run the Sample Project

Step 1: Clone the sample project

Clone the repository to your local environment.

git clone https://github.com/videosdk-live/agent-starter-flutter.git
cd agent-starter-flutter

Step 2: Install the dependencies

Install all the dependencies to run the project.

flutter pub get

Step 3: Setup Environment Variables

Copy the .env.example file to .env.

cp .env.example .env

Update the .env file with your credentials. The AGENT_ID is the identifier for the Low-Code agent you deployed from the VideoSDK Dashboard.

.env
AUTH_TOKEN=your_videosdk_auth_token
AGENT_ID=your_agent_id
MEETING_ID=your_meeting_id

Tip: You can obtain your AUTH_TOKEN and AGENT_ID from the VideoSDK Dashboard under your Agent Cloud deployment. MEETING_ID is optional — if left blank, the app will create a new meeting automatically.

Step 4: Add Required Permissions

Ensure the necessary permissions are configured for your target platform.

Android — add to AndroidManifest.xml:

AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />

iOS — add to Info.plist:

Info.plist
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required for audio calls.</string>
<key>NSCameraUsageDescription</key>
<string>Camera access is required for video calls.</string>

Step 5: Run the Sample App

Bingo, it's time to push the launch button.

Android:

flutter run

iOS:

cd ios && pod install && cd ..
flutter run -d ios

Once running, the app will use the Dispatch API to send your deployed agent into the meeting room. You'll see the live transcription as you speak, and the agent will respond in real time.

Got a Question? Ask us on discord