-
Notifications
You must be signed in to change notification settings - Fork 331
Integrate Voice Agents into Agents SDK #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
commit: |
|
@renandincer do you mind fixing all the build issues please? |
|
I'll take over this PR. thanks @renandincer / @itzmanish! |
|
cool! when is this gonna be released guys? |
|
@itzmanish can you give me access to push to this branch |
craigsdennis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love seeing this progress, I was just perusing and dropped some thoughts
| JSON.stringify({ | ||
| type: "media", | ||
| version: 1, | ||
| identifier: randomUUID(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier is random in every loop..that intentional?
| } from "./realtime"; | ||
|
|
||
| // export const REALTIME_AGENTS_SERVICE = "https://agents.realtime.cloudflare.com"; | ||
| export const REALTIME_AGENTS_SERVICE = "https://kind-waves-give.loca.lt"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
| return split.length > 2; | ||
| } | ||
|
|
||
| export async function* processNDJSONStream( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like SSE parsing, do we have a library/utility here already?
| { | ||
| private _state = DEFAULT_STATE as State; | ||
| private _disposables = new DisposableStore(); | ||
| private realtime?: Realtime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want an _realtime here to follow existing pattern
| Props extends Record<string, unknown> = Record<string, unknown> | ||
| > | ||
| extends Server<Env, Props> | ||
| implements RealtimePipelineComponent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like we want a wrapper around the Agent that turns it into a pipeline component. Exposes all the stuff in L#327 - L#344. Could wrap any primitive that way. Feels odd to "install" by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I might not be understanding what a "component" is in this case.
| await this.mcp.restoreConnectionsFromStorage(this.name); | ||
| await this.broadcastMcpServers(); | ||
| if (this.realtimePipelineComponents) { | ||
| const { CF_ACCOUNT_ID, CF_API_TOKEN } = this.env as { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would do well in the wrapper. @threepointone can you get at these values without forcing them to be added to env?
| }; | ||
| }; | ||
|
|
||
| export class Realtime { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really feels like it should be a binding to me. Like I want env.REALTIME and all this stuff is configured in wrangler I never see it.
| // Different STT provider | ||
| const stt = new CustomSTT(this.env.CUSTOM_API_KEY); | ||
|
|
||
| // Multiple TTS voices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably deserves it's own folder if it stays in the library. I think realtime is where I would look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a front-end for this?
No description provided.