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

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,497 stars · on GitHub · flowelement.ai

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/flowelement-xinliuyuansu/m_flow/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.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.svg" alt="Measured on agentmods" 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. 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.01075 $0.01075
Opus 5 $0.00537 $0.00537
Sonnet 5 $0.00215 $0.00215
Haiku 4.5 $0.00108 $0.00108

Measured 6d ago against content hash c86577d5cde0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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. 6d 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,497 stars, last pushed 4d ago), licensed Apache-2.0. It adds 1,075 tokens to every session, about $0.0054 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.

Related

Other instructions, from other repositories

vellis AGENTS.md

AGENTS.md instructions for volantlabs/vellis, covering agents.md, repository purpose, startup checks, installing vellis for a user and model-first component workflow.

volantlabs/vellis · 4,953 tokens

aingle GEMINI.md

Gemini CLI instructions for ApiliumCode/aingle, covering systemprompt: architect & developer mode, 1. reglas de identidad y propiedad, 2. gestión de contexto (carpeta /contexto), 3. calidad y ejecución de código and 4. administración de capacidades y límites (anti-colapso).

ApiliumCode/aingle · 627 tokens

omnigraph AGENTS.md

AGENTS.md instructions for ModernRelay/omnigraph, covering omnigraph agent guide, required reading, repository snapshot, documentation map and engineering rules.

ModernRelay/omnigraph · 1,863 tokens

engraphis AGENTS.md

AGENTS.md instructions for Coding-Dev-Tools/engraphis, covering agents.md — engraphis, internal subagent delegation, 0. read this first — two architectures live in one package, 1. commands and ── unified dashboard + memory inspector ──.

Coding-Dev-Tools/engraphis · 4,947 tokens

altk-evolve AGENTS.md

AGENTS.md instructions for AgentToolkit/altk-evolve, covering what is evolve?, key concepts, architecture flow, project directory tree (some files omitted for brevity) and first time setup.

AgentToolkit/altk-evolve · 1,057 tokens

Meterless AGENTS.md

Instructions for Meterless/Meterless, covering agent instructions for meterless, routing table, isolation rule, repo-wide rules and non-coding agents.

Meterless/Meterless · 456 tokens