agentfootprint AGENTS.md

agentfootprint AGENTS.md is an instructions file for Codex, OpenCode from footprintjs/agentfootprint. It costs 7,987 tokens per session, scanned A, original, MIT.

A JavaScript framework for building generative-AI applications by controlling what information enters each language-model call and when. It provides calls, agents, reusable flow compositions, injections, and memory definitions.

In plain words
What is it for?
It helps build sequential, parallel, conditional, and looping agent workflows, add typed context or memory, and implement patterns such as Reflexion, Tree of Thought, and Swarm from shared building blocks.
Why use it?
It makes context engineering—the work of deciding which instructions, conversation, facts, and memory the model receives—explicit in the application’s control flow.

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/footprintjs/agentfootprint/agents-md
Clone the repo
git clone --depth 1 https://github.com/footprintjs/agentfootprint

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 agentfootprint AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/footprintjs/agentfootprint/agents-md.svg)](https://agentmods.dev/instructions/footprintjs/agentfootprint/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/footprintjs/agentfootprint/agents-md"><img src="https://agentmods.dev/badge/instructions/footprintjs/agentfootprint/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,987 This file is loaded in full into every session.
When invoked 7,987 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.07987 $0.07987
Opus 5 $0.03993 $0.03993
Sonnet 5 $0.01597 $0.01597
Haiku 4.5 $0.00799 $0.00799

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

Security

Grade A, and why

agentfootprint 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 4d 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 · 663 lines

How it starts

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

agentfootprint — Agent Instructions (OpenAI Codex)

This is the agentfootprint library — a framework for building Generative AI applications where context engineering is buildable at the control-flow level. Built on footprintjs (the flowchart pattern for backend code).

Core Thesis

Building Generative AI applications is mostly context engineering — deciding what content lands in which slot of the LLM call, when, and why. agentfootprint exposes this discipline through:

  • 2 primitivesLLMCall, Agent (= ReAct loop)
  • 3 compositions + LoopSequence · Parallel · Conditional · Loop
  • 1 unifying injection primitiveInjection with 4 typed sugar factories
  • 1 memory factorydefineMemory({ type, strategy, store })

Every named pattern (Reflexion, ToT, Swarm, ...) is a recipe over these. Don't ship new classes per paper.

The Mental Model — Three Slots, Six Flavors

Every LLM call has three slots. Every "agent feature" is content flowing into one of them:

LLM API field What goes here
system prompt Steering · Instruction text · Skill body · Fact data · formatted memory
messages array The conversation — user turns, assistant turns, tool results. Assembled from the conversation itself, never injected into
tools array Tool schemas (registered + Skill-attached)

The flavors are how you mark intent — but they all reduce to one Injection primitive:

Flavor Trigger Slots
Skill LLM-activated (read_skill) system-prompt + tools
Steering Always-on system-prompt
Instruction Predicate (activeWhen / on-tool-return) system-prompt
Fact Always-on (data) system-prompt

Build the entire app — agent, context engineering, tools, memory, RAG, MCP — against in-memory mocks first. Validate logic and patterns end-to-end with $0 API cost. Swap real infrastructure in, one boundary at a time, only after the flow is right.

Read the full file on GitHub · 663 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. 4d ago First seen · 663 lines · 7,987 tokens per session scan A 4613bb2b4c1e

Subscribe to this mod's changes

agentfootprint AGENTS.md is an instructions file published in the GitHub repository footprintjs/agentfootprint (20 stars, last pushed today), licensed MIT. It adds 7,987 tokens to every session, about $0.0399 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.