# treg

> A unified tool registry and proxy for AI agents that provides access to 2,630 endpoints across 47 providers with a single API key, billed per call.

Treg is described by its creators as "OpenRouter for agent tools" — a unified registry and proxy that gives AI agents access to a large catalog of external APIs through a single token, without requiring per-provider signups. Built by the Superdesign team and live at treg.to, it is also fully self-hostable and open source under an Apache 2.0-based license with additional terms.

## What It Is

Treg sits between an AI agent and the external tools it needs — SEO data, backlink analysis, social media publishing, people enrichment, ad management, and more. Instead of an agent holding dozens of API keys and subscriptions, it holds one treg token. Treg injects the correct credential server-side and relays the upstream response verbatim, so callers never hold secrets and upstream API changes don't break the proxy.

## How the Catalog Works

The catalog currently lists 2,630 endpoints across 47 providers, organized by what endpoints *do* rather than by vendor. Categories include keyword and rank tracking, backlinks and authority, AI visibility, trending and discovery, social publishing, people and company enrichment, ads management, and measurement. Providers in the catalog include Semrush, Moz, SerpApi, DataForSEO, SE Ranking, Majestic, SpyFu, Serpstat, Hunter, Lusha, Apollo, Crunchbase, and many others.

When an agent searches for a capability, treg shows multiple providers side by side with measured success rate, speed, and price. The agent or user chooses — treg does not silently pick or fail over between providers.

## Credential Ladder and Bring-Your-Own-Key

Treg resolves credentials in a defined order for every call:
- If the team registered its own tool for that provider, that key is used.
- If the team stored a secret for the provider, it is injected through a virtual tool.
- Otherwise, treg's own key is used and the call is billed against the team's prepaid balance.

Teams can bring their own API keys, OAuth connections, or vendor CLIs. Those calls are never metered against the balance. The homepage states that treg earns on volume pricing with vendors, not on a markup to users.

## Deployment and Architecture

Treg is built in Python (FastAPI) and can be run locally with a single script, or self-hosted on any server. The hosted instance runs on Render with Postgres. The proxy follows a faithful-relay contract: it alters only hop-by-hop transport headers, its own control headers, and the injected credentials — everything else is passed verbatim to the upstream. Credentials are encrypted at rest using Fernet encryption.

The tool supports four auth shapes per binding: plain API key (`env`), JSON token file (`secret_file`), OAuth with auto-refresh (`oauth`), and CLI keychain material (`cli_auth`). Health checks can validate credentials on demand or via cron, and webhook the owner if anything breaks.

## Access Methods

Agents can reach treg through several paths:
- **REST API** — prefix any catalogued endpoint ID with `/call/` and pass a Bearer token.
- **CLI** — installed via `curl -fsSL https://treg.to/install.sh | sh`; supports `treg call`, `treg run`, `treg skill install`, `treg balance`, and more.
- **MCP endpoint** — available at `https://treg.to/mcp`.
- **Claude Code plugin** — installable via `/plugin marketplace add superdesigndev/treg`.
- **llms.txt** — a single-fetch file at `/llms.txt` that teaches an agent the full protocol.

## Current Status

The GitHub repository shows 477 stars and 41 forks as of the last recorded update. The project is described as being in early access, with no formal SLA. The roadmap listed in the README includes MCP support, finer permission tiers, at-rest key-management hardening, and a possible Loopni merge. The repository was created in July 2026 and last pushed in August 2026, indicating active development.

## Features
- 2,630 catalogued endpoints across 47 providers
- Single unified API key for all providers
- Pay-per-call billing with no provider signup required
- Bring-your-own-key support (unmetered calls)
- CLI tool for agent and developer use
- MCP endpoint at treg.to/mcp
- Claude Code plugin support
- OAuth connection management with auto-refresh
- Skill and bundle registration and sharing
- Team/org management with roles and per-member access controls
- Credential health checks with webhook alerts
- Self-hostable open-source server
- Faithful relay proxy — credentials injected server-side, never on client
- Catalog search by task/capability, not vendor
- Per-call audit log
- Budget and spend caps per team
- llms.txt for agent onboarding in one fetch
- Interactive API console and OpenAPI spec

## Integrations
Semrush, Moz, SerpApi, DataForSEO, SE Ranking, Majestic, SpyFu, Serpstat, Hunter, Lusha, People Data Labs, Apollo, Crunchbase, Diffbot, Google Ads, Google Analytics 4, Google Search Console, Meta Ads, TikTok Ads, Microsoft Ads, Snapchat Ads, Pinterest Ads, X/Twitter, Instagram, YouTube, LinkedIn, Reddit, Facebook, Apify, Bright Data, Postiz, Stripe, GitHub CLI, Vercel CLI, Slack, LeadMagic, Claude Code, OpenClaw, Codex

## Platforms
WEB, API, CLI

## Pricing
Freemium — Free tier available with paid upgrades

## Version
meta-consent-notice-evidence

## Links
- Website: https://treg.to
- Documentation: https://treg.to/docs
- Repository: https://github.com/superdesigndev/treg
- EveryDev.ai: https://www.everydev.ai/tools/treg
