LoopEngineBETA

Docs

Documentation

How LoopEngine works, from scaffold to durable approvals — agents, adapters, permission rules, and abilities.

Basic Configuration

Environment variables

A scaffolded project's .env.example covers the ones the runtime itself reads directly:

Variable What it's for
ANTHROPIC_API_KEY / OPENAI_API_KEY / etc. Whichever provider your agents' model.provider points at — see below
PORT HTTP adapter's listen port — defaults to 8787
REDIS_URL Optional — omit for local, file-based sessions under .sessions/. Set once you run more than one server instance against the same sessions.
LOOPENGINE_ADMIN_AUTH Optional user:pass — turns on HTTP Basic Auth for every route. Set this before deploying anywhere reachable by anyone but you.

Abilities can declare their own required env vars too — see Ability System — which then show up per-agent in the Web UI's Environment tab automatically once installed.

The model key

Declare AgentConfig.model and the runtime builds a real ModelCall for you, using the matching API key from the environment:

provider env var model required?
'anthropic' ANTHROPIC_API_KEY no — defaults to claude-sonnet-5
'openai' OPENAI_API_KEY yes
'deepseek' DEEPSEEK_API_KEY yes
'kimi' MOONSHOT_API_KEY yes
'glm' GLM_API_KEY yes
'gemini' GEMINI_API_KEY yes

'kimi''s env var is MOONSHOT_API_KEY, not KIMI_API_KEY — deliberate, matching Moonshot AI's own docs (the API/company behind Kimi) rather than this package's own provider name. openai/deepseek/kimi/glm/ gemini all reuse the same OpenAI-Chat-Completions-compatible request translation, just pointed at each provider's own base URL — see core/model-calls/*.ts for the provider-specific details.

For anything else (a custom SDK client, a canned/simulated model for testing), export your own createModelCall(): ModelCall instead.

What's next

With the environment set up, Add an Agent covers creating your first one, and Configure an Agent covers coming back to adjust it later.