hugegraph AGENTS.md

Project instructions for Apache HugeGraph, a Java graph database that stores relationships between things and can be accessed through Gremlin, Cypher, or REST APIs.

In plain words
What is it for?
Finding graph-engine, API, storage, placement, and shared-code modules, then building or testing the relevant Maven components.
Why use it?
They show agents how the large multi-module codebase is organized and where to search when making or reviewing changes.

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/apache/hugegraph/agents-md
Clone the repo
git clone --depth 1 https://github.com/apache/hugegraph

Made for: Codex, OpenCode.

Per session 1,126 This file is loaded in full into every session.
When invoked 1,126 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 $0.01126 $0.01126
Opus 5 $0.00563 $0.00563
Sonnet 5 $0.00225 $0.00225
Haiku 4.5 $0.00113 $0.00113

Measured yesterday against content hash 980c5cc47fff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hugegraph 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 yesterday.

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 · 109 lines

How it starts

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

AGENTS.md

Single source of truth for AI coding agents. README.md covers human-facing deployment/ecosystem context; only consult it on demand.

Stack & Modules

Apache HugeGraph — Apache TinkerPop 3 compliant graph database. Java 11+, Maven 3.5+. Version managed via ${revision} (currently 1.8.0).

Client (Gremlin / Cypher / REST)
   │
Server = hugegraph-server
   ├─ hugegraph-api     REST, Gremlin/Cypher, auth
   ├─ hugegraph-core    engine, schema, traversal, BackendStore interface
   └─ Backend impls     rocksdb (default, embedded) │ hstore (distributed)
                                                    ▼
                           hugegraph-pd (placement) + hugegraph-store (Raft)

Top-level modules: hugegraph-server · hugegraph-pd · hugegraph-store · hugegraph-commons (shared utils & RPC) · hugegraph-struct (data types; dep of PD/Store).

Server submodules worth knowing: hugegraph-core, hugegraph-api, hugegraph-rocksdb, hugegraph-hstore, hugegraph-test, hugegraph-dist.

Code Search Anchors

Area Path
Graph engine hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/
REST APIs hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/
Backend interface hugegraph-server/hugegraph-core/.../backend/store/BackendStore.java
Auth hugegraph-server/hugegraph-api/.../api/auth/
gRPC protos hugegraph-{pd,store}/hg-{pd,store}-grpc/src/main/proto/

Config roots (under each dist module's src/assembly/static/conf/):

  • Server — hugegraph.properties, rest-server.properties, gremlin-server.yaml
  • PD / Store — application.yml

Build

# All modules
mvn clean install -DskipTests

# Single module
mvn clean install -pl hugegraph-server -am -DskipTests

Distributed build order (for HStore-enabled dev):

mvn install -pl hugegraph-struct -am -DskipTests         # 1. shared data types
mvn clean package -pl hugegraph-pd -am -DskipTests       # 2. placement driver
mvn clean package -pl hugegraph-store -am -DskipTests    # 3. distributed storage
mvn clean package -pl hugegraph-server -am -DskipTests   # 4. server

Read the full file on GitHub · 109 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. yesterday First seen · 109 lines · 1,126 tokens per session scan A 980c5cc47fff

Subscribe to this mod's changes

hugegraph AGENTS.md is an instructions file published in the GitHub repository apache/hugegraph (3,161 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,126 tokens to every session, about $0.0056 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.