AI Gateway
Central model routing, provider governance, API keys, usage, and external agent access for Skitflow AI features.
The AI Gateway is the control layer for AI in Skitflow. It lets Skitflow route AI features through a LiteLLM-compatible gateway, manage provider credentials centrally, attribute usage per organization, expose organization-scoped API keys, and provide a platform default model when you do not want every tenant to bring their own key.
It powers the AI Assistant, Ask AI actions, Compose analysis, Compose hardening, and external agent integrations that should use Skitflow's model catalog without copying provider secrets into every tool.
What the gateway does
- Routes models per feature — configure an organization default, then override the Assistant, Ask AI, or external agent routes when needed.
- Supports BYOK and platform defaults — use a tenant-owned provider, a platform-managed model, or automatic fallback.
- Keeps usage attributable — calls go through organization-scoped virtual keys so usage can be reported and governed.
- Centralizes API keys — provider secrets are stored server-side and are never returned to the UI.
- Exposes controlled agent access — AI Gateway API keys let approved agents and automations call the model catalog available inside Skitflow.
- Adds governance — operators can review usage and enforce budgets for platform-provided models.
Architecture
The gateway sits between Skitflow AI call sites and the actual model providers:
- A user or approved agent invokes an AI feature, such as Assistant chat, Ask AI, Compose review, Compose hardening, or a gateway API call.
- Skitflow resolves the route for the active organization and feature.
- If AI Gateway is enabled and healthy, the request goes through the LiteLLM-compatible gateway.
- The gateway uses an organization-scoped virtual key, then calls either a BYOK provider model or a platform default model.
- Usage is attributed back to the organization and can be shown in the gateway usage views.
If the gateway is disabled, Skitflow uses the direct provider configuration path. If it is enabled but unavailable, AI features fail with a clear degraded-state error instead of waiting on a dead upstream.
Routing order
For each AI feature, Skitflow resolves the model in this order:
- Feature override, for example Assistant or Ask AI.
- Organization-wide default route.
- The newest enabled BYOK provider for the organization.
- Platform default chat model.
- No model configured.
This keeps existing BYOK behavior intact while allowing operators to introduce platform-level defaults and per-feature routing gradually.
Gateway sections in the dashboard
AI Gateway includes these areas:
| Section | Purpose |
|---|---|
| Assistant | Product-facing AI chat and operations assistant. |
| Providers | Tenant BYOK provider configuration. The old Settings → AI page redirects here. |
| Models | Platform model configuration and default chat models. |
| API Keys | Organization-scoped gateway API keys and callable models for approved agents and automations. |
| Usage | Organization usage through the gateway. |
| Platform Usage | Operator view for platform model spend and governance. |
External agents
OpenClaw, Hermes Agent, internal scripts, and other custom agents can use Skitflow without carrying raw provider credentials. Create an AI Gateway API key, choose the models exposed to that organization, and let the agent call Skitflow as the governed model access point.
This keeps model access inside Skitflow: provider keys stay server-side, usage remains attributable, and teams can change the underlying provider or model without rewriting every agent integration.
Security and privacy
- Provider keys are write-only in the management API. The UI can show whether a key exists, not the key value.
- The gateway uses server-side routing decisions and organization-scoped keys for attribution.
- Assistant proposals do not execute automatically. Mutating actions require explicit confirmation and then re-run server-side authorization.
- Environment-variable diffs expose key names only, never secret values.
Use AI Gateway → Providers for tenant BYOK configuration. Use AI Gateway → Models, API Keys, and Platform Usage for governed model access and operator-managed defaults.
AI Assistant
Use Skitflow's AI Assistant to generate Compose files, analyze deployments, harden configuration, answer product questions, and propose confirmed operations through AI Gateway.
Secrets Providers
Integrate external secret management services to securely inject secrets into your deployments.