livekit / agents-js

Build realtime multimodal AI agents with Node.js
https://docs.livekit.io/agents
Apache License 2.0
113 stars 12 forks source link

Multimodal Agent with complete API #74

Closed bcherry closed 3 weeks ago

bcherry commented 3 weeks ago

This should essentially make both the core package and the OpenAI plugin feature-complete. Node agents is now capable of powering the realtime playground.

Note on the "main package" move:

I spent a while trying to make circular dependencies work but it ended up being quite difficult and is also explicitly incompatible with turbo.

I ultimately decided that we should punt work on that for now and instead just dropped a couple of abstract top-level types and any for some of the underlying stuff and called it a day. The any type is exposed to customers only when they acquire the session, which requires a simple as openai.realtime.RealtimeSession.

The only other downside to this approach is I think it precludes the use of TypedEmitter on RealtimeSession, because then we'd have to define all the messages it produces and their signatures in the main abstract class, which felt like too much.

The other options would be to leave MMA in the OpenAI plugin or get rid of the OpenAI plugin and make it part of the main package. Both options felt worse to me.

Final note: The names of some new emitted events and the base abstract class are subject to change, pending @theomonnom 's final choices in Python.

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: d14b2eff44e79e5cb8a9fe1624fa59c0b7d2892c

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR