This document provides a high-level introduction to AxonHub, an all-in-one AI development platform that serves as a unified API gateway and management system for multiple LLM providers. It explains the platform's purpose, core architecture, key features, and technology stack.
For detailed information about specific subsystems:
AxonHub is an AI development platform that provides a unified API gateway for accessing 30+ AI providers through standardized interfaces. The platform acts as an intelligent proxy between client applications and AI providers, offering API format translation, adaptive load balancing, comprehensive observability, and fine-grained permission control.
Core Capabilities:
| Capability | Description |
|---|---|
| Unified API Gateway | OpenAI-compatible, Anthropic Messages, and Gemini API endpoints that work with existing SDKs |
| API Translation | Automatic format conversion between different provider APIs (OpenAI ↔ Anthropic ↔ Gemini) |
| Multi-Provider Support | Access 30+ AI providers including OpenAI, Anthropic, Gemini, Zhipu, DeepSeek, Moonshot, and more |
| Channel Management | Configure and monitor AI provider connections with health checks and performance tracking |
| Load Balancing | Adaptive channel selection with automatic failover and retry logic |
| Tracing & Observability | Thread-aware request tracing with AH-Trace-Id and AH-Thread-Id headers |
| Permission System | RBAC-based access control with API key scopes and profiles |
| Web UI | React-based administration interface for managing channels, models, API keys, and viewing logs |
Sources: README.md20-36 README.md60-170
Architecture Summary:
AxonHub operates as a three-tier system:
LLMPipeline at llm/pipeline/pipeline.go orchestrates request processing through transformer chains, while ChannelService at internal/server/biz/channel.go manages provider connectionsxcacheSources: README.md20-28 llm/README.md1-10
The following diagram illustrates how a client request flows through AxonHub's transformation pipeline:
Processing Stages:
LLMRequest at llm/model.goLLMRequest → provider-specific formatLLMResponse → original client formatFor detailed pipeline architecture, see Request Processing Pipeline.
Sources: llm/README.md32-108
AxonHub supports 30+ AI providers through its transformer system. Each provider has dedicated transformers at llm/transformer/:
| Provider | Channel Types | Supported APIs | Status |
|---|---|---|---|
| OpenAI | openai, openai_responses, openai_fake | Chat Completions, Responses, Embeddings | ✅ Done |
| Anthropic | anthropic, anthropic_aws, anthropic_gcp | Messages API | ✅ Done |
| Gemini | gemini, gemini_openai, gemini_vertex | GenerateContent API | ✅ Done |
| Zhipu AI | zhipu, zhipu_anthropic | GLM-4.5, GLM-4.5-air | ✅ Done |
| DeepSeek | deepseek, deepseek_anthropic | DeepSeek-V3.1 | ✅ Done |
| Moonshot AI | moonshot, moonshot_anthropic | Kimi models | ✅ Done |
| ByteDance Doubao | doubao, doubao_anthropic | Doubao models | ✅ Done |
| Jina AI | jina | Embeddings, Reranker | ✅ Done |
| AWS Bedrock | anthropic_aws | Claude on AWS | 🔄 Testing |
| Google Cloud | anthropic_gcp, gemini_vertex | Claude/Gemini on GCP | 🔄 Testing |
Additional supported providers include: vercel, deepinfra, ppio, siliconflow, volcengine, minimax, aihubmix, burncloud, github, claudecode, xai, openrouter, longcat, modelscope, bailian, zai.
Sources: llm/README.md155-215 README.md704-721
AxonHub provides multiple API endpoints that are compatible with existing SDKs:
Key API Features:
| API Format | Endpoints | Compatibility | Notes |
|---|---|---|---|
| OpenAI Chat Completions | /v1/chat/completions, /v1/models | Fully compatible | Full streaming, tool calling support |
| OpenAI Responses | /v1/responses | Partial | No previous_response_id support |
| Anthropic Messages | /anthropic/v1/messages, /anthropic/v1/models | Fully compatible | System messages, caching, thinking content |
| Gemini | /gemini/v1beta/models/{model}:generateContent | Fully compatible | Multi-modal, chat sessions |
| Embedding | /v1/embeddings, /jina/v1/embeddings | Fully compatible | Text and multimodal embeddings |
| Rerank | /v1/rerank, /jina/v1/rerank | Fully compatible | Document reranking |
API Interoperability: Use OpenAI SDK to call Anthropic models, or Anthropic SDK to call OpenAI models. AxonHub handles automatic format translation through transformers at llm/transformer/
For API usage examples, see Unified API Endpoints.
Sources: README.md117-159 docs/en/api-reference/unified-api.md14-22
AxonHub is built using modern, production-ready technologies:
Backend (Go)
| Component | Technology | Purpose | Location |
|---|---|---|---|
| HTTP Framework | Gin | REST API server | internal/server/api/ |
| ORM | Ent | Type-safe database access | ent/schema/ |
| GraphQL | gqlgen | Admin API code generation | internal/gql/ |
| Dependency Injection | Uber fx | Application lifecycle | internal/server/server.go |
| Configuration | Viper | Multi-source config management | internal/conf/ |
| HTTP Client | Custom | LLM provider requests | llm/httpclient/ |
Frontend (React + TypeScript)
| Component | Technology | Purpose | Location |
|---|---|---|---|
| UI Framework | React 18 | Component library | frontend/src/ |
| State Management | React Query | Server state caching | frontend/src/features/ |
| UI Components | shadcn/ui | Design system | frontend/src/components/ui/ |
| Table Library | TanStack Table | Data grids | frontend/src/components/data-table/ |
| Validation | Zod | Runtime type validation | frontend/src/features/*/data/schema.ts |
| API Client | GraphQL Code Generator | Type-safe API client | frontend/src/lib/graphql/ |
| Routing | React Router | Client-side routing | frontend/src/router.tsx |
Database Support
Supported databases with automatic migrations via Ent ORM at ent/migrate/:
Sources: README.md234-246 README.md400-410
AxonHub supports multiple deployment methods:
1. Binary Deployment (Personal/Small Teams)
Download pre-built binaries from GitHub Releases with built-in SQLite database:
Binary releases are built via .goreleaser.yml with version information embedded from internal/build/VERSION
2. Docker Deployment
Multi-arch Docker images (amd64/arm64) available at Docker Hub:
Docker images are built via .github/workflows/docker-publish.yml and Dockerfile
3. Cloud Deployment
Configuration Management
Configuration is loaded via Viper at internal/conf/config.go from multiple sources:
config.yml fileAXONHUB_)For detailed configuration options, see Configuration.
Sources: README.md173-323 README.md234-267
axonhub/
├── cmd/ # Application entry points
│ └── axonhub/
│ └── main.go # Main application entry
├── internal/ # Private application code
│ ├── conf/ # Configuration management
│ ├── server/ # HTTP server and handlers
│ │ ├── api/ # REST API endpoints
│ │ ├── biz/ # Business logic services
│ │ └── cache/ # In-memory caching
│ ├── gql/ # GraphQL schema and resolvers
│ └── build/ # Build metadata (VERSION)
├── ent/ # Ent ORM
│ ├── schema/ # Database schema definitions
│ └── migrate/ # Database migrations
├── llm/ # LLM processing pipeline
│ ├── model.go # LLMRequest/LLMResponse models
│ ├── pipeline/ # Request processing pipeline
│ ├── transformer/ # Provider-specific transformers
│ │ ├── openai/ # OpenAI transformer
│ │ ├── anthropic/ # Anthropic transformer
│ │ ├── gemini/ # Gemini transformer
│ │ └── .../ # 30+ provider transformers
│ ├── httpclient/ # HTTP client for providers
│ └── streams/ # Stream processing utilities
├── frontend/ # React admin UI
│ ├── src/
│ │ ├── features/ # Feature-based modules
│ │ │ ├── channels/ # Channel management
│ │ │ ├── models/ # Model configuration
│ │ │ ├── requests/ # Request monitoring
│ │ │ └── apikeys/ # API key management
│ │ ├── components/ # Shared UI components
│ │ └── lib/ # Utilities and GraphQL client
├── .github/workflows/ # CI/CD pipelines
│ ├── test.yml # Test workflow
│ ├── lint.yml # Lint workflow
│ ├── release.yml # Release workflow
│ └── docker-publish.yml # Docker build workflow
├── config.example.yml # Configuration template
├── .goreleaser.yml # Release automation config
├── Dockerfile # Multi-stage Docker build
├── docker-compose.yml # Local development setup
└── README.md # Documentation
Key Directories:
llm/: Core LLM processing engine with transformer pattern architectureinternal/server/biz/: Business logic services including ChannelService, ModelService, TraceServiceent/schema/: Database schema definitions (channels, models, requests, api_keys, etc.)frontend/src/features/: React feature modules with co-located data fetching, schemas, and componentsSources: llm/README.md468-515
The following table maps high-level concepts to specific code entities:
| System Component | Primary Implementation | Purpose |
|---|---|---|
| Unified API Gateway | internal/server/api/chat.go | OpenAI/Anthropic/Gemini compatible endpoints |
| LLM Pipeline | llm/pipeline/pipeline.go | Request orchestration with retry logic |
| Transformer System | llm/transformer/interfaces.go | API format translation interfaces |
| Channel Management | internal/server/biz/channel.go | Provider connection management |
| Channel Service | internal/server/biz/channel.go | CRUD operations, health checks, performance tracking |
| Model Association | internal/server/biz/model.go | Model-to-channel routing rules |
| Request Persistence | internal/server/biz/request.go | Request logging and execution tracking |
| Tracing System | internal/server/biz/trace.go | Thread-aware request tracing |
| GraphQL API | internal/gql/axonhub.resolvers.go | Admin API resolvers |
| Frontend State | frontend/src/features/*/data/ | React Query hooks for server state |
| Configuration | internal/conf/config.go | Viper-based config management |
| Database Schema | ent/schema/ | Ent ORM schema definitions |
Sources: llm/README.md366-467 internal/server/biz/
To start using AxonHub:
http://localhost:8090For development setup, see Development Environment Setup.
Sources: README.md327-393
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.