Skip to main content

Build your own agents, chat with them on rubry.ai

rubry.ai/chat is a free chat with Rubrion's agents. It can also talk to your agents: paste an endpoint and a key, and your agent joins the menu, running on your own model provider and outside Rubry's daily limits.

These docs show how to build those agents with the open-source rubry template, deploy them on your Cloudflare account, and connect them to rubry.ai or any other chat client.

Your own agent answering on rubry.ai

How it fits together​

any chat (rubry.ai, Open WebUI, your app)
│ Authorization: Bearer rk_… OpenAI-compatible /v1
▼
middleware Worker: API keys · model provider (key encrypted) · agents on/off · settings page
│ service binding
▼
agents Worker: your Mastra agents and tools · "auto" routing · memory in D1
│
▼
Workers AI (built in, no keys) or any OpenAI-compatible provider
  • The template (github.com/rubrion/rubry) gives you both Workers, a settings page and two example agents. You write agents and tools in TypeScript.
  • The library (@rubrion/mastra-cloudflare) does the heavy lifting under the template: the OpenAI-compatible agent server, routing, D1 memory and model helpers. You can also use it on its own.
  • rubry.ai is one client among many: anything that speaks the OpenAI chat API can use your agents.

Where to start​

You want to…Go to
See it work in two minutes, without installing anythingTry the example
Run your own agents locallyQuick start
Write an agent or a toolAgents and tools
Put it onlineDeploy
Use it from rubry.ai, Open WebUI or your codeConnect a client
Know what's limited, and who paysLimits
Have it built and run for youDo it yourself, or with us