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.
npx agentmods add rules/airweave-ai/airweave/source-connector-implementationgit clone --depth 1 https://github.com/airweave-ai/airweaveWhat 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 | $0.08713 | $0.08713 |
| Opus 5 | $0.04356 | $0.04356 |
| Sonnet 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 yesterday.
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.
- yesterday 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,567 stars, last pushed 2mo ago), licensed MIT. It adds 8,713 tokens to every session, about $0.0436 per session on Opus 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
trigger.advanced-tasks
Comprehensive rules to help you write advanced Trigger.dev tasks.
orchestration
Guidelines for working in a Bernstein-orchestrated project.
vios-sqa
VIOS SQA agent. One-click build → deploy → test → UI validation cycle. Use when asked to run regression tests, check test results, deploy for testing, or verify UI behavior.
cursorrules
This file contains project-specific instructions for AI assistants working on the CICADA codebase.
cursorrules
All monorepo rules live in AGENTS.md. Read it before making any change.
backend
FastAPI backend conventions, service patterns, and API design for Ship of Theseus.