Moody Bear Platform
I run several apps that call AI models, and I wanted one honest answer to two questions... what does each AI feature cost, and how often is it wrong? So every model call from every app now goes through one gateway, and every call gets traced.
how it works
Each app gets its own gateway key instead of a provider key. The gateway forwards the call to Anthropic or OpenAI and records it in Langfuse with tokens, cost, latency and the full prompt and reply. Because the key says which app made the call, cost and quality roll up per app without any app having to report anything.
what's running
- Langfuse v4 and its AI Gateway in Docker, with every secret generated by script and nothing reachable from outside the machine
- One-command start and stop, because the same machine is used for other work during the day
- A first app wired through it... a trivia question generator where a second model fact-checks every question before it ships, which is my first real eval
what's next
- An agent registry in Python with FastAPI and Postgres, listing every AI feature, which app owns it, what it's allowed to do and what it costs
- A React and TypeScript dashboard across all apps... cost and quality trends in one view
- Tenant separation with Postgres row-level security, so each app only ever sees its own data
- An MCP server that gives agents read-only context from each app
ground rules
AI agents write a lot of my code, so they work under the same rules everywhere. They don't commit, and they don't run anything against a database. They write the change or the script, and I review it and run it. The platform is partly a way to make those rules visible.
Add a link to the repo here once it's public, or remove this line.