theloop
theloop is an open-source project that encapsulates the AI agent loop as a stateless HTTP service. Each POST /runs request is one complete run: model→tools→model, supporting streaming output and per-attempt billing, and the engine retains no state after the run ends. Requests must carry all information (provider, model, key, prompt, full history, tool URLs and schemas, limits, etc.), making it suitable for multi-tenant scenarios; it supports write operations as intents approved and executed by the caller, and provides usage records, fallback chains, skills, and deferred tools.