Agent Starter App - Flutter
VideoSDK enables you to seamlessly add a voice-enabled AI agent to your Flutter app — this guide walks you through connecting your Flutter frontend to an agent configured and deployed directly from the VideoSDK dashboard.
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.
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-app-flutter.git
cd agent-starter-flutter
Step 2: Install the dependencies
Install all the dependencies to run the project.
flutter pub get
Step 3: Create Your Agent (Optional)
If you've already configured and deployed your agent from the VideoSDK Dashboard, you can jump directly to Step 4.
You can create and configure a powerful AI agent directly from the VideoSDK dashboard — no coding required.
Step 1: Create Your Agent
First, follow our detailed guide to Build a Custom Voice AI Agent in Minutes. This will walk you through creating the agent's persona, configuring its pipeline (Realtime or Cascading), and testing it directly from the dashboard.
Step 2: Get Agent and Version ID
Once your agent is created, you need to get its agentId and versionId to connect it to your frontend application.
-
After creating your agent, go to the agent's page and find the JSON editor on the right side. Copy the
agentId. -
To get the
versionId, click on the 3 dots beside the Deploy button and click on "Version History". Copy the version ID via the copy button of the version you want.

Step 4: 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.
AUTH_TOKEN=your_videosdk_auth_token
AGENT_ID=your_agent_id
MEETING_ID=your_meeting_id
VERSION_ID=your_version_id
Tip: You can obtain your
AUTH_TOKENandAGENT_IDfrom the VideoSDK Dashboard under your Agent Cloud deployment.MEETING_IDis optional — if left blank, the app will create a new meeting automatically.
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.
Troubleshooting
Common Issues:
-
Agent not joining:
- Check that the
AGENT_IDandVERSION_IDin your.envare correctly set. - Verify your VideoSDK token is valid and has the necessary permissions.
- Check that the
-
Audio not working:
- Check device permissions for microphone access.
-
"Failed to connect agent" error:
- Verify your
AGENT_IDandVERSION_IDare correct. - Check the debug console for any network errors.
- Verify your
-
Flutter build issues:
- Ensure your Flutter version is compatible (3.8.0 or later for iOS targets).
- Try cleaning the build:
flutter clean. - Delete
pubspec.lockand runflutter pub get. - For iOS: run
cd ios && pod installbeforeflutter run.
Got a Question? Ask us on discord

