axonhub

作者 looplj已验证

⚡️ Open-source AI Gateway — Use any SDK to call 100+ LLMs. Built-in failover, load balancing, cost control & end-to-end tracing.

5,051
Stars
657
Forks
Go
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/looplj/axonhub

快速入门

使用 axonhub 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

AxonHub - All-in-one AI 开发平台

任意 SDK、任意模型、零代码改动

looplj%2Faxonhub | Trendshift


❤️ 赞助商

Atlas Cloud
Atlas Cloud

Atlas Cloud 是一个全模态 AI 推理平台,为开发者提供统一的 AI API 来访问视频生成、图像生成和 LLM API。无需管理多个供应商集成,只需连接一次即可统一访问 300+ 精选模型,涵盖所有模态。

查看 Atlas Cloud 的 全新 Coding plan 促销,获取更经济实惠的 API 访问方案。

无限星河 Infistar.cc
无限星河 Infistar.cc

Infistar.cc 无限星河

AxonHub × Infistar.cc 无限星河|高可用全模型 API · 赋能下一代 AI 网关与多渠道调度

感谢 Infistar.cc 无限星河 赞助本项目!

⚡ 企业级高并发与稳定调度:价格低至官方 1 折,模型倍率公开透明,毫秒级响应完美契合 AxonHub 智能路由与故障转移机制。提供高可用通道与多节点冗余备份,告别限流、429 与断连困扰;
🧠 全系顶尖模型全面支持:深度适配 Chatgpt、Claude 、Gemini、Kimi、GLM、DeepSeek等全矩阵主流模型,原生支持 Claude Code、Codex、OpenCode 等 AI 编程与 Agent 开发工具。
🎨 全模态与前沿生态接入:不仅覆盖文本对话与代码生成,更一站式接入主流生图、视频与 Embedding/Rerank 模型,一个上游渠道即可满足网关全模态分发需求。
🎁 AxonHub 用户专属福利:通过 专属链接 注册即送 [专属赠送额度 / 首充特惠],即开即用,零门槛接入网关测试!


赞助商详情
七牛云 AI
七牛云 AI
七牛云 AI 是七牛云(02567.HK)旗下企业级大模型 MaaS 平台,一站式调用全球 150+ 主流模型,兼容全球主流模型厂商协议,覆盖文本、图像、音频、视频、文件处理等全模态处理能力,服务超过 169 万企业及开发者用户。七牛云 AI 为 AxonHub 项目的用户提供了专属福利:通过此链接注册,企业用户免费领 1200 万 Token,开发者免费领 300 万 Token。
FennoAI
FennoAI
FennoAI 是一家面向企业研发团队和开发者的高稳定、高性能 API 中转服务商,兼容 OpenAI 与 Anthropic 协议,可无缝接入 Codex、Claude Code、OpenCode 等主流 AI 编程工具。平台具备企业级稳定性,可支撑千亿 Token/日的调用规模,并支持境内外主体公对公结算及开票,满足企业级研发与采购需求。作为 AxonHub 用户专属福利,通过专属链接购买订阅,仅需 1.99 美元即可获得价值 50 美元的 Coding Plan 额度。同时支持邀请奖励,邀请好友购买最高可获得 20% 返佣,邀请越多,奖励越高。
Bloome
Bloome
想试用 AxonHub,但不想在本地配置环境?可以在 Bloome 上运行: 快速使用, 通过浏览器或手机一键启动,也可以轻松分享给你的团队。


📖 项目介绍

All-in-one AI 开发平台

AxonHub 是 AI 网关,让你无需改动一行代码即可切换模型供应商。

无论你使用的是 OpenAI SDK、Anthropic SDK 还是任何 AI SDK,AxonHub 都会透明地将你的请求转换为与任何支持的模型供应商兼容的格式。无需重构,无需更换 SDK——只需更改配置即可。

它解决了什么问题:

  • 🔒 供应商锁定 - 从 GPT-4 瞬间切换到 Claude 或 Gemini
  • 🔧 集成复杂性 - 一个 API 格式对接 10+ 供应商
  • 📊 可观测性缺口 - 开箱即用的完整请求追踪
  • 💸 成本控制 - 实时用量追踪和预算管理
AxonHub Architecture

