agentic_design_patterns AGENTS.md

Repository instructions for an educational collection of runnable examples showing common ways to design AI agents. A monorepo is one repository containing multiple related projects; this one includes Python and TypeScript examples.

In plain words
What is it for?
Use them when running, modifying, or adding examples for prompt chains, routing, planning, tool use, retrieval, or collaboration between agents.
Why use it?
They explain the project layout and development conventions so changes fit the examples and their documentation.

Instructions file for CodexOpenCode

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.

agentmods
npx agentmods add instructions/gtesei/agentic_design_patterns/agents-md
Clone the repo
git clone --depth 1 https://github.com/gtesei/agentic_design_patterns

Made for: Codex, OpenCode.

Per session 3,822 This file is loaded in full into every session.
When invoked 3,822 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.03822 $0.03822
Opus 5 $0.01911 $0.01911
Sonnet 5 $0.00764 $0.00764
Haiku 4.5 $0.00382 $0.00382

Measured 2d ago against content hash 8d32ab0a59ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agentic_design_patterns 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 2d 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.

AGENTS.md · 266 lines

How it starts

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

AGENTS.md

Single source of truth for any AI agent working in this repository — Claude Code, OpenAI Codex, Aider, Cursor, Continue, etc. Repo guide + collaboration model + working conventions + project state. Read this first before making changes. Last updated 2026-05-17.

This file follows the AGENTS.md convention so any compliant agent picks it up automatically. There is no CLAUDE.md, CODEX.md, or other vendor-specific variant — AGENTS.md is the only file.


1. Repository purpose & layout

Educational, hands-on catalog of agentic-AI design patterns. Originally Python (LangChain / LangGraph); a curated TypeScript track now mirrors the entire foundational pattern set 1:1. Each pattern is self-contained, runnable, and accompanied by a long-form README.md. Reference material, not a deployable app.

Patterns live in 7 top-level category directories:

  • foundational_design_patterns/{1_prompt_chain, 2_routing, 3_parallelization, 4_reflection, 5_tool_use, 6_planning, 7_multi_agent_collaboration, 8_react, 9_rag, 10_hitl, 11_structured_outputs, 12_computer_use}
  • reasoning/{tree_of_thoughts, graph_of_thoughts, deep_research}
  • reliability/{error_recovery, guardrails}
  • orchestration/{goal_management, subagents, skills, agent_communication, mcp, prioritization}
  • observability/{evaluation_monitoring, resource_optimization}
  • memory/{memory_management, context_management}
  • learning/adaptive_learning

Each pattern dir has its own pyproject.toml, uv.lock, run.sh, README.md, QUICK_START.md, and src/ with example scripts (*_basic.py, *_advanced.py, or variants like _plan_and_act.py / _hiplan.py). Pattern packages all declare name = "agentic_design_patterns" but they are independent uv environments, not a single workspace — cd into the specific dir to install/run/lint.

TypeScript ports live under <pattern>/typescript/ for every pattern in foundational_design_patterns/. A single bun workspace with shared config lives in typescript_base/ (contains package.json, tsconfig.base.json, TYPESCRIPT.md) and covers all foundational TypeScript packages via the ../foundational_design_patterns/*/typescript glob.

Read the full file on GitHub · 266 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. 2d ago First seen · 266 lines · 3,822 tokens per session scan A 8d32ab0a59ac

Subscribe to this mod's changes

agentic_design_patterns AGENTS.md is an instructions file published in the GitHub repository gtesei/agentic_design_patterns (19 stars, last pushed 2mo ago), licensed MIT. It adds 3,822 tokens to every session, about $0.0191 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.