跳到正文
GitHub·· 7 天前AI 评分36

rakunlabs/at:兼容 OpenAI 的 LLM 网关,支持智能体与工作流

rakunlabs/at

AI 导读

rakunlabs/at 是一个兼容 OpenAI 的 LLM 网关,可通过单一端点将请求路由至 OpenAI、Anthropic、Gemini、Vertex、Bedrock、Azure、Cohere 等多家提供商,并内置智能体、工作流和管理 UI。

正文

OpenAI-compatible LLM gateway with agents, workflows and an admin UI. Route requests to many providers (OpenAI, Anthropic, Gemini, Vertex, Bedrock, Azure, Cohere, …) through one endpoint.

Under active development, expect breaking changes. Feedback and contributions are welcome!

Quick start

AT requires PostgreSQL.

docker run -d --name at -p 8080:8080 \
  -e AT_STORE_POSTGRES_DATASOURCE="postgres://user:pass@host:5432/at?sslmode=disable" \
  ghcr.io/rakunlabs/at:latest

Open http://localhost:8080, create the first administrator, then add providers and API tokens from the UI. Point any OpenAI client at:

http://localhost:8080/gateway/v1

Configuration

Providers, API tokens, bots, authentication and system settings (server name, public URL, log level, workspace retention, sandbox backend) are managed in the UI and stored in PostgreSQL. The config file only holds what is needed before the database is reachable or what is tied to the deployment itself.

at.yaml in the working directory is loaded automatically (or set AT_CONFIG_FILE). Every key can also be set as an environment variable with the AT_ prefix, e.g. AT_STORE_POSTGRES_DATASOURCE.

server:
  port: "8080"
  # base_path: /at                  # serve under a sub-path
  # trusted_proxies: ["private"]    # when behind a reverse proxy
  # workspace:
  #   root: /mnt/at-workspace       # task workspaces + persistent assets
store:
  # encryption_key: "change-me"     # encrypts stored credentials
  postgres:
    datasource: "postgres://user:pass@localhost:5432/at?sslmode=disable"

Changing encryption_key requires rotating it first in Settings → System → Encryption.

Documentation

Development

make env                   # start PostgreSQL (docker compose)
make run                   # run the server on :8080
make install-ui run-ui     # UI dev server on :3000
make test

来源:GitHub · github.com