local-deep-research: Instructions file for Codex

AGENTS.md

local-deep-research AGENTS.md is an instructions file for Codex, OpenCode from LearningCircuit/local-deep-research. It costs 3,818 tokens per session, scanned A, original, MIT.

Project instructions for Local Deep Research, a Python application with a web interface that searches sources and combines the results into reports. They describe its backend, frontend, databases, tests, and development setup.

In plain words
What is it for?
They help with development and maintenance of the research pipeline, FastAPI web service, Vite interface, encrypted databases, search engines, and tests.
Why use it?
They give a coding agent the project's structure and required tools before it changes code. This reduces time spent looking in the wrong directories or using incompatible commands.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Gemini CLI.

This is LearningCircuit/local-deep-research's own configuration. It tells Codex and OpenCode how to work on local-deep-research itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything local-deep-research configures →

About the project

LearningCircuit/local-deep-research is a research assistant that uses language models and search engines to investigate questions and produce cited reports, while supporting local models, cloud models, and private documents. It is for people who want to conduct research with their own searchable knowledge base and keep their data local and encrypted. The catalogue lists three instructions for working with it.

LearningCircuit/local-deep-research · 9,506 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to LearningCircuit/local-deep-research. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/LearningCircuit/local-deep-research

Made for: Codex, OpenCode.

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 local-deep-research AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/learningcircuit/local-deep-research/agents-md/github.svg)](https://agentmods.dev/instructions/learningcircuit/local-deep-research/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/learningcircuit/local-deep-research/agents-md"><img src="https://agentmods.dev/badge/instructions/learningcircuit/local-deep-research/agents-md/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 local-deep-research AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/learningcircuit/local-deep-research/agents-md"><img src="https://agentmods.dev/badge/instructions/learningcircuit/local-deep-research/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,818 This file is loaded in full into every session.
When invoked 3,818 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.03818 $0.03818
Opus 5.5 $0.01527 $0.01527
Sonnet 5.5 $0.00764 $0.00764
Haiku 4.5 $0.00382 $0.00382

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

Security

Grade A, and why

local-deep-research AGENTS.md 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.

AGENTS.md · 109 lines

How it starts

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

AGENTS.md

Overview

Local Deep Research is a Python/PDM application with a FastAPI backend and a Vite frontend. Backend source is in src/local_deep_research/; web code is in src/local_deep_research/web/; tests are in tests/. src/local_deep_research/web/app.py:main() is the process entry point and launches Uvicorn; src/local_deep_research/web/fastapi_app.py constructs the FastAPI application, mounts Socket.IO, and manages startup/shutdown through lifespan().

Source-development prerequisites: Python ≥3.12, <3.15; Node.js 24.0.0+ (frontend build, JS tests and some pre-commit hooks), PDM, and SQLCipher; see docs/developing.md and docs/SQLCIPHER_INSTALL.md.

Architecture

Iterative research pipeline: a BaseSearchStrategy generates questions, runs parallel searches across BaseSearchEngine implementations, and synthesizes a report via report_generator.py. The web layer is FastAPI + Socket.IO (ASGI); each user has their own encrypted SQLCipher database (no shared application-data DB; a central ldr_auth.db stores only usernames). The main entry point is src/local_deep_research/search_system.py (AdvancedSearchSystem). New search engines require registration in ENGINE_REGISTRY (src/local_deep_research/web_search_engines/engine_registry.py) and the class allowlist in src/local_deep_research/security/module_whitelist.py; new strategies require wiring in create_strategy() (src/local_deep_research/search_system_factory.py) — only LLM providers are auto-discovered. See docs/architecture.md for the full thread lifecycle, QueuePool/FD budget, and cleanup model.

Where to look

Task Paths
Backend and server lifecycle src/local_deep_research/web/app.py, src/local_deep_research/web/fastapi_app.py, src/local_deep_research/web/routers/, src/local_deep_research/web/services/
Auth and sessions src/local_deep_research/web/auth/, src/local_deep_research/database/encrypted_db.py
Settings src/local_deep_research/settings/, src/local_deep_research/settings/env_definitions/, src/local_deep_research/web/routers/settings.py, src/local_deep_research/defaults/
Security and safe HTTP src/local_deep_research/security/ (safe_requests.py, ssrf_validator.py, egress/); policy in SECURITY.md
LLM and embedding providers src/local_deep_research/llm/providers/, src/local_deep_research/config/llm_config.py, src/local_deep_research/embeddings/providers/
Search engines src/local_deep_research/web_search_engines/, src/local_deep_research/web_search_engines/engines/
Research engine and strategies src/local_deep_research/search_system.py, src/local_deep_research/search_system_factory.py, src/local_deep_research/advanced_search_system/strategies/
Report generation src/local_deep_research/report_generator.py
Database, models, migrations src/local_deep_research/database/models/, src/local_deep_research/database/migrations/versions/, src/local_deep_research/database/thread_local_session.py
Vector store and RAG src/local_deep_research/vector_stores/, src/local_deep_research/research_library/services/library_rag_service.py
Programmatic API and MCP src/local_deep_research/api/, src/local_deep_research/mcp/
News, benchmarks, notes src/local_deep_research/news/, src/local_deep_research/benchmarks/, src/local_deep_research/research_library/notes/
Frontend src/local_deep_research/web/static/, src/local_deep_research/web/templates/, src/local_deep_research/web/themes/
Tests and CI tests/, .github/workflows/, .pre-commit-config.yaml, .pre-commit-hooks/, scripts/pre_commit/
Contributor and release policy CONTRIBUTING.md, changelog.d/README.md, docs/RELEASE_GUIDE.md
Architecture and decisions docs/architecture.md, docs/decisions/ (accepted ADRs are binding)
Development setup and CI detail docs/developing.md, docs/CI_CD_INFRASTRUCTURE.md

Read the full file on GitHub · 109 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. yesterday Changed · +11 lines · -35 tokens per session 1feae245980a
  2. 7d ago First seen · 98 lines · 3,853 tokens per session scan A 991ca8ee884c

Subscribe to this mod's changes

local-deep-research AGENTS.md is an instructions file published in the GitHub repository LearningCircuit/local-deep-research (9,506 stars, last pushed yesterday), licensed MIT. It adds 3,818 tokens to every session, about $0.0153 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-10-30.

Related

local-deep-research AGENTS.md compared with instructions from other repositories

local-deep-research AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
local-deep-research AGENTS.mdLearningCircuit/local-deep-researchInstructions file9.5kyesterdayMITA3,818Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode