Inspiration

A streamer is the strategist, the producer and the moderator of their own show, usually alone and while live. General-purpose AI agents help one person in private. But a stream is public and shared: the audience is part of the show, and a personal assistant has no way to include them. We wanted an agent that knows the streamer's actual channel, helps them plan and run a show, and gives chat a real part in it.

What it does

Balright is a strategist, personal guide and co-moderator for Twitch streamers.

  • Real Twitch sign-in and channel knowledge. The streamer signs in with Twitch and Balright reads their real channel: stream metadata, clips, archives, schedule and community settings. Nothing is invented. A new channel with no history is shown as exactly that.
  • Strategist and guide. Onboarding is built around the streamer's goals, and a chat assistant drafts show plans and answers from that channel data.
  • Audience participation through a Twitch Extension. Viewers join a queue and vote in polls on the stream page. The creator sees the results and can send private feedback. The Extension is installed and running in Hosted Test.
  • On-stream overlay. A revocable OBS browser-source overlay shows the live queue and polls to everyone watching.
  • Co-moderator actions on Twitch. Balright proposes changes such as channel tags and slow mode. The creator approves, Balright executes them with a narrow Twitch grant, then reads the result back from Twitch to confirm it landed.
  • Live events. EventSub subscriptions (stream online/offline, channel update, incoming raid) and chat commands such as !join feed the show.

How we built it

We built Balright with OpenAI Codex, working from one owning Codex thread that coordinated a set of bounded Codex sessions for the frontend, backend, tests and Extension. The stack is React, Vite and TypeScript with ReUI/shadcn components, a Node API on Cloudflare Workers, the Twitch API, EventSub and Extensions, an OBS browser-source overlay, and zod validation at every API boundary. The text assistant calls a Claude model through Anthropic's API. Toward the end of the build, ownership moved to a Claude session for deployment and Extension hardening.

Challenges

  • Cloudflare Workers does not support the redirect: 'error' fetch mode, which made production Twitch sign-in fail even though it worked locally. Every provider transport now uses a fail-closed manual redirect.
  • Twitch locks the Extension tester list outside Local Test, so we had to move through Hosted Test to get a real viewer through the panel.
  • Native Twitch polls and predictions require Affiliate or Partner status, so we built a Balright poll that works for any channel.
  • Fixtures proved the logic, but real accounts exposed the gaps, so we verified sign-in, persistence across redeploys, scoped grants and readback on the public deployment.

Safety

Every write to a channel is proposed, approved by the creator, executed with the narrowest Twitch scope, and verified by an independent read of the channel. Tokens are encrypted, sessions are Secure and HttpOnly, and redirects fail closed.

What's next

Voice, a fully live-tested show, automated moderation, clip selection and recaps, and public Extension review.

Built With

Share this project:

Updates