RAPP Swarm

Tier 2 — always-on, multi-tenant, in Azure.

Azure Functions · Azure OpenAI · Entra ID

Deploy in one click

One ARM template provisions a Function App, a Storage Account, an Application Insights workspace, and wires everything to your Azure OpenAI resource.

Deploy to Azure ↗ ~3 minutes · ~$0.10/day idle

Runtime

Azure Functions · Python 3.11
Same Python the brainstem uses. Same agent files. Bring your laptop's agents/ directory.

LLM

Azure OpenAI · GPT-4o
Set AZURE_OPENAI_ENDPOINT and the deployment name. Identity-based auth supported.

Storage

Azure Storage Account
Per-tenant memory, agent files, logs. Replaces the local filesystem of Tier 1.

Auth

Entra ID · managed identity
No secrets stored on the function. RBAC controls everything.

Telemetry

Application Insights
Every perform() emits a trace. Slosh chains are traceable end-to-end.

Per-tenant layout

~/rapp-projects/<name>/
One project = one tenant = one soul + one agents dir + one storage prefix.

HTTP surface (SPEC §8)

RAPP Swarm implements the same five endpoints as the brainstem. Identical request and response shapes. A client written for Tier 1 talks to Tier 2 by changing one URL.

MethodPathPurpose
POST/chatuser_input + history → assistant response
GET/healthstatus, model, loaded agents, token state
GET/modelsavailable LLM ids
GET/reposconnected sources (agent repos)
POST/loginTier-1-only OAuth bootstrap (returns 404 in Tier 2)

The portability guarantee (SPEC §5.8)

This is the one promise we never break: an agent file you wrote on your laptop today, saved as agents/weather_poet_agent.py, runs unmodified in Tier 2 and Tier 3. No build step. No translation layer. No "cloud variant." If Tier 2 ever rejects a file Tier 1 accepts, Tier 2 is broken — not the file.

# identical contract on all three tiers
class WeatherPoetAgent(BasicAgent):
    def perform(self, **kwargs):
        ...

Configuration

AZURE_OPENAI_ENDPOINT  = https://<name>.openai.azure.com
AZURE_OPENAI_DEPLOYMENT = gpt-4o
STORAGE_CONNECTION      = <set automatically by ARM template>
SOUL_PATH               = ./soul.md
AGENTS_PATH             = ./agents