Skip to content

Commit b7f6659

Browse files
authored
Add 3 patterns: tool-search-lazy-loading, dual-llm-pattern, lethal-trifecta-threat-model (#4)
* Add 3 patterns: tool-search-lazy-loading, dual-llm-pattern, lethal-trifecta-threat-model Inspired by gaps surfaced against agentic-patterns.com, rewritten from upstream sources into the catalog's POSA schema: - tool-search-lazy-loading (tool-use-environment, emerging) — defer tool schema injection until a ToolSearch primitive returns matches; addresses the context-budget cost that tool-loadout and tool-discovery don't. Sources: Anthropic Agent Skills post, MCP spec, Thariq Shihipar. - dual-llm-pattern (safety-control, emerging) — split work between a privileged tool-holding model and a quarantined content-reading model with symbolic-handle handoff. Sources: Willison 2023, Beurer-Kellner et al. arXiv:2506.08837 §3.1(4). - lethal-trifecta-threat-model (safety-control, emerging) — capability-set frame: no execution path may simultaneously hold private-data read, untrusted-content ingest, and outbound channel. Sources: Willison 2025, CVE-2024-38206, Beurer-Kellner et al. Adds 11 mirror/inverse edges across tool-loadout, tool-discovery, context-window-packing, mcp, prompt-injection-defense, input-output-guardrails, sandbox-isolation, tool-output-poisoning to balance the typed-edge graph. Adds 3 verification-todo entries. Pattern count 195 → 198. All lint rules pass for new patterns. * Strip pure-future known_uses; fix 2 dead URLs blocking CI - Remove 4 known_uses entries with status='pure-future' across lats, llm-compiler, rewoo, reflexion (they are not actual known uses). - Replace the now-empty known_uses on lats, llm-compiler, reflexion with real available implementations (paper authors' GitHub releases + LangGraph examples; all URLs verified live). rewoo retains its existing 'agent-patterns library' entry. - Replace dead URL https://platform.openai.com/docs/api-reference/chat on confidence-reporting with https://cookbook.openai.com/examples/using_logprobs. - Replace dead URL https://plandex.ai/ on framework-coverage plandex entry with the canonical GitHub repo URL. Lint A6.1 (known_uses non-empty), A6.3 (URL liveness) and all other rules pass.
1 parent 7e5a480 commit b7f6659

15 files changed

Lines changed: 1055 additions & 217 deletions

INDEX.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pattern Index
22

3-
195 patterns across 13 categories.
3+
198 patterns across 13 categories.
44

55
## Reasoning
66

@@ -58,6 +58,7 @@
5858
- [Tool Discovery](patterns/tool-discovery.md) *(a.k.a. Capability Advertisement, Dynamic Tool Loading)* — Let the agent discover available tools at runtime rather than hardcoding the tool list at agent build time.
5959
- [Tool Loadout](patterns/tool-loadout.md) *(a.k.a. Tool Subset Selection, Per-Task Tool Filtering, Tool Filter, Limit Exposed Tools)* — Select a small task-relevant subset of available tools per request rather than exposing the full registry to the model.
6060
- [Tool Result Caching](patterns/tool-result-caching.md) *(a.k.a. Memoised Tools, Idempotent Cache)* — Cache the result of expensive deterministic tool calls keyed by their arguments so repeat calls within a session return immediately.
61+
- [Tool Search Lazy Loading](patterns/tool-search-lazy-loading.md) *(a.k.a. Lazy Tool Loading, On-Demand Tool Schema Loading, ToolSearch Primitive)* — Defer loading tool schemas into the context window until a search step shows they are needed.
6162
- [Tool Use](patterns/tool-use.md) *(a.k.a. Function Calling, Tool Calling, Action Use)* — Let the LLM produce typed calls against an external toolkit instead of producing free-form text the surrounding system has to parse.
6263
- [Toolformer](patterns/toolformer.md) *(a.k.a. Self-Supervised Tool Learning)* — Train the model to learn when and how to call tools through self-supervised data, without human annotation.
6364
- [Translation Layer](patterns/translation-layer.md) *(a.k.a. Anti-Corruption Layer, Adapter Pattern (Agentic), API Façade)* — Insert a typed boundary between the agent's clean domain model and a messy or legacy external API.
@@ -147,10 +148,12 @@
147148
- [Constitutional Charter](patterns/constitutional-charter.md) *(a.k.a. Immutable Constitution, Negative Constraints, Robot Laws)* — Define rules the agent reads every turn but cannot modify, encoding inviolable boundaries.
148149
- [Conversation Handoff to Human](patterns/conversation-handoff.md) *(a.k.a. Escalation, Live-Agent Handoff, Human Takeover)* — Transfer the entire conversation thread from agent to human operator, with state transfer and return primitive.
149150
- [Cost Gating](patterns/cost-gating.md) *(a.k.a. Budget Cap, Cost-Aware Approval)* — Block actions whose expected cost exceeds a threshold without explicit user (or operator) acknowledgement.
151+
- [Dual LLM Pattern](patterns/dual-llm-pattern.md) *(a.k.a. Privileged/Quarantined LLM Split, Dual-Model Privilege Separation, Symbolic-Variable Handoff)* — Split agent work between a privileged model that holds tool access and a quarantined model that reads untrusted content, exchanging only opaque references between them.
150152
- [Exception Handling and Recovery](patterns/exception-recovery.md) *(a.k.a. Error Recovery, Failure Mode Handler)* — Catch and react to predictable failure modes (tool errors, rate limits, validation failures) with structured recovery paths.
151153
- [Human-in-the-Loop](patterns/human-in-the-loop.md) *(a.k.a. HITL, Approval Gate, Confirmation Step, Risky Action Gate, Destructive Action Confirmation, Ask Before Risky Action)* — Require explicit human approval at defined points before the agent performs an action.
152154
- [Input/Output Guardrails](patterns/input-output-guardrails.md) *(a.k.a. Guards, Validators, Content Filters)* — Validate inputs before they reach the model and outputs before they reach the user.
153155
- [Kill Switch](patterns/kill-switch.md) *(a.k.a. Out-of-Band Stop, Emergency Halt, Killbit, Halt All Agents, Stop Every Running Agent)* — Provide an out-of-band control plane to halt running agent instances without redeploy.
156+
- [Lethal Trifecta Threat Model](patterns/lethal-trifecta-threat-model.md) *(a.k.a. Willison Trifecta, Three-Capabilities Exfiltration Risk)* — Block prompt-injection-driven exfiltration by ensuring no single agent execution path holds all three of: access to private data, exposure to untrusted content, and an outbound communication channel.
154157
- [PII Redaction](patterns/pii-redaction.md) *(a.k.a. Data Loss Prevention, Sensitive Data Filtering)* — Detect and remove personally identifiable information from inputs to and outputs from the model.
155158
- [Prompt Injection Defense](patterns/prompt-injection-defense.md) *(a.k.a. Instruction Hierarchy, Untrusted-Content Tagging)* — Tag user-supplied or tool-supplied content as untrusted and refuse to follow instructions found inside it.
156159
- [Quorum on Mutation](patterns/quorum-on-mutation.md) *(a.k.a. Two-Tick Confirmation, Distributed Consensus (Single Agent))* — Require multiple consecutive ticks (or runs) to agree before a mutation to durable state lands.

framework-coverage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@
10091009
"name": "Plandex",
10101010
"vendor": "Plandex",
10111011
"language": "Go",
1012-
"url": "https://plandex.ai/",
1012+
"url": "https://github.com/plandex-ai/plandex",
10131013
"last_analyzed": "2026-05-02",
10141014
"coverage": {
10151015
"plan-and-execute": "fully",

patterns-src/memory.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@
256256
}
257257
],
258258
"related": [
259+
{
260+
"pattern": "dynamic-scaffolding",
261+
"relation": "complements"
262+
},
259263
{
260264
"pattern": "episodic-summaries",
261265
"relation": "uses"
@@ -265,24 +269,24 @@
265269
"relation": "alternative-to"
266270
},
267271
{
268-
"pattern": "dynamic-scaffolding",
269-
"relation": "complements"
270-
},
271-
{
272-
"pattern": "todo-list-driven-agent",
272+
"pattern": "reasoning-trace-carry-forward",
273273
"relation": "used-by"
274274
},
275275
{
276-
"pattern": "reasoning-trace-carry-forward",
277-
"relation": "used-by"
276+
"pattern": "salience-attention-mechanism",
277+
"relation": "alternative-to"
278278
},
279279
{
280280
"pattern": "self-archaeology",
281281
"relation": "complements"
282282
},
283283
{
284-
"pattern": "salience-attention-mechanism",
285-
"relation": "alternative-to"
284+
"pattern": "todo-list-driven-agent",
285+
"relation": "used-by"
286+
},
287+
{
288+
"pattern": "tool-search-lazy-loading",
289+
"relation": "complements"
286290
}
287291
],
288292
"references": [

patterns-src/planning-control-flow.json

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,6 @@
393393
]
394394
},
395395
"constrains": "Each node may be expanded only by sampling actions consistent with the parent state.",
396-
"known_uses": [
397-
{
398-
"system": "Pure future for Stash2Go",
399-
"note": "Conversational answerer for ambiguous knitting questions ('can I substitute X for Y?').",
400-
"status": "pure-future"
401-
}
402-
],
403396
"related": [
404397
{
405398
"pattern": "react",
@@ -486,7 +479,21 @@
486479
"diagram": {
487480
"type": "flow",
488481
"mermaid": "flowchart TD\n Root[Partial trajectory] --> Sel[UCT selection]\n Sel --> Exp[Expansion: sample next thoughts/actions]\n Exp --> Sim[Simulate]\n Sim --> Val[Value estimate]\n Val --> Back[Backpropagate up tree]\n Back --> Sel\n Sel -.failing branch.-> BT[Backtrack instead of commit]"
489-
}
482+
},
483+
"known_uses": [
484+
{
485+
"system": "LanguageAgentTreeSearch (reference implementation)",
486+
"note": "Original code release by the LATS paper authors (Zhou et al.).",
487+
"status": "available",
488+
"url": "https://github.com/lapisrocks/LanguageAgentTreeSearch"
489+
},
490+
{
491+
"system": "LangGraph LATS example",
492+
"note": "LangGraph ships an LATS notebook in its examples.",
493+
"status": "available",
494+
"url": "https://github.com/langchain-ai/langgraph"
495+
}
496+
]
490497
},
491498
{
492499
"id": "llm-compiler",
@@ -516,13 +523,6 @@
516523
]
517524
},
518525
"constrains": "Steps run only when all referenced upstream variables are resolved.",
519-
"known_uses": [
520-
{
521-
"system": "Pure future for Bobbin",
522-
"note": "Agent-lane plans with two unrelated tools could run concurrently.",
523-
"status": "pure-future"
524-
}
525-
],
526526
"related": [
527527
{
528528
"pattern": "rewoo",
@@ -576,7 +576,21 @@
576576
"diagram": {
577577
"type": "flow",
578578
"mermaid": "flowchart TD\n Q[Task] --> Pl[Planner: build dependency DAG]\n Pl --> TFU[Task-Fetching Unit]\n TFU --> S1[Step 1]\n TFU --> S2[Step 2 parallel]\n TFU --> S3[Step 3 parallel]\n S1 --> S4[Step 4 depends on 1]\n S2 --> S4\n S3 --> S5[Step 5 depends on 3]\n S4 --> J[Joiner]\n S5 --> J\n J --> Ans[Final answer]"
579-
}
579+
},
580+
"known_uses": [
581+
{
582+
"system": "LLMCompiler (reference implementation)",
583+
"note": "Berkeley SqueezeAILab release of the LLMCompiler paper code.",
584+
"status": "available",
585+
"url": "https://github.com/SqueezeAILab/LLMCompiler"
586+
},
587+
{
588+
"system": "LangGraph LLMCompiler example",
589+
"note": "LangGraph ships an LLMCompiler example.",
590+
"status": "available",
591+
"url": "https://github.com/langchain-ai/langgraph"
592+
}
593+
]
580594
},
581595
{
582596
"id": "map-reduce",
@@ -1263,11 +1277,6 @@
12631277
},
12641278
"constrains": "The Planner cannot see tool outputs; substitution happens only at the Worker stage.",
12651279
"known_uses": [
1266-
{
1267-
"system": "Pure future for Stash2Go",
1268-
"note": "Periodic offline normalisation of yarn catalogue when an upstream weight definition changes.",
1269-
"status": "pure-future"
1270-
},
12711280
{
12721281
"system": "agent-patterns library",
12731282
"status": "available"

0 commit comments

Comments
 (0)