m_flow: Instructions file for Codex

AGENTS.md

m_flow AGENTS.md is an instructions file for Codex, OpenCode from FlowElement-xinliuyuansu/m_flow. It costs 1,075 tokens per session, scanned A, original, Apache-2.0.

Developer instructions for m-flow, a Python system that stores, processes, and searches information, with a web console and an MCP server. MCP is a standard way for AI tools to connect to external systems.

In plain words
What is it for?
Working on m-flow’s Python backend, Next.js console, command-line tool, data storage, search and retrieval, authentication, AI providers, and tests.
Why use it?
They explain where the backend, frontend, storage adapters, search code, and tests live. This reduces the risk of changing the wrong layer or breaking supported development workflows.

Instructions file for CodexOpenCode

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

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

About the project

M-flow is a retrieval and memory engine for large-language-model applications that uses knowledge-graph paths to connect questions with evidence. It is for systems that need reasoning-oriented Graph RAG and cognitive-style memory, with the catalogue instruction serving as an agent workflow for using it.

FlowElement-xinliuyuansu/m_flow · 4,508 stars · on GitHub · flowelement.ai

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/flowelement-xinliuyuansu/m_flow/agents-md"><img src="https://agentmods.dev/badge/instructions/flowelement-xinliuyuansu/m_flow/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,075 This file is loaded in full into every session.
When invoked 1,075 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.01075 $0.01075
Opus 5.5 $0.00430 $0.00430
Sonnet 5.5 $0.00215 $0.00215
Haiku 4.5 $0.00108 $0.00108

Measured 2mo ago against content hash c86577d5cde0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

m_flow 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 2mo 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 · 152 lines

How it starts

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

M-flow — Developer & Agent Reference

This file is intended for AI coding assistants (Cursor, Copilot, etc.) and human contributors alike. It describes the repository layout, toolchain, and conventions needed to make changes safely.


1. Repository Map

m_flow/                 Python core (FastAPI + pipeline engine)
  api/                  HTTP routers: add, memorize, search, delete, …
  cli/                  CLI entrypoint (`mflow`)
  adapters/             DB adapters (graph, vector, cache)
  llm/                  LLM providers, prompts, structured output
  core/                 Domain models (Episode, Facet, FacetPoint, …)
  memory/               Memory processing (episodic, procedural)
  retrieval/            Search & retrieval algorithms
  pipeline/             Composable pipeline tasks & orchestration
  auth/                 Authentication & multi-tenancy
  eval/                 Evaluation harnesses & adapters
  shared/               Logging, settings, loaders, cross-cutting utilities
  tests/                Pytest suite (unit / integration / CLI)

m_flow-frontend/        Next.js console (pnpm)
m_flow-mcp/             MCP server — exposes memory as tool calls
mflow_workers/          Modal / worker helpers for distributed runs
examples/               Runnable demo scripts (Python, notebooks)
alembic/                SQL migration scripts (Alembic)

Extension Points

  • New data source → add a loader under shared/loaders/
  • New pipeline step → add a task under pipeline/
  • New graph DB → implement the adapter interface in adapters/graph/
  • New vector store → implement adapter in adapters/vector/
  • New LLM provider → extend llm/LLMGateway.py

2. Local Development

Python backend (requires Python 3.10 – 3.13)

# Bootstrap
uv sync --dev --all-extras --reinstall

# Run the API server
uv run python -m m_flow.api.client

# CLI quick-start
uv run mflow add "M-flow builds structured memory for agents."
uv run mflow memorize
uv run mflow search "How does M-flow work?"
uv run mflow -ui          # launches backend + frontend + MCP

Read the full file on GitHub · 152 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. 2mo ago First seen · 152 lines · 1,075 tokens per session scan A c86577d5cde0

Subscribe to this mod's changes

m_flow AGENTS.md is an instructions file published in the GitHub repository FlowElement-xinliuyuansu/m_flow (4,508 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 1,075 tokens to every session, about $0.0043 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

m_flow AGENTS.md compared with instructions from other repositories

m_flow AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
m_flow AGENTS.mdFlowElement-xinliuyuansu/m_flowInstructions file4.5k2mo agoApache-2.0A1,075Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode