forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoice_agent.py
More file actions
30 lines (24 loc) · 996 Bytes
/
Copy pathvoice_agent.py
File metadata and controls
30 lines (24 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
Simple voice agent for MS Agent Framework — no tools.
The voice demo tests transcription and basic chat, not tool execution.
Using a tool-free agent avoids the tool-call loop problem where the backend
agent executes a tool but doesn't loop back to the LLM for a text summary,
resulting in empty assistant responses in the AG-UI stream.
"""
from __future__ import annotations
from agent_framework import Agent, BaseChatClient
from agent_framework_ag_ui import AgentFrameworkAgent
def create_voice_agent(chat_client: BaseChatClient) -> AgentFrameworkAgent:
"""Instantiate a simple voice demo agent with no tools."""
base_agent = Agent(
client=chat_client,
name="voice_agent",
instructions="You are a helpful, concise assistant.",
tools=[],
)
return AgentFrameworkAgent(
agent=base_agent,
name="VoiceDemoAgent",
description="Simple assistant for voice demo — no tools.",
require_confirmation=False,
)