Click to add balls. Drag to throw. Gravity shifts every 5 seconds.

App Agent Template

Build AI-powered apps where users pay their own LLM costs.

Fork it. Customize it. Ship it.

Fork on GitHub

What is this?

An open-source template for building AI chat applications with built-in authentication and billing. Your users sign in with AI@YourService and pay for their own LLM usage - you focus on your app, not billing infrastructure.

AI SDK v6Cloudflare Agents SDKReact Router 7TypeScriptTailwind CSS

Built-in features

AI Chat with Tools

Streaming responses, tool calling, multi-turn conversations. Powered by AI SDK v6.

Voice Input

Built-in speech-to-text transcription. Talk to your AI agent hands-free.

Cross-Device Sync

State persists in Durable Objects. Pick up where you left off on any device.

One-Click Deploy

Deploy to Cloudflare Workers with wrangler. Global edge deployment included.

Export / Import

Built-in data portability. Users can export their data anytime.

Plan & Act Modes

Structured workflows: plan before acting, or let the agent execute directly.

How billing works

When users sign in to your app, they authenticate via AI@YourService and get their own credits. Every LLM call is billed to their account, not yours.

New users get free credits to try your app. Power users can add more credits or bring their own API keys (BYOK).

You build the app. We handle auth, billing, and the LLM gateway.

Get started in 5 minutes

# Clone the template git clone https://github.com/atyourserviceai/app-agent-template cd app-agent-template # Install & configure pnpm install cp .dev.vars.example .dev.vars # Start developing pnpm run dev
  1. Fork or clone the template from GitHub
  2. Configure your .dev.vars with AI@YourService credentials
  3. Customize the agent tools in src/agent/
  4. Replace the demo UI with your own application
  5. Deploy with pnpm run deploy

Try the demo

This template includes a bouncing ball simulation to demonstrate AI-controlled interactions. Sign in to chat with the AI and control the simulation with natural language.

Build your AI-powered app today.

Open source under MIT license.

Loading project personal...