Skip to content
Built by Postindustria. We help teams build agentic production systems.

Pipeline Validation (neograph check)

neograph check validates your pipelines without executing them. It discovers every Construct in a Python file (or importable module), runs compile() and lint() on each one, and reports problems.

Terminal window
neograph check my_pipeline.py

Output:

OK ingestion (pipeline)
FAIL analysis (analysis_pipeline)
compile: Node 'score' in construct 'analysis' declares input=RawText but no upstream produces a compatible value.
2 construct(s) checked, 1 passed, 1 failed.

The command accepts a file path or a dotted module name:

Terminal window
neograph check my_pipeline.py
neograph check my_package.pipelines

lint() checks that FromInput and FromConfig DI bindings resolve against a config dict. Without a config, only structural checks run. Two flags supply one:

Terminal window
neograph check my_pipeline.py --config '{"node_id": "test", "project_root": "/tmp"}'

For configs that contain non-serializable objects (rate limiters, database pools), point --setup at a Python file that exports a get_check_config() function:

check_config.py
from my_app.resources import make_limiter
def get_check_config():
return {
"node_id": "test",
"project_root": "/tmp",
"rate_limiter": make_limiter(),
}
Terminal window
neograph check my_pipeline.py --setup check_config.py
CodeMeaning
0All constructs compiled and linted cleanly
1One or more constructs failed compilation or lint
2Usage error (file not found, invalid JSON, missing get_check_config)

Add a check step to your CI pipeline. The non-zero exit code fails the build on any validation error:

.github/workflows/check.yml
name: Pipeline Validation
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: uv sync
- run: uv run neograph check src/my_pipeline.py --config '{"node_id": "test"}'

For each Construct found in the target module:

  1. compile() — builds the LangGraph StateGraph, catching type mismatches, missing upstreams, invalid modifiers, and cycle errors.
  2. lint() — walks every node and checks that DI parameters (FromInput, FromConfig, bundled models) have matching keys in the provided config. See Static Linting for details.

Both checks are assembly-time only — no LLM calls, no side effects.


Documentation © 2025-2026 Constantine Mirin, mirin.pro. Licensed under CC BY-ND 4.0.