AISBF Logo AISBF

AI Service Broker Framework — AI Should Be Free

AISBF tutorial

Run AISBF in a Cluster with CoderAI Broker Sessions

Use shared cache plus broker-aware CoderAI providers so requests can reach model workers connected to any AISBF node.

Provider list showing a CoderAI provider with online broker status and GPU metadata.
Provider list showing a CoderAI provider with online broker status and GPU metadata.

Architecture

client/app → AISBF node A → shared Redis broker queue → AISBF node B → model worker

Cluster and CoderAI broker features

These are platform capabilities the clustered CoderAI broker path provides — not prerequisites for every AISBF install. A small single-node AISBF deployment can still run without using all of them.

Shared configuration plane

  • Shared MySQL-backed provider, user, token, quota and routing configuration across AISBF nodes.
  • Consistent global-admin and user-scoped coderai provider definitions.
  • Provider-scoped registration tokens that can be rotated from the dashboard.
  • Broker settings stored with the provider instead of being hard-coded into each worker.

Shared broker/session state

  • Shared Redis-backed broker session metadata so any AISBF node can see connected CoderAI workers.
  • Cross-node request queues for brokered operations.
  • Last-seen/session status visibility even when requests arrive through a different AISBF node.
  • Persistent broker metadata fallback so the dashboard can show last-known state after restart.

Node-aware clustering

  • Each AISBF node keeps a unique runtime node ID.
  • Requests can enter through one node and reach a CoderAI session connected to another node.
  • Suitable for reverse-proxy/load-balancer frontends.
  • Supports rolling node restarts when Redis/MySQL remain available.

Outbound-only CoderAI workers

  • CoderAI can connect outward to AISBF over WebSocket/WSS, useful for NAT, home GPUs and locked-down networks.
  • Global broker path: /api/coderai/wss.
  • User-scoped broker path: /api/u/{username}/coderai/wss.
  • Stable provider_id, client_id, username and registration_token identify the worker.

Scoped ownership and isolation

  • Global providers register with username=global.
  • User-owned providers register with the AISBF username.
  • Broker sessions are only usable by requests from the same owner principal.
  • One CoderAI session is not reused across unrelated users or provider scopes.

Multiple transports

  • Direct HTTP transport for reachable CoderAI servers.
  • Direct WebSocket bridge transport via /coderai/ws.
  • Broker transport for outbound-only workers.
  • broker_preferred lets AISBF prefer the broker path when a worker is connected.

OpenAI-compatible routing

  • AISBF can call CoderAI through OpenAI-style /v1 APIs.
  • Supports model listing and chat completions.
  • Can route CoderAI providers through normal AISBF provider, rotation and autoselect flows.
  • Works with multi-provider failover beside OpenAI, Anthropic, Google, Ollama and other backends.

Studio/native endpoint proxying

  • Generic proxy operation can forward CoderAI Studio-native endpoints.
  • Supports arbitrary forwarded request headers and query parameters.
  • Supports JSON, multipart forms, binary/base64 payloads and long-running media job calls.
  • Can proxy progress polling endpoints for images, video, audio and pipeline jobs.

Streaming and long jobs

  • Supports streaming chat envelopes.
  • Supports non-chat streaming event envelopes for long-running jobs.
  • Long request timeouts can be configured per provider.
  • Broker workers can include performance metrics for completed requests.

Worker metadata and dashboard visibility

  • CoderAI registers advertised endpoints, capabilities and hardware inventory.
  • Dashboard can show owner, client ID, transport, last seen and advertised Studio endpoints.
  • Provider editor exposes broker token and broker session status inline.
  • Useful for seeing which local GPU box is actually connected before routing traffic to it.

Resilience behavior

  • CoderAI broker client can reconnect with backoff after dropped sockets.
  • Heartbeat settings keep long-lived sessions fresh.
  • Stable client IDs allow sessions to resume without changing AISBF provider config.
  • Direct HTTP/WebSocket paths can remain available as fallback where reachable.

Deployment flexibility

  • Works behind TLS termination when CoderAI uses the externally visible wss:// AISBF URL.
  • Reverse proxies can preserve forwarded scheme/host headers.
  • Home, workstation, cloud GPU and cluster nodes can all appear as CoderAI providers.
  • Lets AISBF act as the public control plane while GPU-heavy work stays wherever the hardware lives.

CoderAI provider shape

{"type":"coderai","endpoint":"http://127.0.0.1:11437","api_key_required":false,"coderai_config":{"transport":"broker","broker_enabled":true,"broker_mode":true,"broker_preferred":true,"client_id":"zeiss-nvidia","registration_path":"/coderai/register","bridge_path":"/coderai/ws"},"models":[]}

Try AISBF

AISBF is open source and also available as a hosted service. During the current testing period, hosted Pro is available as unlimited access for €6/month or €60/year; subscribing helps fund continued AISBF development and infrastructure while this one-human project is still demo-stage.