darryncampbell@Mac agent-starter-python % uv run src/agent.py console Built agent-starter-python @ file:///Users/darryncampbell/git/agents/agent-starter-python Uninstalled 1 package in 0.75ms Installed 1 package in 1ms Agents Starting console mode 🚀 22:58:42.817 DEBUG asyncio Using selector: KqueueSelector 22:58:42.818 INFO livekit.agents starting worker {"version": "1.3.9", "rtc-version": "1.0.19"} INFO livekit.agents starting inference executor 22:58:42.839 INFO livekit.agents initializing process {"pid": 1845, "inference": true} 22:58:44.635 INFO livekit.agents process initialized {"pid": 1845, "inference": true, "elapsed_time": 1.77} 22:58:44.637 INFO livekit.agents HTTP server listening on :49514 22:58:44.642 INFO livekit.agents initializing job runner {"tid": 33928} 22:58:44.673 DEBUG asyncio Using selector: KqueueSelector 22:58:44.674 INFO livekit.agents job runner initialized {"tid": 33928, "elapsed_time": 0.03} 22:58:44.729 DEBUG livekit.…ugins.aws Instructions updated: You are a helpful voice AI assistant. The user is interacting with you via voice, even if you perceive the conversation as text. You eagerly assist users with their questions by providing information from your extensive knowledge. Your responses are concise, to the point, and without any complex formatting or punctuation including emojis, asterisks, or other symbols. You are curious, friendly, and have a sense of humor. {"room": "mock_room"} 22:58:44.730 DEBUG livekit.…ugins.aws Chat context updated: [] {"room": "mock_room"} DEBUG livekit.…ugins.aws Updating tools: [] {"room": "mock_room"} 22:58:44.731 INFO livekit.…ugins.aws Creating Bedrock client {"room": "mock_room"} 22:58:44.734 INFO livekit.…ugins.aws Initializing Bedrock stream {"room": "mock_room"} 22:58:44.736 DEBUG smithy_c…io.client Making request for operation "InvokeModelWithBidirectionalStream" with parameters: InvokeModelWithBidirectionalStreamOperationInput(model_id='amazon.nova-2-sonic-v1:0') {"room": "mock_room"} DEBUG smithy_c…io.client Serializing request for: InvokeModelWithBidirectionalStreamOperationInput(model_id='amazon.nova-2-sonic-v1:0') {"room": "mock_room"} 22:58:44.737 DEBUG smithy_c…io.client Serialization complete. Transport request: HTTPRequest(destination=URI(scheme='https', username=None, password=None, host='', port=None, path='/model/amazon.nova-2-sonic-v1%3A0/invoke-with-bidirectional-stream', query='', fragment=None), method='POST', fields=Fields(OrderedDict({'content-type': Field(name='content-type', value=['application/vnd.amazon.eventstream'], kind=)}))) {"room": "mock_room"} 22:58:44.738 DEBUG smithy_c…io.client Calling endpoint resolver with params: EndpointResolverParams(input=InvokeModelWithBidirectionalStreamOperationInput(model_id='amazon.nova-2-sonic-v1:0'), context={'config': Config(auth_scheme_resolver=, auth_schemes={'aws.auth#sigv4': }, aws_access_key_id=None, aws_credentials_identity_resolver=, aws_secret_access_key=None, aws_session_token=None, endpoint_resolver=, endpoint_uri='https://bedrock-runtime.us-east-1.amazonaws.com', http_request_config=None, interceptors=[, ], protocol=, region='us-east-1', retry_strategy=None, sdk_ua_app_id=None, transport=, user_agent_extra='x-client-framework:livekit-plugins-aws[realtime]'), 'user_agent': UserAgent(sdk_metadata=[UserAgentComponent(prefix='aws-sdk-python', name='0.2.0', value=None), UserAgentComponent(prefix='md', name='smithy-core', value='0.2.0'), UserAgentComponent(prefix='md', name='awscrt', value='0.28.4')], internal_metadata=[], ua_metadata=[UserAgentComponent(prefix='ua', name='2.1', value=None)], api_metadata=[UserAgentComponent(prefix='api', name='Bedrock_Runtime', value='0.2.0')], os_metadata=[UserAgentComponent(prefix='os', name='macos', value='25.1.0'), UserAgentComponent(prefix='md', name='arch', value='arm64')], language_metadata=[UserAgentComponent(prefix='lang', name='python', value='3.13.9'), UserAgentComponent(prefix='md', name='pyimpl', value='CPython')], env_metadata=[], config_metadata=[], feat_metadata=[], additional_metadata=[RawStringUserAgentComponent(value='x-client-framework:livekit-plugins-aws[realtime]')])}) {"room": "mock_room"} 22:58:44.739 DEBUG smithy_c…io.client Endpoint resolver result: Endpoint(uri=URI(scheme='https', username=None, password=None, host='bedrock-runtime.us-east-1.amazonaws.com', port=None, path='', query='', fragment=None), properties={}) {"room": "mock_room"} 22:58:44.740 DEBUG livekit.…ugins.aws [CREDS] Attempting to load AWS credentials {"room": "mock_room"} 22:58:44.742 DEBUG livekit.…ugins.aws [CREDS] AWS credentials loaded successfully. AWS_ACCESS_KEY_ID: AKIA*** {"room": "mock_room"} DEBUG livekit.…ugins.aws [CREDS] Cached static credentials (no expiry) {"room": "mock_room"} 22:58:44.743 DEBUG smithy_c…io.client Request to sign: HTTPRequest(destination=URI(scheme='https', username=None, password=None, host='bedrock-runtime.us-east-1.amazonaws.com', port=None, path='/model/amazon.nova-2-sonic-v1%3A0/invoke-with-bidirectional-stream', query='', fragment=None), method='POST', fields=Fields(OrderedDict({'content-type': Field(name='content-type', value=['application/vnd.amazon.eventstream'], kind=), 'user-agent': Field(name='User-Agent', value=['aws-sdk-python/0.2.0 md/smithy-core#0.2.0 md/awscrt#0.28.4 ua/2.1 api/Bedrock_Runtime#0.2.0 os/macos#25.1.0 md/arch#arm64 lang/python#3.13.9 md/pyimpl#CPython x-client-framework:livekit-plugins-aws[realtime]'], kind=)}))) {"room": "mock_room"} DEBUG smithy_c…io.client Signer properties: {'region': 'us-east-1', 'service': 'bedrock'} {"room": "mock_room"} 22:58:44.744 DEBUG smithy_c…io.client Sending request HTTPRequest(destination=URI(scheme='https', username=None, password=None, host='bedrock-runtime.us-east-1.amazonaws.com', port=None, path='/model/amazon.nova-2-sonic-v1%3A0/invoke-with-bidirectional-stream', query='', fragment=None), method='POST', fields=Fields(OrderedDict({'content-type': Field(name='content-type', value=['application/vnd.amazon.eventstream'], kind=), 'user-agent': Field(name='User-Agent', value=['aws-sdk-python/0.2.0 md/smithy-core#0.2.0 md/awscrt#0.28.4 ua/2.1 api/Bedrock_Runtime#0.2.0 os/macos#25.1.0 md/arch#arm64 lang/python#3.13.9 md/pyimpl#CPython x-client-framework:livekit-plugins-aws[realtime]'], kind=), 'x-amz-date': Field(name='X-Amz-Date', value=['20251222T225844Z'], kind=), 'x-amz-content-sha256': Field(name='X-Amz-Content-SHA256', value=['STREAMING-AWS4-HMAC-SHA256-EVENTS'], kind=), 'authorization': Field(name='Authorization', value=['AWS4-HMAC-SHA256 Credential=AKIAS6SZWNKBNT2L4YPW/20251222/us-east-1/bedrock/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=9520315165ef1f42e67a91679f0f457db1ce0696f53d9040755bf7d0a7e82056'], kind=)}))) {"room": "mock_room"} 22:58:44.746 DEBUG livekit.agents using audio io: `Console` -> `AgentSession` -> `Console` {"room": "mock_room"} DEBUG livekit.agents using transcript io: `AgentSession` -> (none) {"room": "mock_room"} 22:58:44.747 INFO livekit.…ugins.aws generate_reply: sending instructions='Greet the user and ask their name' {"room": "mock_room"} 22:58:45.247 INFO livekit.…ugins.aws Initializing Bedrock session with realtime options: _RealtimeOptions(voice='tiffany', temperature=0.7, top_p=0.9, max_tokens=1024, tool_choice=None, region='us-east-1', turn_detection='MEDIUM', modalities='mixed') {"room": "mock_room"} 22:58:45.253 DEBUG livekit.…ugins.aws [SEND] {"event":{"sessionStart":{"inferenceConfiguration":{"maxTokens":1024,"topP":0.9,"temperature":0.7},"endpointingSensitivity":"MEDIUM"}}} {"room": "mock_room"} 22:58:45.256 DEBUG livekit.…ugins.aws Sent event: {"event":{"sessionStart":{"inferenceConfiguration":{"maxTokens":1024,"topP":0.9,"temperature":0.7},"endpointingSensitivity":"MEDIUM"}}} {"room": "mock_room"} 22:58:45.257 DEBUG livekit.…ugins.aws [SEND] {"event":{"promptStart":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","textOutputConfiguration":{"mediaType":"text/plain"},"audioOutputConfiguration":{"mediaType":"audio/lpcm","sampleRateHertz":24000,"sampleSizeBits":16,"cha… {"room": "mock_room"} 22:58:45.259 DEBUG livekit.…ugins.aws Sent event: {"event":{"promptStart":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","textOutputConfiguration":{"mediaType":"text/plain"},"audioOutputConfiguration":{"mediaType":"audio/lpcm","sampleRateHertz":24000,"sampleSizeBits":16,"cha… {"room": "mock_room"} 22:58:45.260 DEBUG livekit.…ugins.aws [SEND] {"event":{"contentStart":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"fe593fda-91fb-4362-94e5-e95c9d6a7fb3","type":"TEXT","interactive":false,"role":"SYSTEM","textInputConfiguration":{"mediaType":"text/plain"… {"room": "mock_room"} 22:58:45.263 DEBUG livekit.…ugins.aws Sent event: {"event":{"contentStart":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"fe593fda-91fb-4362-94e5-e95c9d6a7fb3","type":"TEXT","interactive":false,"role":"SYSTEM","textInputConfiguration":{"mediaType":"text/plain"… {"room": "mock_room"} 22:58:45.265 DEBUG livekit.…ugins.aws [SEND] {"event":{"textInput":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"fe593fda-91fb-4362-94e5-e95c9d6a7fb3","content":"You are a helpful voice AI assistant. The user is interacting with you via voice, even if you perceive the conversation as text.\n You eagerly assist users with their questions by providing information from your extensive knowledge.\n Your responses are concise, to the point, and without any complex formatting or punctuation including emojis, asterisks, or other symbols.\n You are curious, friendly, and have a sense of humor."}}} {"room": "mock_room"} 22:58:45.267 DEBUG livekit.…ugins.aws Sent event: {"event":{"textInput":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"fe593fda-91fb-4362-94e5-e95c9d6a7fb3","content":"You are a helpful voice AI assistant. The user is interacting with you via voice, even if you perceive the conversation as text.\n You eagerly assist users with their questions by providing information from your extensive knowledge.\n Your responses are concise, to the point, and without any complex formatting or punctuation including emojis, asterisks, or other symbols.\n You are curious, friendly, and have a sense of humor."}}} {"room": "mock_room"} 22:58:45.269 DEBUG livekit.…ugins.aws [SEND] {"event":{"contentEnd":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"fe593fda-91fb-4362-94e5-e95c9d6a7fb3"}}} {"room": "mock_room"} 22:58:45.270 DEBUG livekit.…ugins.aws Sent event: {"event":{"contentEnd":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"fe593fda-91fb-4362-94e5-e95c9d6a7fb3"}}} {"room": "mock_room"} 22:58:45.277 INFO livekit.…ugins.aws [SESSION] Static credentials, using max duration: 360s {"room": "mock_room"} 22:58:45.278 DEBUG livekit.…ugins.aws Stream initialized successfully {"room": "mock_room"} 22:58:45.279 DEBUG livekit.…ugins.aws [SEND] {"event":{"contentStart":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"c7280c6b-2c56-4977-84f8-6427d574e2a9","type":"AUDIO","interactive":true,"role":"USER","audioInputConfiguration":{"mediaType":"audio/lpcm",… {"room": "mock_room"} 22:58:45.281 INFO livekit.…ugins.aws Starting audio input processing loop {"room": "mock_room"} 22:58:45.282 DEBUG livekit.…ugins.aws [SEND] {"event":{"contentStart":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"0a6fd87e-53d3-4dfb-8514-d707412ebff1","type":"TEXT","interactive":true,"role":"USER","textInputConfiguration":{"mediaType":"text/plain"}}}} {"room": "mock_room"} 22:58:45.284 DEBUG livekit.…ugins.aws [SEND] {"event":{"textInput":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"0a6fd87e-53d3-4dfb-8514-d707412ebff1","content":"Greet the user and ask their name"}}} {"room": "mock_room"} DEBUG livekit.…ugins.aws [SEND] {"event":{"contentEnd":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"0a6fd87e-53d3-4dfb-8514-d707412ebff1"}}} {"room": "mock_room"} 22:58:45.285 INFO livekit.…ugins.aws Sent text message (interactive=True): Greet the user and ask their name {"room": "mock_room"} INFO livekit.…ugins.aws [SESSION] Recycle timer started, will fire in 360s {"room": "mock_room"} 22:58:45.819 DEBUG smithy_c…io.client Received response: AWSCRTHTTPResponse(status=200, fields=Fields(OrderedDict({':status': Field(name=':status', value=['200'], kind=), 'server': Field(name='server', value=['awselb/2.0'], kind=), 'date': Field(name='date', value=['Mon, 22 Dec 2025 22:58:45 GMT'], kind=), 'content-type': Field(name='content-type', value=['application/vnd.amazon.eventstream'], kind=), 'x-amzn-requestid': Field(name='x-amzn-requestid', value=['622587c2-58cd-4a3b-8c95-07a3a14460db'], kind=)})), body=...) {"room": "mock_room"} 22:58:45.822 DEBUG smithy_c…io.client Deserializing response: AWSCRTHTTPResponse(status=200, fields=Fields(OrderedDict({':status': Field(name=':status', value=['200'], kind=), 'server': Field(name='server', value=['awselb/2.0'], kind=), 'date': Field(name='date', value=['Mon, 22 Dec 2025 22:58:45 GMT'], kind=), 'content-type': Field(name='content-type', value=['application/vnd.amazon.eventstream'], kind=), 'x-amzn-requestid': Field(name='x-amzn-requestid', value=['622587c2-58cd-4a3b-8c95-07a3a14460db'], kind=)})), body=...) {"room": "mock_room"} 22:58:45.825 DEBUG smithy_c…io.client Deserialization complete. Output: InvokeModelWithBidirectionalStreamOperationOutput() {"room": "mock_room"} 22:58:46.586 DEBUG livekit.…ugins.aws COMPLETION_START: { "event": { "completionStart": { "completionId": "806ea72e-f551-484a-818f-1db1fd3b6e76", "promptName": "8c206807-e833-4d3a-88e8-08633e192a2c", "sessionId": "622587c2-58cd-4a3b-8c95-07a3a14460db" } } } {"room": "mock_room"} 22:58:46.588 DEBUG livekit.…ugins.aws [GEN] Creating NEW generation, response_id=887fc66f-92dc-4a8b-85a7-283d8f347af8 {"room": "mock_room"} 22:58:46.589 DEBUG livekit.…ugins.aws [GEN] Creating message structure for response_id=887fc66f-92dc-4a8b-85a7-283d8f347af8 {"room": "mock_room"} 22:58:46.590 DEBUG livekit.…ugins.aws [GEN] New generation created - calling emit_generation_event() {"room": "mock_room"} 22:58:46.591 DEBUG livekit.…ugins.aws [GEN] EMITTING generation_created for response_id=887fc66f-92dc-4a8b-85a7-283d8f347af8 {"room": "mock_room"} 22:58:46.862 DEBUG livekit.…ugins.aws TEXT_OUTPUT_CONTENT_START: { "event": { "contentStart": { "additionalModelFields": "{\"generationStage\":\"SPECULATIVE\"}", "completionId": "806ea72e-f551-484a-818f-1db1fd3b6e76", "contentId": "485f98ca-d5b7-4ca0-acbb-6ad0c1c501c4", "promptName": "8c206807-e833-4d3a-88e8-08633e192a2c", "role": "ASSISTANT", "sessionId": "622587c2-58cd-4a3b-8c95-07a3a14460db", "textOutputConfiguration": { "mediaType": "text/plain" }, "type": "TEXT" } } } {"room": "mock_room"} 22:58:46.864 DEBUG livekit.…ugins.aws [GEN] ASSISTANT SPECULATIVE text received {"room": "mock_room"} 22:58:46.865 DEBUG livekit.…ugins.aws [GEN] Closing previous generation (response_id=887fc66f-92dc-4a8b-85a7-283d8f347af8) for new SPECULATIVE {"room": "mock_room"} 22:58:46.866 DEBUG livekit.…ugins.aws [GEN] CLOSED generation response_id=887fc66f-92dc-4a8b-85a7-283d8f347af8, was_emitted=True {"room": "mock_room"} 22:58:46.867 DEBUG livekit.…ugins.aws [GEN] Creating NEW generation, response_id=f716db4b-d7c5-4dbf-bb04-c2ec6b1fb694 {"room": "mock_room"} DEBUG livekit.…ugins.aws [GEN] Creating message structure for response_id=f716db4b-d7c5-4dbf-bb04-c2ec6b1fb694 {"room": "mock_room"} 22:58:46.868 DEBUG livekit.…ugins.aws [GEN] New generation created - calling emit_generation_event() {"room": "mock_room"} DEBUG livekit.…ugins.aws [GEN] EMITTING generation_created for response_id=f716db4b-d7c5-4dbf-bb04-c2ec6b1fb694 {"room": "mock_room"} 22:58:46.870 DEBUG livekit.…ugins.aws [GEN] TurnTracker calling emit_generation_fn() for turn_id=1 {"room": "mock_room"} 22:58:46.871 DEBUG livekit.…ugins.aws [GEN] EMITTING generation_created (re-emit for tool call) for response_id=f716db4b-d7c5-4dbf-bb04-c2ec6b1fb694 {"room": "mock_room"} 22:58:46.872 DEBUG livekit.…ugins.aws TEXT_OUTPUT_CONTENT: { "event": { "textOutput": { "completionId": "806ea72e-f551-484a-818f-1db1fd3b6e76", "content": "Hello there! It's great to talk with you. May I know your name?", "contentId": "485f98ca-d5b7-4ca0-acbb-6ad0c1c501c4", "promptName": "8c206807-e833-4d3a-88e8-08633e192a2c", "role": "ASSISTANT", "sessionId": "622587c2-58cd-4a3b-8c95-07a3a14460db" } } } {"room": "mock_room"} 22:58:46.874 DEBUG livekit.…ugins.aws Updating chat context with role: assistant and text_content: Hello there! It's great to talk with you. May I know your name? {"room": "mock_room"} DEBUG livekit.…ugins.aws TEXT_OUTPUT_CONTENT_END: { "event": { "contentEnd": { "completionId": "806ea72e-f551-484a-818f-1db1fd3b6e76", "contentId": "485f98ca-d5b7-4ca0-acbb-6ad0c1c501c4", "promptName": "8c206807-e833-4d3a-88e8-08633e192a2c", "sessionId": "622587c2-58cd-4a3b-8c95-07a3a14460db", "stopReason": "PARTIAL_TURN", "type": "TEXT" } } } {"room": "mock_room"} 22:58:46.876 DEBUG livekit.…ugins.aws AUDIO_OUTPUT_CONTENT_START: { "event": { "contentStart": { "audioOutputConfiguration": { "channelCount": 1, "encoding": "base64", "mediaType": "audio/lpcm", "sampleRateHertz": 24000, "sampleSizeBits": 16 }, "completionId": "806ea72e-f551-484a-818f-1db1fd3b6e76", "contentId": "05d31b23-b219-43d4-b418-2b3e5f8be4d5", "promptName": "8c206807-e833-4d3a-88e8-08633e192a2c", "role": "ASSISTANT", "sessionId": "622587c2-58cd-4a3b-8c95-07a3a14460db", "type": "AUDIO" } } } {"room": "mock_room"} 22:58:51.045 INFO livekit.agents shutting down worker {"id": "unregistered"} 22:58:51.047 INFO livekit.…ugins.aws Nova Sonic handles interruption automatically via barge-in detection. The model detects when users start speaking and stops generation automatically. {"room": "mock_room"} 22:58:51.050 INFO livekit.…ugins.aws attempting to shutdown agent session {"room": "mock_room"} 22:58:51.051 DEBUG livekit.…ugins.aws [SEND] {"event":{"contentEnd":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c","contentName":"c7280c6b-2c56-4977-84f8-6427d574e2a9"}}} {"room": "mock_room"} 22:58:51.785 DEBUG livekit.…ugins.aws [SEND] {"event":{"promptEnd":{"promptName":"8c206807-e833-4d3a-88e8-08633e192a2c"}}} {"room": "mock_room"} 22:58:51.787 DEBUG livekit.…ugins.aws [SEND] {"event":{"sessionEnd":{}}} {"room": "mock_room"} 22:58:51.788 DEBUG livekit.…ugins.aws [SESSION] Recycle timer cancelled {"room": "mock_room"} 22:58:52.317 INFO livekit.…ugins.aws stream already closed, exiting {"room": "mock_room"} 22:58:52.319 INFO livekit.…ugins.aws main output response stream processing task exiting {"room": "mock_room"} 22:58:52.321 DEBUG livekit.…ugins.aws CHAT CONTEXT: [ChatMessage(id='item_e7c235586c62', type='message', role='assistant', content=["Hello there! It's great to talk with you. May I know your name?\n"], interrupted=False, transcript_confidence=None, extra={}, metrics={}, created_at=1766444326.874805, hash=None)] {"room": "mock_room"} 22:58:52.322 INFO livekit.…ugins.aws Session end {"room": "mock_room"} 22:58:52.324 DEBUG livekit.agents session closed {"reason": "user_initiated", "error": null, "room": "mock_room"} 22:58:52.327 DEBUG livekit.agents shutting down job task {"reason": "", "user_initiated": false, "room": "mock_room"} 22:58:52.328 DEBUG livekit.agents job exiting {"reason": "", "tid": 33928, "job_id": "fake-job-ba8271a100bd", "room_id": "FAKE_RM_3429e561dbf3"} 22:58:52.329 DEBUG livekit.agents http_session(): closing the httpclient ctx 22:58:52.330 DEBUG livekit.agents http_session(): creating a new httpclient ctx 22:58:52.332 INFO livekit.agents process exiting {"reason": "", "pid": 1845, "inference": true} darryncampbell@Mac agent-starter-python %