Skip to main content

urirun-llm-runtime

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • 🤖 LLM usage: $0.3615 (32 commits)
  • 👤 Human dev: ~$1426 (14.3h @ $100/h, 30min dedup)

Generated on 2026-07-19 using openrouter/qwen/qwen3-coder-next


Canonical LLM-facing project for the if-uri URI process execution runtime.

Repo: https://github.com/if-uri/urirun-llm-runtime

LLM clients should load this repository (or its raw docs) as project context so generated code uses POST /run with URI processes — never raw subprocess / GUI hacks.

What this repo contains

Path Purpose
docs/llm/first_system_prompt.md Assembled system prompt (topology + routes + contract)
docs/llm/runtime_semantics.md How POST /run works
docs/llm/process_schema.json JSON Schema for urirun:processes blocks
docs/openapi.yaml Transport API contract
urirun_llm_runtime/ Python executor, process runner, validators
runtime/docker-compose.yml Real if-uri node (requires if-uri clone)
docker/ Lightweight mock node for offline CI
.github/workflows/ci.yml Blocking gates — merge fails if any gate fails

LLM consumption (raw URLs)

https://raw.githubusercontent.com/if-uri/urirun-llm-runtime/main/docs/llm/first_system_prompt.md
https://raw.githubusercontent.com/if-uri/urirun-llm-runtime/main/docs/llm/runtime_semantics.md
https://raw.githubusercontent.com/if-uri/urirun-llm-runtime/main/docs/llm/route_catalog.yaml
https://raw.githubusercontent.com/if-uri/urirun-llm-runtime/main/docs/openapi.yaml

Or in Python:

from urirun_llm_runtime import build_first_system_prompt, docs_index
print(build_first_system_prompt())
print(docs_index())

LLM output format

```urirun:processes
[
  {
    "id": "step-1",
    "name": "Diagnose KVM",
    "actor": "script",
    "uri": "kvm://host/doctor/query/report",
    "payload": {},
    "depends_on": []
  }
]
```

Glue code (allowed)

from urirun_llm_runtime import Executor

def run(ctx=None):
    return Executor("http://host-node:8765").execute("kvm://host/env/query/profile")

CLI

Installing the package provides a urirun-llm command (also python -m urirun_llm_runtime):

urirun-llm health                               # GET {node}/health
urirun-llm routes                               # GET {node}/routes
urirun-llm execute kvm://host/env/query/profile # POST {node}/run for one URI
urirun-llm run plan.json                         # execute a urirun:processes plan (file or -)
urirun-llm validate plan.json                    # parse + validate a plan, no execution
urirun-llm lint examples/glue                    # anti-subprocess CI gate over glue
urirun-llm prompt --ticket "check domains"       # print the first LLM system prompt

The node URL comes from --node or $URIRUN_NODE_URL (default http://localhost:8765). execute/run default to --mode execute; pass --mode dry-run to preview.

Local development

pip install -e ".[dev]"
python scripts/assemble_llm_prompt.py
pytest -q
python scripts/validate_examples.py
python scripts/validate_processes.py

Mock runtime (no if-uri)

docker compose up -d --build urirun-mock
curl -sf http://127.0.0.1:8765/health

Real runtime (if-uri monorepo)

git clone https://github.com/if-uri/if-uri ../if-uri   # sibling of this repo
echo "IF_URI_ROOT=../if-uri" > runtime/.env
docker compose -f runtime/docker-compose.yml up -d host-node
docker compose -f runtime/docker-compose.yml --profile smoke run --rm uri-smoke

CI gates (blocking)

  1. unit-and-gates — pytest, glue lint, process JSON schema, prompt artifact
  2. mock-runtime-smokePOST /run on mock node
  3. if-uri-runtime-smoke — builds real if-uri host-node, runs URI smoke + live Executor

All three must pass on main.

Related

License

Licensed under Apache-2.0.

Download files

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

Source Distribution

urirun_llm_runtime-0.2.3.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

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

urirun_llm_runtime-0.2.3-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file urirun_llm_runtime-0.2.3.tar.gz.

File metadata

  • Download URL: urirun_llm_runtime-0.2.3.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for urirun_llm_runtime-0.2.3.tar.gz
Algorithm Hash digest
SHA256 214bbe3ae59d4b8c3c9a3ce68a5f6f55440d73e4ac684e3d4c4e86b642bb049a
MD5 8444f75d0f3f2ddad11028940ef67521
BLAKE2b-256 a0369789251373f8c2010a237711b60cb7d8d87d1f6993d12c0d4de380cf67fa

See more details on using hashes here.

File details

Details for the file urirun_llm_runtime-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for urirun_llm_runtime-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fd6c34e80d76b737285e0f78b0e84e2cb514be7bc3407b0f519d4241e1166c67
MD5 41522d40218e7ca0afc5bf80f133990f
BLAKE2b-256 403f0a4bbc136f405736abc3aa3efee4fc133d06aa1b5be8c58332808e4366f0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 files

0.2.1

2 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