WORK / LOOM

Loom

An open-source LLM gateway built on a disagreement with the ecosystem.

.NET · PROVIDER ADAPTERS · OPEN SOURCE GITHUB ↗

Most LLM gateways make the same promise: one API, every provider. They keep it by flattening each provider into a single chat-completions shape, and that flattening is where the trouble starts. Streaming semantics differ between providers. Tool calls differ. Reasoning output, cache control, and content blocks differ. A gateway that pretends those differences do not exist ends up hiding capability from one side and leaking quirks to the other.

Loom is built on a disagreement with that approach. It does not flatten. It manages conversations agent-style at the core, and it gives each provider an adapter that owns its own wire format.

CONVERSATIONS AT THE CORE

The core of Loom never sees a provider payload. It sees a conversation: an ordered record of turns, tool use, and outcomes that belongs to Loom rather than to any provider’s API shape. Adapters translate in both directions at the boundary, and each adapter is free to speak its provider’s dialect fluently instead of a lowest common denominator.

public interface IProviderAdapter
{
    string Provider { get; }
    bool Supports(Capability capability);
    ProviderRequest Translate(Conversation conversation);
    ConversationDelta Interpret(ProviderStreamEvent chunk);
}

An adapter owns everything provider-specific: request shape, streaming protocol, error taxonomy, capability flags. When a provider ships something new, the change lands in one adapter, and the core never notices.

QUIRKS STAY AT THE EDGES

This is the whole architecture in one sentence: the middle of the system models what a conversation is, and the edges absorb what each provider happens to be. Nothing in between is asked to pretend.

Quirks stay at the edges. The abstraction stays honest.
PROVIDERS OPENAI ADAPTER ANTHROPIC ADAPTER GEMINI ADAPTER BOUNDARY CONVERSATION CORE
FIG 01 · THE ADAPTER BOUNDARY

WHAT THE PROCESS TAUGHT ME

The useful question was never which abstraction is cleanest in principle. It was where complexity should live so the people using the system carry the least of it. Loom’s answer is boundaries: a core that models the conversation and edges that absorb the mess. Most of the design work was deciding, case by case, which side of that line a behaviour belonged on.