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

Download files

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

Source Distribution

cimhub_chat-0.1.0a0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

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

cimhub_chat-0.1.0a0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file cimhub_chat-0.1.0a0.tar.gz.

File metadata

  • Download URL: cimhub_chat-0.1.0a0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cimhub_chat-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 4b7e439d14654ab6516f2a7c2a483fdf71732cd7ff66a33f011527b76d122c27
MD5 68f518890b296fb47fc7c379a03d98fe
BLAKE2b-256 885541ee5c904dde20a6a24c6820c38b189e18df900a0ebb655cf479f5b3c679

See more details on using hashes here.

Provenance

The following attestation bundles were made for cimhub_chat-0.1.0a0.tar.gz:

Publisher: publish-cimhub-chat.yml on PNNL-CIM-Tools/CIMHub

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

File details

Details for the file cimhub_chat-0.1.0a0-py3-none-any.whl.

File metadata

  • Download URL: cimhub_chat-0.1.0a0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cimhub_chat-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 91ea94e6afdb6bda554dfc480649373a00a0ab848c63d5976b370113e8c72b96
MD5 074f71edf455650b0bce67c58fe95933
BLAKE2b-256 ac347ace8727c3049d48841e355ee2dc94ca7e83519dcf1121de7b24f0c267e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cimhub_chat-0.1.0a0-py3-none-any.whl:

Publisher: publish-cimhub-chat.yml on PNNL-CIM-Tools/CIMHub

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 Sentry Error logging StatusPage Status page