经 AI Skill Hub 精选评估,memgraph-ingester 获评「推荐使用」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.1 分,适合有一定技术背景的用户使用。
memgraph-ingester 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
memgraph-ingester 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 克隆仓库 git clone https://github.com/ousatov-ua/memgraph-ingester cd memgraph-ingester # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 memgraph-ingester --help # 基本运行 memgraph-ingester [options] <input> # 详细使用说明请查阅文档 # https://github.com/ousatov-ua/memgraph-ingester
# memgraph-ingester 配置说明 # 查看配置选项 memgraph-ingester --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export MEMGRAPH_INGESTER_CONFIG="/path/to/config.yml"
Memgraph Ingester indexes a Java or JavaScript/TypeScript codebase into Memgraph so AI agents can query a real code graph instead of repeatedly scanning raw files.
Use it when you want your agent to quickly answer questions such as:
The normal path is simple:
mgconsole.No source code is uploaded by the ingester. It reads local files, writes graph nodes to your Memgraph instance over Bolt, and exits.
For normal use:
Runtime requirements by artifact:
| Artifact | Java required? | Node.js required for JS/TS? |
|---|---|---|
| Native executable | No | No, managed mode handles it |
| Shaded JAR | Java 25 JRE | No, managed mode handles it |
Optional tools:
mgconsole, if you want to query Memgraph directly without MCP (produces much fewer tokens)<dependency>
<groupId>io.github.ousatov-ua</groupId>
<artifactId>memgraph-ingester</artifactId>
<version>9.0.3</version>
</dependency>
The graph is useful directly, but it becomes much more powerful when your agent is told to use it. The executable can write project-scoped Memgraph instructions to the agent's local instruction file. It replaces its own previously managed block when one already exists, so rerunning the command keeps AGENTS.md, CLAUDE.md, or another instruction file tidy.
Run the command from the repo you just ingested, using the same --project value.
Code graph guidance is installed by default:
memgraph-ingester --init-instructions -P my-project
memgraph-ingester -P my-project --instructions-agent codex
Add optional Memory workflow instructions when you want agents to create and maintain durable Memgraph Memories:
memgraph-ingester --init-instructions -P my-project --with-memories
memgraph-ingester -P my-project --instructions-agent codex --with-memories
Agent presets choose the default target file:
memgraph-ingester --init-instructions -P my-project --instructions-agent codex
memgraph-ingester --init-instructions -P my-project --instructions-agent claude
memgraph-ingester --init-instructions -P my-project --instructions-agent gemini
memgraph-ingester --init-instructions -P my-project --instructions-agent github
When --instructions-agent is present, --init-instructions is optional.
Use --instructions-file to target a specific file:
memgraph-ingester -P my-project --instructions-file .github/copilot-instructions.md
The legacy helper scripts now delegate to the executable and accept the same optional flags:
MEMGRAPH_INGESTER_BIN=./memgraph-ingester-macos-arm64 script/init-memgraph-codex.sh my-project --with-memories
Commit the updated instruction file so future agent sessions get the same graph guidance.
You do not need this section to use the tool. Use the release downloads unless you want to hack on the project.
Requirements:
git clone https://github.com/ousatov-ua/memgraph-ingester.git
cd memgraph-ingester
mvn clean package -Pshade -DskipTests
Output:
target/memgraph-ingester.jar
Run it:
java -jar target/memgraph-ingester.jar --help
Native builds use GraalVM Native Image and build for the OS where Maven runs.
mvn clean package -Pnative-macos -DskipTests
mvn clean package -Pnative-linux -DskipTests
mvn clean package -Pnative-windows -DskipTests
Use the profile that matches your operating system.
The Java adapter reads .java files using JavaParser with Java 25 syntax support. It should handle most earlier Java versions as well.
Captured Java structure:
EXTENDS, IMPLEMENTS, DECLARES, DEFINES, CONTAINS, ANNOTATED_WITH, and best-effort CALLS.Use --classpath whenever you can. Without dependency JARs, the ingester still works, but external types may fall back to simple names and some call edges may be missing.
For Maven projects:
CP=$(mvn -q dependency:build-classpath -DincludeScope=test -Dmdep.outputFile=/dev/stdout 2>/dev/null)
Use -DincludeScope=test when you ingest tests or test fixtures. It includes JUnit, Testcontainers, mocking libraries, and other test-scoped dependencies.
Generated code is indexed only if you ingest it:
<ingester> \
--source target/generated-sources/annotations \
--bolt bolt://localhost:7687 \
--project my-java-project
Do not pass --wipe-project-code on the generated-source pass unless you want to replace the previous graph with generated sources only.
Use --language js, --language javascript, --language ts, or --language typescript.
Accepted source extensions:
.js.jsx.ts.tsx.mts.cts.d.ts.d.mts.d.cts.mjs.cjsOnly source files under --source are considered. Use the repository root as --source when you want root JavaScript config files or support scripts indexed alongside application source. tsconfig.json and configs from its extends chain are read for TypeScript path aliases when present, but they are not indexed as code nodes.
Skipped paths:
node_modules.Captured JS/TS structure:
- Files and synthetic module owners. - Classes and class expressions assigned to variables. - Interfaces and type aliases as graph interfaces. - Class/interface EXTENDS and class IMPLEMENTS relationships, including relative imports and tsconfig.json path aliases, including those inherited from extended configs, that resolve under --source. - Interface and object-literal type members as :Field/:Method declarations. - TypeScript enums as graph classes with isEnum = true and kind = "enum", with enum members as :Field declarations using kind = "enum-member". - Top-level functions and variables under the module owner. - Exported callable aliases and class re-export aliases as graph-visible declarations for their public export names. - Methods, constructors, function-valued class fields, fields, abstract class metadata, bodyless abstract/optional method signatures, static flags, line ranges, and kinds. - Decorators as annotations, preserving namespace-qualified decorator FQNs when possible. - Angular decorators with framework metadata when detected. - Syntax-based best-effort call edges, including top-level IIFEs/callbacks, local function constructors, and deferred resolution for resolvable relative imports. - Relative import and tsconfig.json path-alias resolution, including extended configs, prefers TypeScript source files over emitted JavaScript when both exist for the same local module path.
Runtime modes:
| Mode | Use when | Network |
|---|---|---|
managed | You want the ingester to own the parser runtime. This is the default. | Downloads once if cache is missing. |
system | You want to use node from PATH. | No Node download. TypeScript may still be managed unless already cached. |
offline | You want no downloads and the cache is already warm. | No downloads. Fails if cache is missing. |
Custom cache:
<ingester> \
--source . \
--bolt bolt://localhost:7687 \
--project my-js-project \
--language js \
--js-runtime-cache /path/to/cache \
--wipe-project-code
Custom pinned versions:
<ingester> \
--source . \
--bolt bolt://localhost:7687 \
--project my-js-project \
--language js \
--js-node-version 22.11.0 \
--js-typescript-version 5.6.3 \
--wipe-project-code
JS/TS caveat: JavaScript is dynamic. Dynamic dispatch, dependency injection, monkey-patching, framework templates, and generated code can produce missing call edges. A missing JS/TS CALLS edge does not prove a call never happens.
Exit codes:
| Code | Meaning |
|---|---|
0 | Success |
1 | Invalid arguments or runtime setup failure |
2 | One or more files failed to parse or ingest |
Options:
| Option | Short | Required | Default | Description |
|---|---|---|---|---|
--source | -s | yes | Root directory to scan. | |
--bolt | -b | yes | Memgraph Bolt URL, for example bolt://localhost:7687. | |
--project | -P | yes | Logical project name. Namespaces all graph nodes. | |
--user | -u | no | empty | Memgraph username. |
--pass | -p | no | empty | Memgraph password. |
--threads | -t | no | 1 | Parser threads. Each thread gets its own Bolt session. |
--wipe-project-code | no | false | Delete this project's code graph before ingesting. | |
--wipe-project-memories | no | false | Delete this project's memory graph before ingesting. | |
--apply-schema | no | false | Apply Memgraph constraints and indexes before ingesting. | |
--wipe-all | no | false | Delete all data from Memgraph. | |
--incremental | no | false | Skip files whose last-modified timestamp matches the graph. | |
--watch | -w | no | false | Watch the source directory and re-ingest changes. |
--classpath | no | empty | Platform-separated JAR paths for Java symbol resolution. | |
--language | no | java | java, js, javascript, ts, or typescript. | |
--js-runtime-mode | no | managed | managed, system, or offline. | |
--js-runtime-cache | no | ~/.cache/memgraph-ingester | Cache directory for managed Node.js and TypeScript downloads. | |
--js-node-version | no | 22.11.0 | Pinned Node.js version for managed JS/TS parsing. | |
--js-typescript-version | no | 5.6.3 | Pinned TypeScript compiler package version. A leading v is accepted. | |
--check-js-runtime | no | false | Run a local JS runtime smoke check without connecting to Memgraph. | |
--init-instructions | no | false | Write or replace managed agent instructions and exit. Includes Code guidance by default. | |
--instructions-agent | no | codex | Agent preset: codex, claude, gemini, github, or copilot. Implies --init-instructions when explicitly provided. | |
--instructions-file | no | preset file | Instruction file to update. Overrides --instructions-agent and implies --init-instructions. | |
--with-memories | no | false | Include optional Memory workflow instructions when initializing agents. | |
--help | no | Print CLI help. | ||
--version | no | Print CLI version. |
Parallel ingestion:
| Threads | Typical speedup | Bottleneck |
|---|---|---|
1 | 1x | Sequential parse and write |
4 | about 2.5x to 3x | Write serialization starts |
8 | about 3x to 4x | Diminishing returns |
16+ | about 3x to 4x | Writes saturated |
Use 4 to 8 threads for large projects on most machines. Values higher than your CPU core count rarely help.
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:memgraph-ingester 的核心功能完整,质量良好。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | memgraph-ingester |
| 原始描述 | 开源AI工作流:Ingester of Java structure in Memgraph. Speed up your AI agent!。⭐6 · Java |
| Topics | workflowaiai-agentai-agentsclaude-codecodexjava |
| GitHub | https://github.com/ousatov-ua/memgraph-ingester |
| License | MIT |
| 语言 | Java |
收录时间:2026-05-22 · 更新时间:2026-05-22 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端