Skip to main content

ippo_agents 0.1.0 copy "ippo_agents: ^0.1.0" to clipboard
ippo_agents: ^0.1.0 copied to clipboard

Flutter/Dart SDK for IppoPay LoanPilot Agents — live voice AI calls with just an ippo API key. Wraps the real-time transport so your app never touches it.

ippo_agents #

Flutter/Dart SDK for IppoPay LoanPilot Agents — start a live voice AI call with one of your agents using only an ippo API key. The real-time transport (LiveKit) is bundled and hidden: your app only ever sees this SDK.

It is the Dart sibling of the TypeScript SDK @ippopone/agents-sdk — same agent.ippo.one API, same agents, same API key, just for Flutter.

Install #

flutter pub add ippo_agents

Microphone permission #

A voice call needs the mic. Add the platform entries once:

  • iOS — ios/Runner/Info.plist:
    <key>NSMicrophoneUsageDescription</key>
    <string>Talk to your loan assistant.</string>
    
  • Android — android/app/src/main/AndroidManifest.xml:
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.INTERNET" />
    
    and set minSdkVersion 23 in android/app/build.gradle.

Request the runtime permission before starting a call (e.g. with permission_handler).

Quick start #

import 'package:ippo_agents/ippo_agents.dart';

final ippo = IppoAgents(apiKey: 'sk_live_...');          // dev: ippo agents key

final call = await ippo.startVoiceCall(agentId: 'agt_123');

// Live captions and the user's words:
call.transcripts.listen((t) {
  print('${t.role.name}: ${t.text}');
});

// Show a mic/▮ talking indicator:
call.botSpeaking.listen((speaking) => setState(() => _talking = speaking));

// The agent drives your UI through client tools — answer them:
call.onToolCall('show_step', (args) async {
  showCard(args['step'] as String);
  return 'Card shown';
});

// ... later
await call.setMicEnabled(false);   // mute
await call.end();                  // hang up

That's the whole thing — no LiveKit, no WebRTC, no token plumbing in your code.

Authentication #

Mode Use How
API key local dev, server-side IppoAgents(apiKey: '…')
Token provider shipped apps IppoAgents.tokenProvider(fn)

A shipped mobile app should not embed a raw API key (it can be extracted from the binary). In production, mint the call token on your backend (which holds the key and calls POST /api/agents/{id}/connect) and hand it back:

final ippo = IppoAgents.tokenProvider((agentId, options) async {
  final res = await myBackend.connect(agentId);   // your server holds the key
  return ConnectResult(
    callId: res['callId'], livekitUrl: res['livekitUrl'],
    token: res['token'], roomName: res['roomName'],
  );
});
final call = await ippo.startVoiceCall(agentId: 'agt_123');

API surface #

IppoAgents

  • startVoiceCall({agentId, options, enableMicrophone}) → VoiceCall
  • connect(agentId, {options}) → ConnectResult (room + token, no join)
  • listAgents() / getAgent(id) — API-key mode only
  • dispose()

VoiceCall

  • streams: transcripts, botSpeaking, states, rawEvents
  • onToolCall(name, handler) / offToolCall(name)
  • sendUserMessage(text) — send a tap/typed line as the user's words
  • setMicEnabled(bool) / isMicEnabled
  • end() · callId · isEnded

Client tools — the agent calls these; you handle them and return a short string the agent speaks from next:

call.onToolCall('check_pan', (args) async {
  final report = await myBackend.pullCredit(args['pan'] as String);
  return 'PAN verified. Score ${report.score}. Tell them in one sentence.';
});

License #

MIT © IppoPay

0
likes
0
points
109
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

Flutter/Dart SDK for IppoPay LoanPilot Agents — live voice AI calls with just an ippo API key. Wraps the real-time transport so your app never touches it.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, livekit_client, meta

More

Packages that depend on ippo_agents