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/source-connector-implementation)<a href="https://agentmods.dev/rules/airweave-ai/airweave/source-connector-implementation"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/source-connector-implementation/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/source-connector-implementation"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/source-connector-implementation.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.08713 | $0.08713 |
| Opus 5.5 | $0.03485 | $0.03485 |
| Sonnet 5.5 | $0.01743 | $0.01743 |
| Haiku 4.5 | $0.00871 | $0.00871 |
Grade A, and why
source-connector-implementation 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 — 1,223 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Building a Source Connector in Airweave
Overview
A source connector in Airweave is a Python module that extracts data from an external service and transforms it into searchable entities. This guide covers everything you need to build a production-ready connector.
There are two types of source connectors:
- Standard (Sync-Based): Extracts and syncs all data from the source to Airweave's vector database
- Federated Search: Searches the source's API at query time without syncing data
Core Components
Every source connector requires three main components:
- Source implementation (
backend/airweave/platform/sources/{short_name}.py) - Entity schemas (
backend/airweave/platform/entities/{short_name}.py) - OAuth configuration (
backend/airweave/platform/auth/yaml/dev.integrations.yaml)
Part 1: Entity Schemas
Start with entities because they define your data model.
File Location
backend/airweave/platform/entities/{short_name}.py
Entity Types
There are two base entity types:
- ChunkEntity - Text-based entities (tasks, messages, documents, etc.)
- FileEntity - File attachments (PDFs, images, etc.)
Basic Structure
"""Entity schemas for {Connector Name}."""
from datetime import datetime
from typing import Any, Dict, List, Optional
from pydantic import Field
from airweave.platform.entities._airweave_field import AirweaveField
from airweave.platform.entities._base import ChunkEntity, FileEntity
class MyConnectorEntity(ChunkEntity):
"""Schema for primary entity type."""
# Required fields
name: str = AirweaveField(
...,
description="Display name of the entity",
embeddable=True # This field will be embedded for search
)
# Timestamps (critical for incremental sync)
created_at: Optional[datetime] = AirweaveField(
None,
description="When this entity was created",
embeddable=True,
is_created_at=True # Marks this as the creation timestamp
)
modified_at: Optional[datetime] = AirweaveField(
None,
description="When this entity was last modified",
embeddable=True,
is_updated_at=True # Marks this as the update timestamp
)
# Content fields
content: Optional[str] = AirweaveField(
None,
description="The main text content",
embeddable=True # Make searchable
)
# Metadata fields (not embeddable)
external_id: str = Field(
...,
description="Unique ID from the external system"
)
permalink_url: Optional[str] = Field(
None,
description="Direct link to view in external system"
)
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 · 1,223 lines · 8,713 tokens per session scan A 223515e5fcb5
source-connector-implementation is a cursor rule published in the GitHub repository airweave-ai/airweave (6,558 stars, last pushed 4mo ago), licensed MIT. It adds 8,713 tokens to every session, about $0.0349 per session on Opus 5.5. 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
The gateway core module is the central orchestrator that handles AI provider requests, manages caching, queuing, and provides unified interfaces for chat completion, embeddings, and tool responses.
react-router
Cursor rule "react-router" from iloveitaly/llm-ide-rules, covering react router, loading mock data, how to use clientloader and loading backend data.
klore
Klore LLM Knowledge Compiler — available commands and context.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.