Skip to main content

LLMing Com

Python 3.14+ MIT PyPI ruff

Where JavaScript, Python, and AI agents speak the same language.

Real-time JS ↔ Python commands, AI-debuggable sessions, and MCP control — out of the box.


LLMing-Com connects JavaScript frontends to Python backends over WebSockets with structured commands, session management, cookie-based authentication, and a debug API that AI agents can use to inspect and control running applications.

Why?

  • WS-first UI traffic -- SessionRouter and AppRouter give you FastAPI-style namespaced dispatch for WebSocket JSON messages. One socket carries every UI command and query.
  • AI controls and debugs your app -- The debug API and @command decorator expose a parallel HTTP/MCP surface for AI agents and tooling, separate from the UI socket.
  • One decorator, one debug command -- Define a debug/admin command once with @command; get an HTTP endpoint, JSON schema, and MCP tool for free.
  • Sessions just work -- Type-safe registry with TTL cleanup, WebSocket lifecycle management, and connection superseding built in.

Transport Policy

Two surfaces, two router types -- pick by audience, not by preference:

Audience Transport Router Used for
UI / app frontend WebSocket SessionRouter Per-user command and query traffic between the live frontend and backend
UI / app frontend WebSocket AppRouter App-wide commands with a typed app context
AI agents, MCP clients, ops tools HTTP build_command_router / build_debug_router Debug/admin surface: session inspection, ws_send forwarding, @command-decorated debug actions
Anyone HTTP (your own FastAPI routes) Large or static content only -- file uploads, blob downloads, asset serving

Do not add HTTP routes for UI commands -- those belong on SessionRouter or AppRouter. Do not push large blobs through the WS message pipe -- those belong on plain HTTP endpoints. The @command framework is for the debug/admin surface; it is not a UI command system.

Features

  • HMAC-SHA256 cookie authentication (session + identity tokens with expiry)
  • Generic session registry with singleton pattern and TTL cleanup
  • One central LlmingSession type with typed, lazily-created session data attachments
  • WebSocket transport with connection superseding and rate limiting
  • SessionRouter / AppRouter -- typed namespaced dispatch for WS messages, nestable via include(), auto-replies with _req_id matching
  • JavaScript client with auto-reconnect, heartbeat, and session-loss detection (framework-agnostic)
  • Declarative @command framework for the debug/admin surface, with auto-generated REST + MCP endpoints
  • Debug API with IP whitelisting, audit logging, and trusted proxy support
  • Thread-safe in-memory data store with namespace isolation
  • Mock auth system for headless and E2E testing
  • MCP server (HTTP/SSE + stdio) for AI agent integration

Usage

Runnable examples live in samples/:

  • basic_session.py — central sessions and typed data attachments
  • auth_demo.py — HMAC tokens, identity tokens, tamper detection
  • websocket_server.py — FastAPI WebSocket app with debug router
  • demo_app.py — full interactive demo with the @command framework and the JavaScript client

Run any sample with LLMING_AUTH_SECRET=demo PYTHONPATH=. python samples/<name>.py.

Project Structure

llming_com/           Core library (auth, session, transport, commands, debug, data store)
llming_com/static/    JavaScript client (LlmingWebSocket)
tests/                Pytest suite
samples/              Example applications (run with: LLMING_AUTH_SECRET=demo python samples/demo_app.py)
docs/                 Documentation and assets

Development

git clone https://github.com/Alyxion/llming-com.git
cd llming-com
poetry install
LLMING_AUTH_SECRET=dev-secret pytest tests/ -q

License

MIT -- Copyright 2026 Michael Ikemann

Metadata

Release files for llming-com 0.1.7

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

Source distribution (sdist)

Source distribution for llming-com 0.1.7
File Size Uploaded Provenance
llming_com-0.1.7.tar.gz 38.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llming-com 0.1.7
File Interpreter ABI Platform
llming_com-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 84.6 kB

Release files / llming_com-0.1.7.tar.gz

Download URL llming_com-0.1.7.tar.gz
Size 38.1 kB
Tags Source
SHA-256 checksum
How to use checksums
657287902ea4a7f7e52b659a0a283949f53dcfd9c134b991329dbbc1d239514a
BLAKE2b-256 checksum
How to use checksums
38308be3eb78045253f6f43c606e38cebce3e24bd34a067180ec91c1f5310ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.13.11 Darwin/25.2.0

Release files / llming_com-0.1.7-py3-none-any.whl

Download URL llming_com-0.1.7-py3-none-any.whl
Size 46.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da127690d5f75b59727a6ba2ade3507085fe7f2a7b3520a51674a3dbb1ef3f76
BLAKE2b-256 checksum
How to use checksums
946afec62426b4fc3d4ba0b7bd6c3051e1b5dbaec2db943fd402f543170d2828
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.13.11 Darwin/25.2.0

Security for llming-com 0.1.7

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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