agentic-patterns

A set of patterns for deciding between a simple model call, a fixed workflow, or an agent that plans and uses tools. It covers prompt chaining, routing requests, and evaluator-optimizer loops.

In plain words
What is it for?
Use it to design LLM applications, choose how requests should flow, route different inputs to different models or tools, and add checks between steps.
Why use it?
It helps you avoid adding agent complexity when a simpler approach is enough, while showing how to split harder tasks into manageable steps.

Cursor rule for Cursor

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 rules/sijeeshmiziha/visionagent/agentic-patterns
Clone the repo
git clone --depth 1 https://github.com/sijeeshmiziha/visionagent

Made for: Cursor.

Per session 424 This file is loaded in full into every session.
When invoked 424 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.00424 $0.00424
Opus 5 $0.00212 $0.00212
Sonnet 5 $0.00085 $0.00085
Haiku 4.5 $0.00042 $0.00042

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

Security

Grade A, and why

agentic-patterns 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.

.cursor/rules/agentic-patterns.mdc · 39 lines

What it actually says

Agentic Workflow Patterns

Complexity Decision Framework

  • Start with the simplest solution: single LLM call with retrieval or in-context examples. Often sufficient.
  • Use workflows (predefined code paths) for well-defined tasks where predictability and consistency matter.
  • Use agents (LLM-directed tool use and planning) only for open-ended tasks where flexibility and model-driven decision-making are needed.
  • Add complexity only when it demonstrably improves outcomes. Measure first; agentic systems trade latency and cost for task performance.

Workflow Patterns

Prompt Chaining

  • Decompose a task into a sequence of steps; each LLM call consumes the previous step’s output.
  • Add gates (programmatic checks) on intermediate steps to keep the process on track.
  • Use when the task decomposes cleanly into fixed subtasks; trade latency for higher accuracy per step.

Routing

  • Classify input and direct to specialized prompts, tools, or models.
  • Use when distinct categories are better handled separately (e.g. easy questions → small model, hard → capable model; support types → different downstream flows).
  • Classification can be LLM-based or a traditional classifier.

Evaluator-Optimizer

  • One LLM generates a response; another evaluates and gives feedback in a loop.
  • Use when you have clear evaluation criteria and iterative refinement adds measurable value (e.g. translation with critique, multi-round search with “need more?” decisions).

Agent Design Principles

  • Simplicity: Keep agent design as simple as the task allows; avoid extra abstraction.
  • Transparency: Expose the agent’s planning steps explicitly so behavior is interpretable.
  • Agent-Computer Interface (ACI): Invest in tool documentation and ergonomics as seriously as in human-facing interfaces; unclear tools are a major source of failure.
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 · 39 lines · 424 tokens per session scan A 619e3ce87579

Subscribe to this mod's changes

agentic-patterns is a cursor rule published in the GitHub repository sijeeshmiziha/visionagent (2 stars, last pushed 5mo ago), licensed MIT. It adds 424 tokens to every session, about $0.0021 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-31.

Related

Other cursor rules, from other repositories