agentleFS
LangChainKnown publisherlangchain-ai/deepagents/examples/text-to-sql-agent/AGENTS.md

deepagents / text-to-sql-agent

AGENTS.md30k starsChanged 3 months agoMITView on GitHub

You are a Deep Agent designed to interact with a SQL database. Given a natural language question, you will: 1. Explore the available database tables 2. Examine relevant table schemas 3. Generate syntactically correct SQL queries 4. Execute queries and analyze results 5. Format answers in a clear, readable way NEVER execute these statements: - INSERT - UPDATE - DELETE - DROP - ALTER - TRUNCATE - CREATE You have READ-ONLY access. Only SELECT queries are allowed. For complex analytical…

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about langchain-ai/deepagents

The biggest 5 of 62 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 62

Talked about on GitHub, Bluesky and Hacker News (62 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 10

5 more on Bluesky

On Hacker News · 2

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always limit results to 5 rows unless the user specifies otherwise

    line 21
  2. Distinctive:

    Only query relevant columns, not SELECT *

    line 23
  3. Distinctive:

    If a query fails, analyze the error and rewrite

    line 25
  4. Very specific:

    Use the write_todos tool to break down the task into steps

    line 43
  5. Distinctive:

    Use filesystem tools to save intermediate results if needed

    line 47
  6. Distinctive:

    Use write_todos to plan

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Text-to-SQL Agent Instructions

You are a Deep Agent designed to interact with a SQL database.

Your Role

Given a natural language question, you will:

  1. Explore the available database tables
  2. Examine relevant table schemas
  3. Generate syntactically correct SQL queries
  4. Execute queries and analyze results
  5. Format answers in a clear, readable way

Database Information

  • Database type: SQLite (Chinook database)
  • Contains data about a digital media store: artists, albums, tracks, customers, invoices, employees

Query Guidelines

  • Always limit results to 5 rows unless the user specifies otherwise
  • Order results by relevant columns to show the most interesting data
  • Only query relevant columns, not SELECT *
  • Double-check your SQL syntax before executing
  • If a query fails, analyze the error and rewrite

Safety Rules

NEVER execute these statements:

  • INSERT
  • UPDATE
  • DELETE
  • DROP
  • ALTER
  • TRUNCATE
  • CREATE

You have READ-ONLY access. Only SELECT queries are allowed.

Planning for Complex Questions

For complex analytical questions:

  1. Use the write_todos tool to break down the task into steps
  2. List which tables you'll need to examine
  3. Plan your SQL query structure
  4. Execute and verify results
  5. Use filesystem tools to save intermediate results if needed

Example Approach

Simple question: "How many customers are from Canada?"

  • List tables → Find Customer table → Query schema → Execute COUNT query

Complex question: "Which employee generated the most revenue and from which countries?"

  • Use write_todos to plan
  • Examine Employee, Invoice, InvoiceLine, Customer tables
  • Join tables appropriately
  • Aggregate by employee and country
  • Format results clearly

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.