ankaloop: Instructions file for Codex

AGENTS.md

ankaloop AGENTS.md is an instructions file for Codex, OpenCode from tao12345666333/ankaloop. It costs 1,328 tokens per session, scanned A, original, Apache-2.0.

Project rules for AnkaLoop, a Python runtime for coding agents with a command line, web connections, Telegram, MCP tools, multiple agents, and memory. They describe its code style, configuration, and main module layout.

In plain words
What is it for?
Use them when modifying AnkaLoop tools, agent delegation, configuration, servers, clients, protocol conversion, or project-rule loading.
Why use it?
They give the coding agent the project conventions and architecture it must follow when making changes.

Instructions file for CodexOpenCode

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

This is tao12345666333/ankaloop's own configuration. It tells Codex and OpenCode how to work on ankaloop 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 ankaloop configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tao12345666333/ankaloop. 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/tao12345666333/ankaloop/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/tao12345666333/ankaloop

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tao12345666333/ankaloop/agents-md/github.svg)](https://agentmods.dev/instructions/tao12345666333/ankaloop/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tao12345666333/ankaloop/agents-md"><img src="https://agentmods.dev/badge/instructions/tao12345666333/ankaloop/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 ankaloop AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tao12345666333/ankaloop/agents-md"><img src="https://agentmods.dev/badge/instructions/tao12345666333/ankaloop/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,328 This file is loaded in full into every session.
When invoked 1,328 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.01328 $0.01328
Opus 5 $0.00664 $0.00664
Sonnet 5 $0.00266 $0.00266
Haiku 4.5 $0.00133 $0.00133

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

Security

Grade A, and why

ankaloop 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 10d 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 · 156 lines

How it starts

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

AnkaLoop Project Rules

Project Overview

AnkaLoop is a Python coding-agent runtime with a CLI, HTTP/WebSocket server, Telegram integration, MCP tools, multi-agent delegation, skills, hooks, memory, and progressive context management.

Code Style

  • Python 3.11+ with modern type hints.
  • Follow PEP 8 conventions.
  • Maximum line length is 100 characters, enforced by ruff.
  • Use dataclasses for configuration and lightweight data structures.
  • Keep public functions and classes documented with docstrings.
  • Use the logging module for runtime diagnostics, not print.

Architecture Patterns

  • Tools are classes inheriting from BaseTool in src/ankaloop/tools.py.
  • Agents are configured through AgentSpec and ResolvedAgentSpec.
  • Built-in agent types live in src/ankaloop/multi_agent.py.
  • Configuration is TOML and is loaded through src/ankaloop/config.py.
  • Project rules are loaded from AGENTS.md through src/ankaloop/project_rules.py.
  • HTTP/WebSocket server code lives under src/ankaloop/server/.
  • Client transports live under src/ankaloop/client/; protocol conversion code lives under src/ankaloop/protocol/.
  • Telegram command handling is split between src/ankaloop/telegram/bot.py and src/ankaloop/telegram/handlers.py.
  • Keep shared slash-command behavior in src/ankaloop/interaction.py when possible so CLI, server, and Telegram stay consistent.

Agent Behavior

  • Conversation history is persisted per session.
  • Per-request tool counters should reset for each user prompt; session-level history may still be used for diagnostics and caps.
  • read_file has conversation and session limits.
  • bash runs from the request working directory when available, has a per-request cap, and truncates large output.
  • Telegram /new should create a fresh session, abandon old active work, and clear old queued messages.
  • Model provider failures currently bubble up through AgentExecutionError; do not assume an AnkaLoop application-level retry exists.

Read the full file on GitHub · 156 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. 10d ago First seen · 156 lines · 1,328 tokens per session scan A 3e56837be689

Subscribe to this mod's changes

ankaloop AGENTS.md is an instructions file published in the GitHub repository tao12345666333/ankaloop (48 stars, last pushed 11d ago), licensed Apache-2.0. It adds 1,328 tokens to every session, about $0.0066 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.