核心特性 Core Features

特性你能获得什么
🔄 任意 SDK → 任意模型用 OpenAI SDK 调用 Claude,或用 Anthropic SDK 调用 GPT。零代码改动。
🔍 完整请求追踪线程级可观测性的完整请求时间线。更快定位问题。
🔐 企业级 RBAC细粒度访问控制、用量配额和数据隔离。
智能负载均衡<100ms 自动故障转移。始终路由到最健康的渠道。
💰 实时成本追踪每次请求的成本明细。输入、输出、缓存 Token——全部追踪。

📚 文档 | Documentation

文档索引 | Documentation Index

DeepWiki

详细的技术文档、API 参考、架构设计等内容,可以访问

  • DeepWiki
  • zread

🎯 演示 | Demo

在我们的 演示实例 上体验 AxonHub!

注意:演示网站目前配置了 Zhipu 和 OpenRouter 的免费模型。

演示账号 | Demo Account


⭐ 特性 | Features

📸 截图 | Screenshots

以下是 AxonHub 的实际运行截图:

系统仪表板
系统仪表板
渠道管理
渠道管理
模型价格
模型价格
模型
模型
追踪查看
追踪查看
请求监控
请求监控

🚀 API 类型 | API Types

API 类型状态描述文档
文本生成(Text Generation)✅ Done对话交互接口OpenAI APIAnthropic APIGemini API
图片生成(Image Generation)✅ Done图片生成Image Generation
重排序(Rerank)✅ Done结果排序Rerank API
嵌入(Embedding)✅ Done向量嵌入生成Embedding API
实时对话(Realtime)📝 Todo实时对话功能-

🤖 支持的提供商 | Supported Providers

提供商 Provider状态 Status支持模型 Models兼容 API
OpenAI✅ 已完成GPT-4, GPT-4o, GPT-5 等OpenAI, Anthropic, Gemini, Embedding, Image Generation
Anthropic✅ 已完成Claude 3.5, Claude 3.0 等OpenAI, Anthropic, Gemini
智谱 AI (Zhipu)✅ 已完成GLM-4.5, GLM-4.5-air 等OpenAI, Anthropic, Gemini
月之暗面 (Moonshot)✅ 已完成kimi-k2 等OpenAI, Anthropic, Gemini
DeepSeek✅ 已完成DeepSeek-V3.1 等OpenAI, Anthropic, Gemini
字节跳动豆包✅ 已完成doubao-1.6 等OpenAI, Anthropic, Gemini, Image Generation
Gemini✅ 已完成Gemini 2.5 等OpenAI, Anthropic, Gemini, Image Generation
Jina AI✅ 已完成Embeddings, Reranker 等Jina Embedding, Jina Rerank
OpenRouter✅ 已完成多种模型OpenAI, Anthropic, Gemini, Image Generation
ZAI✅ 已完成-Image Generation
AWS Bedrock🔄 测试中Claude on AWSOpenAI, Anthropic, Gemini
Google Cloud🔄 测试中Claude on GCPOpenAI, Anthropic, Gemini
NanoGPT✅ 已完成多种模型、图像生成OpenAI, Anthropic, Gemini, Image Generation

🚀 快速开始 | Quick Start

30 秒本地启动 | 30-Second Local Start

# 下载并解压(以 macOS ARM64 为例)
curl -sSL https://github.com/looplj/axonhub/releases/latest/download/axonhub_darwin_arm64.tar.gz | tar xz
cd axonhub_*

# 使用 SQLite 运行(默认)
./axonhub

# 打开 http://localhost:8090
# 首次运行:按照初始化向导设置系统(创建管理员账号,密码至少需要 6 位)

就这样!现在配置你的第一个 AI 渠道,开始通过 AxonHub 调用模型。

零代码迁移示例 | Zero-Code Migration Example

你的现有代码无需任何改动。 只需将 SDK 指向 AxonHub:

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8090/v1",  # 指向 AxonHub
    api_key="your-axonhub-api-key"        # 使用 AxonHub API 密钥
)

# 用 OpenAI SDK 调用 Claude!
response = client.chat.completions.create(
    model="claude-3-5-sonnet",  # 或 gpt-4、gemini-pro、deepseek-chat...
    messages=[{"role": "user", "content": "Hello!"}]
)

