superdesigndev/treg · 05 Sep 2026 · Feature

Treg Wants to Be the OpenRouter of Agent Tools, Not Models

Kevin Doyle
Kevin Doyle
Staff Writer

Treg is a credential-injecting proxy and metered catalog that lets AI agents call roughly 2,600 third-party endpoints without their operators holding individual subscriptions or leaking keys.

superdesigndev/treg
1.3k stars Velocity · 7d +29 ★/day cooling
star history

OpenRouter, but for the Boring Stuff

The hype around OpenRouter came from solving a simple coordination problem: large language models were proliferating, and no one wanted to manage a dozen API keys and request formats just to route a prompt. Treg, built by the Superdesign team, applies the same logic to the unglamorous layer beneath the LLM—the external tools an agent actually needs to do work. Think SEO backlink checks, social-media publishing, people enrichment, ad management, and web scraping. These capabilities sit behind subscriptions priced for humans—Semrush at $139 per month, Moz at $99, Crunchbase at $99—and often behind invite-only or partner-only APIs that have no self-serve onboarding at all.

superdesigndev/treg

Treg’s pitch is that an agent should not need a corporate procurement cycle to verify a domain’s authority. The project hosts a catalog of roughly 2,600 endpoints across about 40 providers, bills per call (often from a fraction of a cent), and exposes them through a single base URL and token. If the analogy holds, it is less a piece of core infrastructure and more a marketplace with a proxy attached, one that carries the vendor accounts itself and resells access by the sip.

The Faithful Relay

The technical core is deliberately narrow. At the center of the codebase is a streaming proxy—described in the project’s own architecture notes as a “faithful relay”—that modifies only three things on any request: hop-by-hop transport headers, Treg’s own control headers (which are stripped before they reach the upstream), and the injected credentials. Everything else is passed verbatim. This means the proxy does not model the upstream API, buffer the body, or translate request shapes. If a provider changes a parameter name or response schema, Treg does not break, because it never tried to understand the schema in the first place.

That design choice addresses a genuine pain point in the emerging agent stack. Current credential patterns for autonomous agents are a mess: unscoped static API keys with no expiration or tool-level scoping; shared service accounts that prevent attribution; and agents inheriting human user sessions with all the overpermissioning that entails [2]. Treg’s answer is server-side injection. The caller holds only a Treg token; the actual provider key is resolved, decrypted, and bound to the request inside the proxy. The system supports several auth shapes—plain secrets, JSON token files, OAuth tokens with auto-refresh, and even material lifted from a vendor CLI’s keychain—and applies them through an injector seam that keeps the caller’s environment clean [4].

A Metered Catalog and a Team Vault

Treg operates two distinct modes under one token. The first is the public catalog: endpoints Treg serves on its own provider accounts, metered against a team’s prepaid balance. The second is a private registry where a team uploads its own API keys, OAuth connections, vendor CLIs, and skill bundles—collections of recipes, secrets, and tools registered together. A credential ladder determines which key wins: a team’s own registered tool always overrides Treg’s shared key, making those calls free to the team while still passing through the proxy for audit and injection.

The economic model is unusually direct for infrastructure software. New teams receive a small prepaid balance. Every cataloged endpoint carries a published per-call price; if Treg has no price for an endpoint, the call is refused rather than served for free. Out-of-balance responses return an HTTP 402 with machine-readable cost fields so an agent can theoretically top itself up without human intervention. This is not a usage-tracking dashboard tacked onto a gateway; the metering is the product.

For internal tooling, the project offers scan-and-upload workflows that read a local environment file, match known provider keys, and register them as shareable endpoints or runnable CLIs. A teammate can execute vendor binaries with the organization’s credential injected, either locally or on the registry server itself, leaving no key material on the client machine. Skills packaged as recipe files can be registered atomically and pulled down by other team members, ensuring that every agent runs the same recipe against the same securely stored secrets.

Where It Sits in a Crowded Gateway Landscape

It is tempting to file Treg alongside the new breed of AI gateways, but the fit is imprecise. The industry is currently sketching three overlapping layers: traditional API gateways managing lifecycle and access; AI gateways routing LLM traffic, detecting prompt injection, and semantic caching; and MCP gateways governing tool access for agents speaking the Model Context Protocol [1][5]. Vendors like Traefik, Gravitee, and Solo.io are building high-throughput, policy-enforcing gateways in Rust or Go, often with Kubernetes-native deployments and OpenTelemetry observability [1][5][6]. MLflow’s AI Gateway, meanwhile, focuses on unifying LLM providers, tracking token costs, and enforcing content guardrails [3].

Treg is doing something smaller and more commercially specific. It is not routing between models, caching prompts, or translating MCP’s JSON-RPC 2.0 lifecycle [5]. It is routing between vendors for the same real-world capability—say, “find a work email”—and letting the caller choose based on price. In that sense it resembles the agent registry concept described in recent surveys of the space: a metadata-rich discovery layer that moves beyond static DNS to dynamic, capability-based lookup [7]. Treg’s catalog search, which indexes by task rather than vendor name, is a rudimentary version of that vision.

The Security Model and Its Tensions

Centralizing secrets always creates a honeypot risk, and the project is candid about it. All stored secrets are encrypted at rest with Fernet; lose the encryption key and the secrets are unrecoverable. The architecture is otherwise straightforward: FastAPI, SQLModel, async Postgres or SQLite, with a deferred audit writer and periodic health checks that probe credentials and webhook owners when they break. The test suite covers 521 cases ranging from OAuth refresh flows to URL-passthrough fidelity.

Yet the project’s biggest tension may be strategic rather than technical. The code is released under Apache 2.0 with an additional clause that prohibits offering it as a hosted or managed service to third parties, or embedding it in a commercially distributed product, without written permission. That is not a standard open-source license posture; it suggests the authors want to encourage self-hosting inside organizations while reserving the public, metered catalog as a commercial concern. It is a reasonable business choice, but it places a ceiling on community-driven hosted forks.

Outlook

The roadmap lists MCP support, finer permission tiers, and at-rest key-management hardening. Those features would move Treg closer to the emerging gateway standards, but they also invite direct comparison with better-capitalized infrastructure projects. For now, Treg’s value is in its blunt practicality: it solves the “agent needs a Semrush account for one query” problem by fronting the subscription itself and reselling access by the call. Whether that model scales beyond a convenience layer for small teams depends on whether the major API and SaaS providers tolerate the proxy model, and whether the broader gateway ecosystem—already racing to own the MCP and AI agent control planes—decides to absorb metered third-party catalogs as a native feature.

Sources

  1. Regulatory T Cells (Tregs)
  2. API Gateway vs AI Gateway vs MCP Gateway: Which Do You Need?
  3. AI Agent Credential Management Best Practices - Descope
  4. Regulatory T cell
  5. AI Gateway for LLMs & Agents | MLflow AI Platform
  6. Tool calling authentication for AI agents - Scalekit
  7. The development and function of regulatory T cells - PMC - NIH
  8. MCP API Gateway Explained: Protocols, Caching, and Remote ...
  9. A Survey of AI Agent Registry Solutions - arXiv
  10. Regulatory T cell induction strategies and applications in ...
  11. Agentgateway: The AI-Native Gateway - Solo.io
  12. Establish Trust for AI Agents at Runtime | Curity Identity Server

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.