Skip to main content

Graph-first intermediate language for auditable LLM-generated graph queries and updates

Project description

CogLang

CogLang is a graph-first intermediate language for LLM-generated graph queries and updates, with auditable execution under explicit host contracts.

Status:

  • stable v1.1.0 language core
  • reference implementation
  • active experimental maintenance for host/runtime ecosystem work
  • host bridge v0.2 frozen only for the narrow typed write-envelope surface

Current public language release: v1.1.0. The current Python distribution version is 1.1.4. The Host Runtime Contract v0.2 frozen scope is the narrow typed write-envelope surface demonstrated by coglang host-demo and coglang reference-host-demo. A minimal Node.js standard-library consumer is also included at examples/node_host_consumer to show non-Python tooling can read the HRC schema pack and envelope samples without importing the Python runtime. An experimental in-repository Node.js minimal host/runtime stub is included at examples/node_minimal_host_runtime_stub; it is post-freeze example evidence, not an expansion of HRC v0.2.

LLM Discovery Snapshot

When to use CogLang:

  • You want an LLM to generate graph operations that can be inspected before execution.
  • You need errors to stay explicit values instead of becoming hidden control-flow failures.
  • You need replayable traces for what an agent intended, submitted, and actually executed.
  • You want host-side profile and capability checks before execution.
  • You need a versioned host-runtime boundary for typed write-envelope submission and response evidence.

When not to use CogLang:

  • You need a general-purpose programming language.
  • You want a schema definition language.
  • You simply need the native query language of a specific graph database in its native setting.

Short runnable examples:

coglang execute 'Query[n_, Equal[Get[n_, "category"], "Person"]]'
coglang execute 'IfFound[Traverse["einstein", "born_in"], x_, x_, "unknown"]'
coglang preflight --format text 'AllNodes[]'
coglang generation-eval --summary-only
coglang demo
node examples/node_host_consumer/consume_hrc_envelopes.mjs
node examples/node_minimal_host_runtime_stub/run_demo.mjs

Machine-readable project summaries:

Language Policy

CogLang's public documentation target is English-first.

New public-facing documentation should be written in English first. Chinese translations may be added as separate companion files, preferably with a .zh-CN.md suffix. If an English document and a translation disagree, the English document, executable conformance suite, and implementation tests take precedence.

30-Second Reading Guide

Use this table when you do not know which document to open first:

You are... Read first Then read
Trying CogLang as a user CogLang_Quickstart_v1_1_0.md coglang demo, then CogLang_Release_Notes_v1_1_4.md
Checking install or release health CogLang_Standalone_Install_and_Release_Guide_v0_1.md coglang release-check, then CogLang_Minimal_CI_Baseline_v0_1.json
Implementing a host boundary CogLang_HRC_v0_2_Final_Freeze_2026_04_28.md CogLang_HRC_Companion_Asset_Classification_v0_1.md, then examples/node_host_consumer
Contributing changes CogLang_Contribution_Guide_v0_1.md ROADMAP.md, then the focused governance note for the subsystem you touch
Reviewing future work ROADMAP.md v1.2 and readable-render notes only when that subsystem is in scope

First Reading Path

If this is your first time reading CogLang, start with the stable user and implementation path:

  1. CogLang_Quickstart_v1_1_0.md Build the first mental model, learn the most common expression patterns, and avoid early footguns.
  2. CogLang_Specification_v1_1_0_Draft.md Read the language boundary, representation model, and core operator semantics.
  3. CogLang_Profiles_and_Capabilities_v1_1_0.md Understand Baseline, Enhanced, profile availability, and capability boundaries.
  4. CogLang_Conformance_Suite_v1_1_0.md Check executable examples and regression boundaries.
  5. CogLang_Standalone_Install_and_Release_Guide_v0_1.md Use this when you need standalone install, local validation, or release-facing checks.
  6. CogLang_HRC_v0_2_Final_Freeze_2026_04_28.md Check the frozen typed write-envelope host-runtime scope and executable evidence.

