Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/airweave-ai/airweaveWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/airweave-ai/airweave/api-layer)<a href="https://agentmods.dev/rules/airweave-ai/airweave/api-layer"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/api-layer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/airweave-ai/airweave/api-layer"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/api-layer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02105 |
| Opus 5.5 | $0.00000 | $0.00842 |
| Sonnet 5.5 | $0.00000 | $0.00421 |
| Haiku 4.5 | $0.00000 | $0.00211 |
Grade A, and why
api-layer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 242 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Airweave API Layer Rules
Overview
FastAPI-based HTTP interface providing RESTful endpoints for SDK access and frontend communication, with unified Auth0/API key authentication.
Architecture
Structure
api/
├── v1/
│ ├── api.py # Main router aggregation
│ └── endpoints/ # Individual endpoint modules
├── deps.py # Dependency injection & auth resolution
├── router.py # Custom TrailingSlashRouter
├── middleware.py # Request processing & CORS
└── auth.py # Auth0 integration & token validation
Endpoint Categories
- Public API (SDK):
/sources/,/collections/,/source-connections/ - Internal Frontend:
/users/,/organizations/,/api-keys/,/sync/,/dag/,/entities/,/destinations/ - Connect Frontend API:
/connect/- Short-lived session tokens for embedded frontend integration flows (Plaid-style Connect modal)
Key Endpoints
Sources API
- GET /sources/{short_name}: Retrieves source details including:
- Core metadata (name, description)
- Authentication methods (
auth_methods) - Configuration schemas (
auth_fields,config_fields) - Auth Provider Support (
supported_auth_providers): List of auth provider short names that support this source
Source Connections API
- POST /source-connections: Creates a new connection with validation:
- For direct auth: validates credential format
- For OAuth: handles authorization flows
- For auth providers: validates provider exists and supports the source
- POST /source-connections/{id}/verify-oauth: Verifies claim-token ownership and triggers deferred sync. Called after the OAuth callback completes to prove the caller that initiated the flow is the one completing it. Required for all browser-based OAuth flows.
Core Components
1. TrailingSlashRouter
from airweave.api.router import TrailingSlashRouter
router = TrailingSlashRouter() # Handles /endpoint and /endpoint/
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 242 lines · 2,105 tokens per session scan A 97bbb4a190b8
api-layer is a cursor rule published in the GitHub repository airweave-ai/airweave (6,558 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,105 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
gateway
Messenger gateway architecture, session store, and the Telegram and Pachca adapter conventions.
provider-devin
Devin transport framing, identity, and response semantics.
backend-rules
A Cursor rule named backend-rules covering backend development, project structure, technology choices, runtime environment, and main process. Cursor is a coding editor with rules that guide how an agent works in a project.
ddd-design-guide
Apply when designing or refactoring domain models, services, stores, or discussing DDD (Domain-Driven Design) architecture. Also apply when working on business logic layers, API modules, or planning domain boundaries and migrations.
backend-python
Cursor rule "backend-python" from coeusyk/inference-x, covering backend python rules, stack assumptions, code style, fastapi conventions and schema conventions.
pn-rust-backend
Rust backend style, env, and error handling. Use for API and server code (Actix-web, Axum).