ai4j: Instructions file for Codex

AGENTS.md

ai4j AGENTS.md is an instructions file for Codex, OpenCode from LnYo-Cly/ai4j. It costs 3,578 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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions AGENTS.md.

This is LnYo-Cly/ai4j's own configuration. It tells Codex and OpenCode how to work on ai4j itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai4j configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LnYo-Cly/ai4j. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LnYo-Cly/ai4j/main/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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai4j AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,578 This file is loaded in full into every session.
When invoked 3,578 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.03578 $0.03578
Opus 5.5 $0.01431 $0.01431
Sonnet 5.5 $0.00716 $0.00716
Haiku 4.5 $0.00358 $0.00358

Measured 1mo ago against content hash 8ad64b0a8ed0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 221 lines

How it starts

The opening of the file, as written. The whole thing — 221 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, treat ha capabilities --json and the relevant ha <domain> --help output as the command authority. If this workspace is not initialized, run ha init --repo-id ai4j-sdk --person-id <person-id> --display-name "<display-name>"; then inspect ha daemon status, ha agenda, ha agent list --json, ha squad list --json, and ha runtime instance list.
  • The current thin CLI does not expose the historical ha doctor --json, ha status --json, or ha check --profile target-project --strict --json preflight commands. Do not copy those commands from older task records; use the live capabilities/help output instead.
  • 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.
  • Fable identities are installed from packages containing agent.json or squad.json: validate with ha agent validate --source <dir> or ha squad validate --source <dir>, install with ha agent install --source <dir> or ha squad install --source <dir>, then read back with ha agent list --json plus ha agent inspect <id> or ha squad list --json plus ha squad inspect <id>. Dispatch uses a declared identity plus a ready runtime instance; the instance is an execution resource, not the agent or squad identity.
  • Complete work through the current HA lifecycle: acquire an Execution lease, 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 · 221 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. 1mo ago Changed · +2 lines · +275 tokens per session 8ad64b0a8ed0
  2. 1mo 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 (436 stars, last pushed 9d ago), licensed Apache-2.0. It adds 3,578 tokens to every session, about $0.0143 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,384 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens