Skip to main content

Canonical LLM-facing URI process runtime — spec, executor, CI gates

Project description

urirun-llm-runtime

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

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

urirun_llm_runtime-0.2.1.tar.gz (15.3 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.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for urirun_llm_runtime-0.2.1.tar.gz
Algorithm Hash digest
SHA256 60a5fc1f078ea27fde749409636d4e9d734d6343e785a57721081ec2c363965a
MD5 e56e0d4111043f30b7897d48ea6a0adc
BLAKE2b-256 411956220aa56cdbde1b1fb7014d803c5df914ec5f8225dc04fa606441e701d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for urirun_llm_runtime-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 484b5fe121f24e6b26d0a39e357938ef35bcaadcbd6dd7ddc93ef15529f58463
MD5 164ab0c2814dec0ac96d96ba9d9421b2
BLAKE2b-256 9b018eb9aa5391b7392d2dd0623c6cbf62883874dd6435f95ed63621874babe0

See more details on using hashes here.

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