切换模型只需改一行:model="gpt-4"model="claude-3-5-sonnet"。无需改动 SDK。


🚀 部署指南 | Deployment Guide

💻 个人电脑部署 | Personal Computer Deployment

适合个人开发者和小团队使用,无需复杂配置。

快速下载运行 | Quick Download & Run

  1. 下载最新版本GitHub Releases

    • 选择适合您操作系统的版本:
  2. 解压并运行

    # 解压下载的文件
    unzip axonhub_*.zip
    cd axonhub_*
    
    # 添加执行权限 (仅限 Linux/macOS)
    chmod +x axonhub
    
    # 直接运行 - 默认使用 SQLite 数据库
    # 安装 AxonHub 到系统
    ./install.sh
    
    # 启动 AxonHub 服务
    ./start.sh
    
    # 停止 AxonHub 服务
    ./stop.sh
    
  3. 访问应用

    http://localhost:8090
    

🖥️ 服务器部署 | Server Deployment

适用于生产环境、高可用性和企业级部署。

数据库支持 | Database Support

AxonHub 支持多种数据库,满足不同规模的部署需求:

数据库支持版本推荐场景自动迁移链接
SQLite3.0+开发环境、小型部署✅ 支持SQLite
TiDB CloudStarterServerless, Free tier, Auto Scale✅ 支持TiDB Cloud
TiDB CloudDedicated分布式部署、大规模✅ 支持TiDB Cloud
TiDBV8.0+分布式部署、大规模✅ 支持TiDB
Neon DB-Serverless, Free tier, Auto Scale✅ 支持Neon DB
PostgreSQL15+生产环境、中大型部署✅ 支持PostgreSQL
MySQL8.0+生产环境、中大型部署✅ 支持MySQL

配置文件 | Configuration

AxonHub 使用 YAML 配置文件,支持环境变量覆盖:

# config.yml
server:
  port: 8090
  name: "AxonHub"
  debug: false

db:
  dialect: "tidb"
  dsn: "<USER>.root:<PASSWORD>@tcp(gateway01.us-west-2.prod.aws.tidbcloud.com:4000)/axonhub?tls=true&parseTime=true&multiStatements=true&charset=utf8mb4"

log:
  level: "info"
  encoding: "json"

环境变量:

AXONHUB_SERVER_PORT=8090
AXONHUB_DB_DIALECT="tidb"
AXONHUB_DB_DSN="<USER>.root:<PASSWORD>@tcp(gateway01.us-west-2.prod.aws.tidbcloud.com:4000)/axonhub?tls=true&parseTime=true&multiStatements=true&charset=utf8mb4"
AXONHUB_LOG_LEVEL=info

详细配置说明请参考 配置文档

Docker Compose 部署

# 克隆项目
git clone https://github.com/looplj/axonhub.git
cd axonhub

# 创建本地环境文件(请替换镜像 digest 和密码)
umask 077
cat > .env <<'EOF'
DB_PASSWORD=replace-with-a-long-random-password
AXONHUB_IMAGE=looplj/axonhub@sha256:replace-with-axonhub-digest
POSTGRES_IMAGE=postgres@sha256:replace-with-postgres-digest
EOF

# 启动服务
docker compose --env-file .env up -d

# 查看状态
docker compose ps

Helm Kubernetes 部署 | Helm Kubernetes Deployment

使用官方 Helm Chart 在 Kubernetes 上部署 AxonHub:

# Quick installation
git clone https://github.com/looplj/axonhub.git
cd axonhub
helm install axonhub ./deploy/helm

# Production deployment
helm install axonhub ./deploy/helm -f ./deploy/helm/values-production.yaml

# Access AxonHub
kubectl port-forward svc/axonhub 8090:8090
# Visit http://localhost:8090

关键配置选项:

参数描述默认
axonhub.replicaCount副本数1
axonhub.dbPassword数据库密码axonhub_password
postgresql.enabled是否启用内嵌 PostgreSQLtrue
ingress.enabled是否启用 Ingressfalse
persistence.enabled是否启用持久化存储false

有关详细配置和故障排查,请参阅 Helm Chart 文档

虚拟机部署 | Virtual Machine Deployment