Planning and governance notes are indexed below. They are useful for reviews, but they are not required first-pass reading.

If you only have 10 minutes:

  1. Run coglang demo.
  2. Read the Quickstart.
  3. Skim the release notes to understand what is promised and what is not.

Install And Verify

From the stable release artifact:

pip install coglang
coglang info
coglang release-check
coglang preflight --format text 'AllNodes[]'
coglang generation-eval --summary-only
coglang execute 'Equal[1, 1]'

For packaged smoke and conformance checks, install the development extra so pytest is available:

pip install "coglang[dev]"
coglang smoke
coglang conformance smoke

From a checkout for development:

pip install -e ".[dev]"
coglang bundle
coglang preflight --format text 'AllNodes[]'
coglang generation-eval --summary-only
coglang smoke
coglang demo
coglang conformance --level smoke

The public CLI entry point is coglang.

The current minimal public command surface includes:

  • parse
  • canonicalize
  • validate
  • preflight
  • preflight-fixture
  • execute
  • conformance
  • repl
  • info
  • manifest
  • bundle
  • doctor
  • vocab
  • examples
  • generation-eval
  • smoke
  • demo
  • host-demo
  • reference-host-demo
  • release-check

If help output includes additional reference commands, they do not automatically become part of the stable public surface.

What To Learn First

Start with four boundaries:

  • canonical text is the stable language form; readable render is only a display layer.
  • Create, Update, and Delete express language-level write intent; durable submission is a host responsibility.
  • Reserved does not mean production-ready by default.
  • Explicitly qualified extension operators are not yet the first teaching surface for everyday users.

Public Documentation Set

Stable core documents:

Governance and future-work notes:

Integration and release-facing documents:

Chinese companion translations:

Machine-readable and release-supporting files:

Contribution Direction

The highest-value contributions are currently:

  • conformance examples that pin down existing semantics
  • documentation fixes that improve the first-run experience
  • host integration examples that keep language semantics separate from host policy
  • minimal executor examples that implement execute and validate without copying Python host-local helpers
  • minimal non-Python host/runtime stubs that consume existing typed write envelopes without expanding HRC scope
  • small CLI or packaging improvements that improve repeatable validation

For local test development, install the development extras:

pip install -e ".[dev]"
python -m pytest

Lower-priority contributions:

  • expanding the language surface before current contracts are fully tested
  • adding host-specific policy into the core language specification
  • turning the project positioning into competitive claims without reproducible public evidence

Current Direction

Use the project documents this way:

The roadmap is intentionally not a release contract and does not promise dates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coglang-1.1.4.tar.gz (349.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coglang-1.1.4-py3-none-any.whl (411.9 kB view details)

Uploaded Python 3

File details

Details for the file coglang-1.1.4.tar.gz.

File metadata

  • Download URL: coglang-1.1.4.tar.gz
  • Upload date:
  • Size: 349.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for coglang-1.1.4.tar.gz
Algorithm Hash digest
SHA256 c8bdeb3c2b4b56df6273e17c367a0e46b8ff2fd684e1c58b80f373cd9dc387ec
MD5 835860e190f290c4042a6ea78fb9ed70
BLAKE2b-256 cb83c89730dfb6ab6257485d1f7adec5be4764e6393b071b6a23d2ff941df7c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for coglang-1.1.4.tar.gz:

Publisher: publish.yml on jaysinailabs/coglang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coglang-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: coglang-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 411.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for coglang-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 68a990bb10aa3560cd11db298bcce5bb49ee4ae6d6f03d45a84325a9fa5fd60f
MD5 431ebb9e03b65c7f7aff1d4fb294287d
BLAKE2b-256 de83af24dfc5af77a8b87069936ed036cefb439811a59b47f5622266a953bf5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for coglang-1.1.4-py3-none-any.whl:

Publisher: publish.yml on jaysinailabs/coglang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page