API Reference
Public API for agentduet 1.0.0.
For integration patterns, see Concepts and Integrations.
SessionManagerConfig
SessionManager
Hold one for the life of your process: async with SessionManager(config) as sm:.
Property: id (server-assigned connection id; None until connected).
Register handlers before run_forever() / start().
Session
Properties: id, subscriber.
Address
Frozen and hashable (usable as a dict key).
IncomingCallNotification
IncomingMessage
Delivered to @sm.on_incoming_message (WhatsApp).
SendWAMessage
Outbound WhatsApp body for session.send_message().
SendMessageResult
Returned by session.send_message(). Check result.success. Unlike
CommandResult, this type is not bool-like (if result: is always true).
See WhatsApp Messaging and Error Handling.
Call
Command methods return CommandResult (truthy on success) for operational failures.
Audio in: call.caller.audio_stream() / call.callee.audio_stream().
Properties: id, participant, subscriber, caller, callee, state, audio_config.
CallState
NEW · OPENING · RINGING · LIVE · TERMINATED
CallEvent
HANGUP · ERROR
CallParty
CallAudioConfig
CommandResult
VoiceAgent
High-level runner. See VoiceAgent.
Adapter seam
Optional model adapters live in agentduet-adapters (see
VoiceAgent). Integrations use a direct provider bridge.
Helpers
new_session_id()- mint a unique session id string.TriggerConditionsBuilder/InboundCallMode- see Trigger Conditions.SendWAMessage/IncomingMessage/MessageErrorCode- see WhatsApp Messaging.
