Introducing PH Agent Hub — Open-Source, Multi-Tenant AI Platform
Why We Built It
At KAINOTOMO PH LTD, we've been running AI-powered internal tools for years. We used OpenAI, then DeepSeek, then various frameworks — but we kept running into the same problem:
Every AI platform was either:
- A single-user chat app with no admin controls
- An enterprise product with per-seat pricing that made no sense for a small team
- A platform that locked us into one model provider
- An open-source project that was multi-user but not multi-tenant
We needed something different. We needed a platform where:
- Different clients or departments have completely isolated environments — their own users, models, tools, templates, and data
- An admin can manage everything through a dedicated UI — tenants, models, tools, users
- Each tenant chooses their own AI model — DeepSeek, OpenAI, Anthropic, Ollama, whatever works for them
- It's self-hosted — our data never leaves our server
- It's lightweight — Docker Compose, one server, done
Nothing on the market checked all those boxes. So we built it.
Today, I'm proud to introduce PH Agent Hub — an open-source, MIT-licensed, multi-tenant AI platform that we use daily in production.
What Makes PH Agent Hub Different
There are many open-source AI chat platforms — Dify, Onyx, LibreChat, Open WebUI. They're all excellent projects. But none of them do what PH Agent Hub does out of the box.
1. True Multi-Tenancy (Not Just Multi-User)
Most platforms are multi-user — everyone shares the same models, tools, and configuration. PH Agent Hub is true multi-tenant:
| Feature | Multi-User | Multi-Tenant (PH Agent Hub) |
|---|---|---|
| Each tenant has own users | ❌ Shared | ✅ Isolated |
| Each tenant has own models | ❌ Shared | ✅ Per-tenant config |
| Each tenant has own tools | ❌ Shared | ✅ Per-tenant activation |
| Each tenant has own templates | ❌ Shared | ✅ Custom per tenant |
| Data isolation | ❌ All in one pool | ✅ Fully separated |
This matters if you're a consultancy managing AI for multiple clients, an enterprise with separate departments, or a hosting provider offering AI-as-a-service.
2. Dual UI — Chat + Admin
PH Agent Hub ships with two UIs in one React application:
- Chat Area — where end users interact with AI agents, manage sessions, upload files, use tools, and configure their personal memory
- Admin Area — where administrators manage tenants, models, tools, templates, skills, and users
No separate dashboard to install. No configuration via environment variables. It's all there, in one clean interface.
3. DeepSeek-First with Stabilizer
We use DeepSeek extensively. It's powerful, but it has quirks — reasoning tokens that leak into responses, occasional JSON formatting issues, connection hiccups.
PH Agent Hub includes a built-in DeepSeek Stabilizer that handles:
- Reasoning token stripping — automatically removes thinking tokens from responses
- JSON repair — recovers malformed JSON from model outputs
- Intelligent retry — retries with adjusted parameters on failure
- Token usage tracking — per-tenant and per-user
No other open-source platform has this level of DeepSeek integration.
4. Bring Your Own Key (BYOK)
Each tenant can use their own API key for their chosen model provider. This means:
- You don't pay for their tokens
- They control their own usage and billing
- They can switch providers anytime
- You only charge for the platform, not the AI
This is a game-changer for hosting providers and consultancies.
5. Session Branching
Users can edit previous messages or regenerate responses at any point. Each edit creates a new branch, preserving the full conversation history. No more losing context because you typed a typo.
6. Embeddable Chat Widget
PH Agent Hub includes a lightweight, embeddable chat widget — a simple <script> tag that businesses can paste on their website to add an AI-powered chat assistant. It talks directly to your PH Agent Hub backend, maintaining full tenant isolation.
Architecture
PH Agent Hub is built on a modern, containerized stack:
┌─────────────┐ ┌─────────────┐
│ React │ │ FastAPI │
│ Frontend │◄──►│ Backend │
│ (Next.js) │ │ (Python) │
└─────────────┘ └──────┬──────┘
│
┌──────┴──────┐
│ Microsoft │
│ Agent │
│ Framework │
└─────────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ MariaDB │ │ Redis │ │ MinIO │
│ DB │ │ Cache │ │ Storage │
└─────────┘ └─────────┘ └─────────┘
All components run in Docker containers. Deploy anywhere you can run docker compose up -d.
Compared to Alternatives
| Feature | PH Agent Hub | Dify | Onyx | Open WebUI |
|---|---|---|---|---|
| True multi-tenant | ✅ Native | ✅ Workspace | ✅ Org | ❌ Multi-user |
| Admin UI | ✅ Full | ✅ Full | ✅ Full | ⚠️ Basic |
| BYOK | ✅ Per tenant | ✅ Workspace | ✅ Per org | ✅ Per user |
| DeepSeek stabilizer | ✅ Unique | ❌ | ❌ | ❌ |
| Session branching | ✅ Native | ❌ | ❌ | ❌ |
| Embeddable widget | ✅ Built-in | ❌ | ✅ | ✅ |
| RAG | ⚠️ Coming | ✅ | ✅ | ✅ |
| Visual workflows | ❌ | ✅ | ❌ | ❌ |
| License | MIT | Apache 2.0 | MIT | Custom |
| Docker deployment | ✅ | ✅ | ✅ | ✅ |
Who Is It For?
- Consultancies & Agencies — manage AI for multiple clients from one platform, with full tenant isolation
- IT Teams — deploy a self-hosted AI assistant for your organization, with admin controls
- SaaS Providers — white-label AI chat for your customers
- Developers — build and test AI agents with a clean, containerized platform
- Anyone who values privacy — keep your data on your own server
Get Started
PH Agent Hub is free and open-source (MIT license) for up to 3 tenants. Deploy it in minutes:
git clone https://github.com/kainotomo/ph-agent-hub.git
cd ph-agent-hub
cp infrastructure/.env.example .env
docker compose -f infrastructure/docker-compose.prod.yml up -d
Pricing Options
| Plan | Price | What You Get |
|---|---|---|
| Free 🆓 | €0 | Self-hosted, up to 3 tenants, all features |
| Pro 💼 | €299/year | Self-hosted, unlimited tenants, priority support |
| Cloud Hosted ☁️ | €49/month | We host and manage it for you, 1+ tenants |
Try the Demo
Experience PH Agent Hub live — no installation required:
What's Next
PH Agent Hub is actively developed (v1.11.3, 411+ commits). Here's what's coming:
- MCP (Model Context Protocol) support — connect thousands of community tools
- Ollama integration — run fully local AI models
- RAG capabilities — chat with your documents
- API access for tenants — build custom integrations
- Plugin system — extend the platform without modifying core code
We'd Love Your Feedback
PH Agent Hub is a tool we built for ourselves, and we're sharing it because we believe others need it too.
- 🐛 Report a bug
- 📧 Email: info@kainotomo.com
- 🌐 Website: kainotomo.com/ph-agent-hub
- 🐙 GitHub: github.com/kainotomo/ph-agent-hub
PH Agent Hub — Multi-tenant AI, self-hosted and under your control.