下载最新版本从 GitHub Releases

# 克隆项目
git clone https://github.com/looplj/axonhub.git
cd axonhub

# 设置环境变量
export AXONHUB_DB_DIALECT="tidb"
export AXONHUB_DB_DSN="<USER>.root:<PASSWORD>@tcp(gateway01.us-west-2.prod.aws.tidbcloud.com:4000)/axonhub?tls=true&parseTime=true&multiStatements=true&charset=utf8mb4"

# 安装
sudo ./install.sh

# 配置文件检查
axonhub config check

# 使用管理脚本管理 AxonHub

# 启动
./start.sh

# 停止
./stop.sh

📖 使用指南 | Usage Guide

1. 初始化设置 | Initial Setup

  1. 访问管理界面

    http://localhost:8090
    
  2. 配置 AI 提供商

    • 在管理界面中添加 API 密钥
    • 测试连接确保配置正确
  3. 创建用户和角色

    • 设置权限管理
    • 分配适当的访问权限

2. Channel 配置 | Channel Configuration

在管理界面中配置 AI 提供商渠道。关于渠道配置的详细信息,包括模型映射、参数覆盖和故障排除,请参阅 渠道配置指南

3. 模型管理 | Model Management

AxonHub 提供灵活的模型管理系统,支持通过模型关联将抽象模型映射到特定渠道和模型实现。这使您能够:

  • 统一模型接口 - 使用抽象模型 ID(如 gpt-4claude-3-opus)替代渠道特定的名称
  • 智能渠道选择 - 基于关联规则和负载均衡自动将请求路由到最优渠道
  • 灵活的映射策略 - 支持精确的渠道-模型匹配、正则表达式模式和基于标签的选择
  • 基于优先级的回退 - 配置多个具有优先级的关联以实现自动故障转移

关于模型管理的全面信息,包括关联类型、配置示例和最佳实践,请参阅 模型管理指南

4. 创建 API Key | Create API Keys

创建 API 密钥以验证您的应用程序与 AxonHub 的连接。每个 API 密钥可以配置多个配置文件(Profile),用于定义:

  • 模型映射 - 使用精确匹配或正则表达式模式将用户请求的模型转换为实际可用的模型
  • 渠道限制 - 通过渠道 ID 或标签限制 API 密钥可以使用的渠道
  • 模型访问控制 - 控制特定配置文件可以访问的模型
  • 配置文件切换 - 通过激活不同的配置文件即时更改行为

关于 API 密钥配置文件的详细信息,包括配置示例、验证规则和最佳实践,请参阅 API 密钥配置文件指南

5. AI 编程工具集成 | AI Coding Tools Integration

关于如何在 OpenCode、Claude Code 与 Claude Codex 中配置与 AxonHub 的集成、排查常见问题以及结合模型配置文件工作流的最佳实践,请参阅专门的集成指南:

这些文档提供了环境变量示例、Codex 配置模板、模型配置文件说明以及工作流示例,帮助您快速完成接入。


6. 使用 SDK | SDK Usage

详细的 SDK 使用示例和代码示例,请参阅 API 文档:

🛠️ 开发指南

详细的开发说明、架构设计和贡献指南,请查看 docs/zh/development/development.md


🤝 致谢 | Acknowledgments


📄 许可证 | License

本项目采用多种许可证授权(Apache-2.0 和 LGPL-3.0)。详见 LICENSE 文件了解详细的项目授权说明与条款。

AxonHub - All-in-one AI 开发平台,让 AI 开发更简单

🏠 官网📚 文档🐛 问题反馈

Built with ❤️ by the AxonHub team

常见问题

What is axonhub?

axonhub is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by looplj. ⚡️ Open-source AI Gateway — Use any SDK to call 100+ LLMs. Built-in failover, load balancing, cost control & end-to-end tracing. It has 5,051 GitHub stars.

Is axonhub safe to use?

Yes. axonhub passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install axonhub?

Clone the repository with "git clone https://github.com/looplj/axonhub" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is axonhub written in?

axonhub is primarily written in Go. It is open-source under looplj on GitHub, so you can review or fork the full source.

Are there alternatives to axonhub?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh axonhub against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情
axonhub — Claude Code AI Skill | SkillTip