AI Briefing
KOSign in

Treg: An OpenRouter for Agent Tools with Unified API and Credential Management

·2026.10.07 01:29

Key point

Treg acts as an 'OpenRouter for tools,' providing a single base URL and token to access thousands of external endpoints, handling credential injection and billing for AI agents.

1 / 2

Details

Core Concept and Architecture

Treg is an agent tool registry designed as an "OpenRouter for tools," allowing AI agents to call thousands of external endpoints using a single base URL and token. The system acts as a faithful relay, injecting credentials server-side so callers do not hold keys, while supporting self-hosting and team-based credential management.

Tool Types and Billing Logic

The registry distinguishes between two primary tool types:

  • Catalog: External endpoints served by Treg using its own keys or verified public routes. Calls are billed per cent to a team's prepaid balance, with anonymous calls being free and new verified accounts receiving $1.00 in free credits.
  • Your own tools: Paid APIs, OAuth connections, or vendor CLIs registered by teammates. These calls are never metered and take precedence over Treg's keys.

The credential ladder determines which key is used: 1) Team's own registered tool, 2) Team's stored secret via virtual tool, 3) Verified public route (free), or 4) Treg's own key (billed).

Integration and Workflow Skills

Treg integrates with major AI coding environments and agents:

  • Claude Code Plugin: The skill loads as treg:treg and walks the agent through setup. Installation is typically handled via npx skills add superdesigndev/treg or specific plugin mechanisms detailed in docs/CLAUDE-PLUGIN.md.
  • Other Agents: Supported via npx skills add superdesigndev/treg -s treg, including MiniMax Code/Agent.
  • Claude.ai Connector: Exposes curated catalog endpoints at https://treg.to/mcp/v2/, separating read/write calls for safety.

Ready-made workflow skills include lead-signals for buyer exploration, make-ugc for AI video generation, and jev-memory for persistent preferences in Claude Code.

Technical Implementation and Security

The architecture ensures security through strict faithful-relay contracts, where the proxy only alters hop-by-hop headers, Treg control headers, and injected credentials, leaving everything else verbatim.

  • Auth Injectors: Support env (API keys), secret_file (JSON fields), oauth (auto-refresh), and cli_auth (keychain material).
  • Self-Hosting: Available via scripts/dev-local.sh or direct Python execution, requiring TREG_SECRET_KEY for Fernet encryption of secrets at rest.
  • Testing: Comprehensive coverage using pytest with pytest-xdist, covering proxy logic, injectors, OAuth flows, and CLI operations.

Licensing and Roadmap

Treg is licensed under Apache 2.0 with additional terms prohibiting the redistribution of code as a competing hosted registry service without written permission. The roadmap includes expanded MCP support, finer permission tiers, and potential integration with Loopni.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.