monid-ai/monid

Monid - OpenRouter for agent tools. Join our community at https://discord.gg/rQzztcgJV8

Monid – an OpenRouter‑style catalog for AI agent tools

What it is – Monid is a framework that lets AI agents call any external tool (search, data enrichment, media generation, etc.) through a single unified API. It aggregates 2 000+ tool endpoints from 70+ providers, exposing them via three verbs: discover, inspect (both free) and run (billed per call).

Why it matters – Agents no longer need hard‑coded vendor URLs or custom adapters. A connector (a declarative description of a provider’s endpoints) tells Monid how to call the service, how to authenticate, and how usage is priced. At runtime Monid:

  1. Discovers the cheapest/most suitable endpoint for a given job.
  2. Executes the request, measures raw traffic, and applies the provider’s usage model before any output mapping, ensuring agents are billed exactly for what was transmitted.
  3. Returns a structured response that matches the contract defined in the connector.

Key concepts

  • Connector – a TypeScript file that declares a provider (defineProvider) and one or more endpoints (defineEndpoint). It includes metadata, auth injection, request schema (via Zod), time‑outs and a usage model (free, per‑call, per‑character, etc.).
  • Resource – optional for “owned” services (e.g., phone numbers) to model lifecycle, snapshots and rate‑cards.
  • Engine – the runtime that validates input, builds the HTTP request, injects credentials, settles usage, maps the response, and validates the final output.
  • Catalog CLI – commands (deno task catalog …) let you list providers, explore endpoints, and inspect full contracts.

How to add a new tool

  1. Clone the repo and install Deno 2.x.
  2. Create a new folder under connectors/<provider>/ with a provider.ts and one or more endpoint definitions.
  3. Write Zod schemas for the request parameters.
  4. Record a fixture (deno task record) to capture a real response; tests replay these fixtures, so CI never needs network access.
  5. Run deno task check && deno task test to ensure type‑safety and passing replay tests.
  6. Open a PR and email support@monid.ai; the team reviews the connector manually before publishing.

Running an endpoint

export TINYFISH_CREDENTIALS_API_KEY=…
 deno task engine:run 'tinyfish#search' \
   --query-params '{"query":"solid-state battery suppliers","domain_type":"news"}'

The command prints the structured result and records usage according to the provider’s model.

Who it’s for – developers building autonomous LLM agents, RAG pipelines, or any system that needs to call many third‑party APIs without hard‑coding each one. The declarative connector format also enables coding agents to generate new connectors automatically (see AGENT.md).

License – MIT.

Related