ai4j AGENTS.md

ai4j AGENTS.md is an instructions file for Codex, OpenCode from LnYo-Cly/ai4j. It costs 3,303 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for ai4j-sdk, a Java software development kit organised as a Maven monorepo. A monorepo keeps multiple related modules and applications in one repository.

In plain words
What is it for?
They help agents work on extensions, plugins, agents, coding tools, command-line interfaces, Spring Boot integrations, web demos, and core AI features.
Why use it?
They explain the role of each module so changes land in the correct part of the SDK and its documentation or demos.

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/lnyo-cly/ai4j/agents-md
Clone the repo
git clone --depth 1 https://github.com/LnYo-Cly/ai4j

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lnyo-cly/ai4j/agents-md.svg)](https://agentmods.dev/instructions/lnyo-cly/ai4j/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/lnyo-cly/ai4j/agents-md"><img src="https://agentmods.dev/badge/instructions/lnyo-cly/ai4j/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,303 This file is loaded in full into every session.
When invoked 3,303 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.1 $0.03303 $0.03303
Opus 5 $0.01651 $0.01651
Sonnet 5 $0.00661 $0.00661
Haiku 4.5 $0.00330 $0.00330

Measured 5d ago against content hash cff0a9ae4796, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

ai4j 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 5d 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 · 219 lines

How it starts

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

Repository Guidelines

Project Identity

  • Project: ai4j-sdk
  • Repository type: Java 8 Maven monorepo with adjacent docs and demo surfaces
  • Primary language: Java
  • Build tool: Maven
  • Frontend/docs surfaces: docs-site/ and ai4j-flowgram-webapp-demo/

Monorepo Scope

Treat this repository as a 10-module monorepo plus docs/demo surfaces.

Path Role
ai4j-extension-api/ Lightweight public extension contract: manifest, ServiceLoader discovery, explicit enable/expose gates, extension resources
ai4j-plugin-ask-user/ Official sample plugin package: host-mediated user clarification tool, command, Skill, and Prompt
ai4j/ Core SDK: provider access, Chat/Responses, RAG, MCP, vector, image, audio, realtime
ai4j-agent/ Agent runtime, workflow, trace, memory, subagent/team orchestration
ai4j-coding/ Coding-agent runtime, workspace-aware tools, outer loop, compaction
ai4j-cli/ CLI, TUI, ACP host, session/runtime integration
ai4j-spring-boot-starter/ Spring Boot auto-configuration for core SDK
ai4j-flowgram-spring-boot-starter/ FlowGram integration, task APIs, trace bridge, starter-side runtime support
ai4j-flowgram-demo/ Demo backend for FlowGram starter integration
ai4j-bom/ Version alignment BOM
docs-site/ Docusaurus documentation site
ai4j-flowgram-webapp-demo/ Web demo frontend surface

Harness Anything

  • Use ha (Harness Anything) for all new project-management work.
  • harness/ is the active private HA ledger with its own nested Git repository. .harness/ is generated projection/cache state. Neither belongs in code PRs; commit ledger changes inside harness/ separately when they must be retained.
  • Before substantive work, run ha doctor --json, ensure the project has been initialized with ha init --name ai4j-sdk, and inspect ha status --json / ha check --profile target-project --strict --json.
  • HA writes require explicit actor attribution. Agents use HARNESS_ACTOR=agent:<id> or an explicit agent actor; humans use ha --actor human:<id>. Do not export a human actor for child processes. Configure HARNESS_GIT_AUTHOR_NAME and HARNESS_GIT_AUTHOR_EMAIL for local ledger commits.
  • The normal write path is the daemon-backed CLI. HARNESS_DAEMON_MODE=direct is only for bootstrap, recovery, or isolated tests, and must carry HARNESS_DIRECT_WRITE_REASON=recovery|test.
  • Complete work through the current HA lifecycle: claim an Execution, record progress/evidence, obtain a typed human review/consent when required, and run ha task complete. ha task review is legacy compatibility lint, not the approval gate.

Read the full file on GitHub · 219 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. 5d ago First seen · 219 lines · 3,303 tokens per session scan A cff0a9ae4796

Subscribe to this mod's changes

ai4j AGENTS.md is an instructions file published in the GitHub repository LnYo-Cly/ai4j (428 stars, last pushed yesterday), licensed Apache-2.0. It adds 3,303 tokens to every session, about $0.0165 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.