monke-testing-guide

monke-testing-guide is a cursor rule for Cursor from airweave-ai/airweave. It costs 7,424 tokens per session, scanned A, original, MIT.

A guide to Monke, Airweave's end-to-end testing framework for data connectors. It creates real records in external services, runs synchronisation, and checks that the records appear in the search index.

In plain words
What is it for?
Use it to test every kind of record a connector handles, including nested records, and to confirm that data is correctly added to the search index.
Why use it?
It helps catch missing comments, files, relationships, or other data that a test covering only the main records would overlook.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to test every kind of record a connector handles, including nested records, and to confirm that data is correctly added to the search index.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/airweave-ai/airweave/monke-testing-guide
Install

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.

Clone the repo
git clone --depth 1 https://github.com/airweave-ai/airweave

Made for: Cursor.

Wrote 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.

agentmods badge for monke-testing-guide

README.md
[![agentmods](https://agentmods.dev/badge/rules/airweave-ai/airweave/monke-testing-guide/github.svg)](https://agentmods.dev/rules/airweave-ai/airweave/monke-testing-guide)
Your own site
<a href="https://agentmods.dev/rules/airweave-ai/airweave/monke-testing-guide"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/monke-testing-guide/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.

agentmods 80×15 button for monke-testing-guide

Your own site · 80×15
<a href="https://agentmods.dev/rules/airweave-ai/airweave/monke-testing-guide"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/monke-testing-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7,424 This file is loaded in full into every session.
When invoked 7,424 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.07424 $0.07424
Opus 5.5 $0.02970 $0.02970
Sonnet 5.5 $0.01485 $0.01485
Haiku 4.5 $0.00742 $0.00742

Measured 1mo ago against content hash c53a9590b09c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

monke-testing-guide 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.

.cursor/rules/monke-testing-guide.mdc · 1,121 lines

How it starts

The opening of the file, as written. The whole thing — 1,121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Building Monke Tests for Source Connectors

Overview

Monke is Airweave's end-to-end testing framework for source connectors. It creates real test data in external systems, triggers syncs, and verifies data appears correctly in the search index.

This guide shows you how to build comprehensive tests that verify every entity type your connector supports.


Why Test Every Entity Type?

Important: Your Monke tests should create and verify all entity types defined in your source connector.

Many connector tests only verify top-level entities (e.g., tasks) but ignore nested entities (e.g., comments, files).

Impact:

  • Comments might not sync properly → Silent failures in production
  • File attachments might not be indexed → Missing searchable content
  • Entity relationships might be broken → Poor search results
  • Users can't search the full breadth of data they expect

Solution: Create test entities for every entity type your connector syncs, and verify each one appears in Qdrant.

Before Writing Monke Tests:

  1. Open your source file: backend/airweave/platform/sources/{short_name}.py
  2. List all entity types yielded in generate_entities():
    • Example: WorkspaceEntity, ProjectEntity, TaskEntity, CommentEntity, FileEntity
  3. Your Monke tests should create at least one instance of each type
  4. Verify each instance appears in Qdrant after sync

Validation:

  • Count entity classes in entities/{short_name}.py
  • Count entity types created in bongos/{short_name}.py::create_entities()
  • These counts should match (excluding parent/workspace entities that don't get stored)

Core Components

Every Monke test requires four components:

  1. Bongo implementation (monke/bongos/{short_name}.py)
  2. Generation schemas (monke/generation/schemas/{short_name}.py)
  3. Generation adapter (monke/generation/{short_name}.py)
  4. Test configuration (monke/configs/{short_name}.yaml)

Part 1: Bongo Implementation

The Bongo is a class that creates, updates, and deletes test data via the external API.

Read the full file on GitHub · 1,121 lines

Changes

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.

  1. 1mo ago First seen · 1,121 lines · 7,424 tokens per session scan A c53a9590b09c

Subscribe to this mod's changes

monke-testing-guide is a cursor rule published in the GitHub repository airweave-ai/airweave (6,558 stars, last pushed 4mo ago), licensed MIT. It adds 7,424 tokens to every session, about $0.0297 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.