LiveAgent
autogen.beta.live.realtime.LiveAgent #
LiveAgent(name, prompt=(), *, config, hitl_hook=None, tools=(), middleware=(), observers=(), dependencies=None, variables=None, plugins=(), stream=None)
Realtime STT agent. Open a session via agent.run().
If stream is omitted, owns a fresh MemoryStream; otherwise binds to the supplied one. run() is an async context manager that yields the owned ConversationContext so peers (Player, Recorder) can share it.
prompt accepts the same shapes as Agent.prompt — a string, a PromptHook callable, or any iterable mixing both. Callable hooks are resolved once at session open against the ConversationContext (no ModelRequest — realtime is session-scoped, not request-scoped). The resulting iterable of strings is forwarded as instructions to the provider's session, which is responsible for joining them.
Source code in autogen/beta/live/realtime.py
hitl_hook #
Source code in autogen/beta/live/realtime.py
prompt #
prompt(func: None = None) -> Callable[[PromptHook], PromptHook]
Source code in autogen/beta/live/realtime.py
tool #
tool(function=None, *, name=None, description=None, schema=None, sync_to_thread=True, middleware=())
Source code in autogen/beta/live/realtime.py
add_tool #
add_middleware #
insert_middleware #
add_observer #
run async #
run(*, dependencies=None, variables=None, prompt=(), config=None, tools=(), middleware=(), observers=(), hitl_hook=None)
Source code in autogen/beta/live/realtime.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |