Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

cimhub_chat

Natural language chat interface for CIMHub power system models. Load any CIMHub-supported model (DSS, GLM, RAW, MATPOWER, CIM XML) and query or edit it in plain English.

Features

  • Query — "How many loads are on bus 634?" / "What is the total MW?"
  • Edit — "Change load L1 to 500 kW" / "Add a new line from 632 to 645"
  • Cross-format awareness — "Show me the DSS command for this EnergyConsumer"
  • Write-back — Saves edits to native format files or CIM XML
  • Schema-aware — Introspects LinkML-generated dataclasses at runtime so the LLM knows valid field names, types, and relationships without hard-coded prompts

Usage

# Start the chat CLI with a DSS model
cimhub-chat ieee13/Master.dss

# Start with a PSS/E RAW model
cimhub-chat network.raw

# Start with a CIM XML file
cimhub-chat ieee13.xml --cim-profile cimhub_2026

Or from Python:

from cimhub_chat.cli import start_chat

start_chat("ieee13/Master.dss")

Architecture

CLI / REPL
    ↓
ModelService   (loads + manages the active CIM model)
    ↓
Agent          (LLM-backed reasoning loop via LangGraph)
    ↓
MCP Server     (exposes CIM graph as tools via Model Context Protocol)
    ↓
CIMHub converters  (cimhub_opendss, cimhub_raw, cimhub_gridlabd, ...)

The MCP server (mcp_server/) provides typed tools (list_buses, get_load, set_load_power, etc.) backed by runtime introspection of the loaded model's LinkML schema. The agent calls these tools rather than generating raw Python.

Supported LLMs

Configured via environment variables or --model flag:

Provider Models
Anthropic claude-sonnet-5, claude-opus-4-8
OpenAI gpt-4o, gpt-4-turbo
Ollama any locally-served model

Running Tests

uv run pytest cimhub_chat/tests/ -v

Metadata

Release files for cimhub-chat 0.1.0a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cimhub-chat 0.1.0a0
File Size Uploaded
cimhub_chat-0.1.0a0.tar.gz 18.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cimhub-chat 0.1.0a0
File Interpreter ABI Platform
cimhub_chat-0.1.0a0-py3-none-any.whl Python 3 none any Details

Total release size: 36.4 kB

Release files / cimhub_chat-0.1.0a0.tar.gz

Download URL cimhub_chat-0.1.0a0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4b7e439d14654ab6516f2a7c2a483fdf71732cd7ff66a33f011527b76d122c27
BLAKE2b-256 checksum
How to use checksums
885541ee5c904dde20a6a24c6820c38b189e18df900a0ebb655cf479f5b3c679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.

Transparency log

Release files / cimhub_chat-0.1.0a0-py3-none-any.whl

Download URL cimhub_chat-0.1.0a0-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91ea94e6afdb6bda554dfc480649373a00a0ab848c63d5976b370113e8c72b96
BLAKE2b-256 checksum
How to use checksums
ac347ace8727c3049d48841e355ee2dc94ca7e83519dcf1121de7b24f0c267e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page