Skip to content

Conversation

@renandincer
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Oct 7, 2025

⚠️ No Changeset found

Latest commit: 2b99f3c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 7, 2025

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/agents@542

commit: 2b99f3c

@whoiskatrin
Copy link
Contributor

@renandincer do you mind fixing all the build issues please?

@threepointone
Copy link
Contributor

I'll take over this PR. thanks @renandincer / @itzmanish!

@leemuljadi
Copy link

cool! when is this gonna be released guys?

@threepointone
Copy link
Contributor

@itzmanish can you give me access to push to this branch

Copy link
Collaborator

@craigsdennis craigsdennis left a 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(),
Copy link
Collaborator

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";
Copy link
Collaborator

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(
Copy link
Collaborator

@craigsdennis craigsdennis Jan 15, 2026

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;
Copy link
Collaborator

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
Copy link
Collaborator

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

Copy link
Collaborator

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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Collaborator

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.

Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants