Skip to content

kainotomo/ph-agent-hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

543 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PH Agent Hub

PH Agent Hub Banner

License: MIT GitHub Stars Last Commit Issues Docker Pulls Build Try the Widget Demo Video

Screenshots

Chat UI Admin UI Widget Demo
Chat Interface Admin Panel Embeddable Widget

💬 Live embedded widget — Visit kainotomo.com/ph-agent-hub and click the chat icon in the bottom-right corner to try the embedded widget yourself.

PH Agent Hub is a multi-tenant AI application platform for teams that need both:

  • a production chat experience for end users
  • an operational admin control plane for models, tools, tenancy, and governance

It is built on FastAPI + React and uses the Microsoft Agent Framework for agent runtime orchestration.

Live demo: agent.kainotomo.com/demo

Why This Exists

Most open-source AI chat projects are strong at single-tenant chat UX or developer experimentation. PH Agent Hub is optimized for teams shipping tenant-isolated AI products where operations matter as much as chat quality.

What you get in one system:

  • dual UI model: Chat Area + Admin Area in one web app
  • tenant isolation at the backend authorization and data layer
  • model and tool governance per tenant
  • embedded website widget for anonymous or guided external usage
  • deployment that stays simple: Docker Compose dev and prod paths

Run In 3 Commands

git clone https://github.com/kainotomo/ph-agent-hub.git
cd ph-agent-hub/infrastructure
cp env.example env

Then set required env values in env and start:

docker compose up --build

Required env values:

Variable Why it is required
JWT_SECRET Signs access and refresh tokens
ENCRYPTION_KEY Encrypts provider API keys at rest
ADMIN_EMAIL Bootstraps initial admin user
ADMIN_PASSWORD Bootstraps initial admin password
At least one provider key Enables model inference (DeepSeek/OpenAI/Anthropic/etc.)

Endpoints after startup:

Default login on first run: admin@phagent.local / admin (change immediately).

Who It Is For

  • Teams building tenant-aware AI SaaS or internal multi-business-unit copilots
  • Developers who need configurable tools, models, and skills without hard-coding per customer
  • Operators who need auditability, usage visibility, and role-based controls

Differentiators

  • Multi-tenant from the core domain model, not bolted on later
  • Built-in admin control plane for real operations, not only prompt experimentation
  • DeepSeek stabilizer layer (reasoning strip, JSON repair, retry orchestration)
  • Embeddable chat widget with anonymous guest flow and demo-mode support
  • Microsoft Agent Framework runtime integration for workflow-friendly agent execution

How It Compares

Technical comparison for first-pass evaluation.

Capability PH Agent Hub Dify Onyx Open WebUI LibreChat
First-class multi-tenant isolation Yes Partial (varies by setup) Team-oriented, not full tenant governance Primarily single-instance Primarily single-instance
Unified Chat + Admin product surfaces Yes Yes More knowledge assistant focus Chat-first Chat-first
Tenant-scoped model + tool governance Yes Partial Partial Limited by deployment pattern Limited by deployment pattern
Embeddable widget for external websites Yes Yes Not primary focus Limited Limited
DeepSeek hardening layer (JSON repair/retry) Yes No native equivalent No native equivalent No native equivalent No native equivalent
Self-host with one Compose stack Yes Yes Yes Yes Yes
Built on Microsoft Agent Framework runtime Yes No No No No

Notes:

  • "Partial" means achievable but usually depends on custom deployment conventions or enterprise configuration.
  • Validate against your own requirements and current upstream versions before final adoption decisions.

Visual Architecture

flowchart TB
    subgraph Frontend[React Frontend]
        Chat[Chat Area<br/>end users]
        Admin[Admin Area<br/>admins and managers]
    end

    Chat -->|REST + SSE| API
    Admin -->|REST| API

    subgraph Backend[FastAPI + Agent Runtime]
        API[API Layer]
        Auth[Auth + RBAC]
        Agents[MAF Execution]
        Services[Models • Tools • Sessions • Memory]
        API --> Auth
        API --> Agents
        API --> Services
    end

    Services --> DB[(MariaDB)]
    Services --> Cache[(Redis)]
    Services --> Obj[(MinIO)]

    subgraph TenantBoundary[Tenant Isolation Boundary]
        T1[Tenant A data]
        T2[Tenant B data]
        T3[Tenant N data]
    end

    Auth --> TenantBoundary
Loading

For deeper architecture detail, see docs/architecture-overview.md.

Feature Snapshot

End Users

  • Streaming chat responses with SSE
  • Model selection from tenant-enabled providers
  • Templates, prompts, and skills
  • File uploads + RAG search support
  • Session branching, feedback, full-text search
  • Temporary sessions and finalization flow

Admins And Managers

  • Tenant, user, and role management
  • Model and tool registration with encrypted secrets
  • Template and skill governance
  • Usage analytics and audit logs
  • Demo tenant and public try-it-now controls

Platform

  • Multi-tenant authorization and data boundaries
  • Docker-native deployment for dev and production
  • Extensible tools and model adapters
  • Backend services that can be patched and extended safely

Folder Structure

.
├── backend/          # FastAPI app, agent runtime integration, services, DB models
├── frontend/         # React app for Chat Area and Admin Area
├── docs/             # Architecture, guides, deployment and data model docs
└── infrastructure/   # Docker Compose, environment templates, reverse proxy config

Documentation Map

Start here:

Role-specific guides:

Engineering references:

💼 Licensing

  • Free: MIT license, up to 3 tenants — get started
  • Pro: €299/year, unlimited tenants — buy license
  • Cloud Hosted: €49/month, fully managed — get hosted

💬 Community

About

PH Agent Hub is a modular AI platform with a Chat UI for users and an Admin UI for managing models, tools, tenants, and users. Powered by a flexible agent backend, it supports multi‑tenant setups, DeepSeek‑compatible workflows, and Docker‑based deployment.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors