Issue with Agent Console

I have created an agent and deployed to livekit cloud. I cannot test it in agent console even though I have the python SDK version 1.5.17. I have in the same agents different numbers for inbound calls so it works as a multi-tenant agent. This is what i see as an error:

{

code.file.path: “/app/src/agent.py”

code.function.name: “inbound_agent”

code.line.number: 299

exception.type: “ValueError”

exception.message: “Cannot identify company: missing sip.trunkPhoneNumber”

exception.stacktrace: “Traceback (most recent call last): File “/app/src/agent.py”, line 82, in inbound_agent raise ValueE…”

room_id: “RM_…”

job_id: “AJ_y…”

logger.name: “voiceagent.agent”

lk.id: “719f02b6-65c1-…”

}

I want to be able to test my agent now that it’s in development but also in production through the agent console.

When i call the agent from each number i have connected it with, it interacts with no problem.

When you say agent console, you are referring to this, yes?

Where do you see that error? The error is talking about an exception running the agent code, but the agent console should act on the deployed agent (i.e. the same instance that runs when you call the agent via a phone number)

yes im reffering to the agent console you attached. I saw that error in sessions not from agent console. Below you can find some info of the agent console session from when i tried a few minutes ago to interact with the agent.
"abortController: undefined

activeSpeakers: […]

audioContext: {…}

audioEnabled: true

bufferedEvents: […]

bufferedSegments: {…}

connectFuture: undefined

connectionReconcileInterval: 367

connOptions: {…}

disconnectLock: {…}

e2eeManager: {…}

e2eeStateMutex: {…}

engine: {…}

incomingDataStreamManager: {…}

incomingDataTrackManager: {…}

isE2EEEnabled: false

isResuming: false

isVideoPlaybackBlocked: false

localParticipant: {…}

log: {…}

options: {…}

outgoingDataStreamManager: {…}

outgoingDataTrackManager: {…}

regionUrl: undefined

regionUrlProvider: {…}

remoteParticipants: {…}

roomInfo: {

activeRecording: false

creationTime: 1780490262n

creationTimeMs: 1780490262677n

departureTimeout: 20

emptyTimeout: 300

enabledCodecs: […]

maxParticipants: 0

metadata: “”

name: “console-fdf4d559”

numParticipants: 2

numPublishers: 1

sid: “RM_CEJcjQp9MEZK”

turnPassword: “”

version: {…}

}

rpcHandlers: {…}

serverInfo: {…}

sidToIdentity: {…}

state: “connected”

transcriptionReceivedTimes: {…}

_events: {…}

_eventsCount: 27

_maxListeners: 100"

Can you describe the error you see when you use agent console? What doesn’t work exactly?

I go into my agent which is deployed and i enter agent console. I press start session and i see the attached image. In the tab “Audio” I see that their is some recognition of my voice but the agent is not speaking at all.

also this is what i see in tab “Participants”

So, that screenshot corresponds with this session: https://cloud.livekit.io/projects/p_34kyocohc89/sessions/RM_aY6Xnrz6JzYf

It looks like the agent joined successfully and I don’t see any errors in the server logs.

What confuses me is that warning about “Version not fully supported. Upgrade for all Console features”. I see in the server logs that you are using 1.5.17, as you said in your original post, so I’m not sure why you are seeing that error. I spent some time trying to reproduce this, with an agent using 1.5.17 deployed to eu-central but for me, it works without issue :confused: . Are you doing anything special in your deployment?

Do you see anything in your agent logs?

When i call the phone numbers i have connected to the agent it responds/speaks just fine. I also see in the “sessions” the transcripts and there are no errors there, however i would like to be able to use livekit’s agent console. What could be defined as a special deployment?

@EleniX, the issue is in your agent code, not Console. Your inbound_agent raises

ValueError: Cannot identify company: missing sip.trunkPhoneNumber at agent.py:82

that fires for any participant without the sip.trunkPhoneNumber attribute. Agent Console connects via WebRTC, not SIP, so the participant has no SIP attributes. The phone-call path works because the LK SIP service sets those attributes on the SIP participant.

The Console docs are explicit: “In the future, the Console will support additional features for simulating a SIP participant, such as mocking inbound phone number and dispatch rules” [ docs.livekit.io/agents/start/playground/ ]. Not yet supported.

Two fixes you can try on your side though:

  • Add a fallback in inbound_agent so a missing sip.trunkPhoneNumber uses a dev/test tenant instead of raising (check participant.kind to distinguish SIP vs Console). Or

  • Manually set the attribute via Console’s Participants pane before the agent reads it, the docs note you can “update your own participant fields” including attributes. Set sip.trunkPhoneNumber to one of your test numbers and your existing code path runs.

Are you doing any special logic in your agent that assumes it is speaking with a SIP participant? I.e. trying to read the sip.trunkPhoneNumber at agent.py line 82. I apologise for missing this at first, but I was confused by your first question, assuming that was an unrelated build error you saw on your dev machine.

As Muhammad says above, the Agent console connects directly through WebRTC, so that’s probably the root cause of your issue.