ifURI examples

ifURI examples

Runnable examples for urirun and ifURI-style URI workflows — from a JSON binding to multi-computer Docker flows.

0101-json — binding documentA minimal urirun binding document: URI routes with JSON Schema inputs and0202-decorators — Python decorator bindingsexample.py uses the public @urirun.command decorator to generate URI0303-artifacts — scan project artifactsShows the urirun scanner turning existing artifacts into URI bindings:0404-python — Python adapter tests & examplesUnit tests for the urirun Python runtime: v2 schema-first runtime05v2 binding generatorsThese examples show the same v2 binding contract generated from several06HTML URI app v2Schema-first HTML app for urirun.v2.07Transports & layersOne registry, many transports. The URI + registry + JSON Schema + policy gate are08Multi-transport integration (HTTP + gRPC) in DockerThis stack connects **all networked layers at once** and answers two questions:09Docker URI flowThis example demonstrates URI-addressed resources communicating across Docker10device_mesh_labLocal URI mesh demo with a dashboard, two device agents and URI-addressed flows.1111-novnc_lan_flow - noVNC computers controlled by URI flowDocker demo where URI commands control real Chromium browsers running inside1111 · tellmesh packs as a URI flowAdopt existing **tellmesh capability packs** as URIs with no code change, then run a1212 - full E2E connect labThis lab verifies the complete user path:1313 - simple defaultsThis example shows the ergonomic target for connector authors:1414 — LLM-over-URI agent (drive Chrome + tools by URI)An LLM-style **decision loop over a URI registry**: compile connectors into one1515 — declarative HTTP/REST connectors (config, not code)Author a whole connector from a **TOML/JSON spec** — no Python. The runtime1515 — Self-correcting YAML flow (NL → LLM → execute → repair)An LLM turns a natural-language goal into a **urirun flow as YAML**, the loop1616 — secrets by reference (`secret://` / `getv://`)Credentials addressed by **reference, never value**. A URI/binding carries1717 — flows: usage scenarios in txt, bash and YAMLA **flow** is an ordered list of URI steps (query reads, command mutates),1818 — connect a connector to any runtime over any transportEvery urirun-connector-* has the same shape: it emits **urirun_bindings()** (a v21818 · OpenAPI → URI routes, secured by referenceTwo urirun 0.4 features in one runnable flow: turn an existing REST API into1919 — check every connector through one contract (4 languages)Every urirun-connector-* — whatever language it's written in — exposes the same1919 · uri_tree — connectors as a YAML URI treeInstall a set of connectors with one line, then view their URIs as a **tree**2020 — the thesis: urirun between any-language runtime and any transportThe claim: **urirun is the layer that sits between the runtime (connectors, in any2121 — generate transport/runtime artifacts FROM a binding spec> **Now first-class:** this generator graduated into urirun core as2222 — warm-worker pool (amortize the cold start)local-function-subprocess runs each URI as a fresh OS process. For an2323 — embedded URIRUN layerEvery other example installs a **connector** to add routes. This one shows the2323 — self-repairing LLM flow over `llm://`Talk to an LLM through the llm:// connector (you pick the **model** and the2424 — adopt urirun into an existing stackYou already have a project: real services, real functions, several languages and2424 — adopt tellmesh libraries into URI (reuse, don't rewrite)The sibling ../tellmesh monorepo is ~50 Python libraries that already speak URI2525 — a multi-step URI flow across tellmesh packs (executed, not just resolved)Example 24 adopted ~20 tellmesh libraries into one URI registry. This one shows the2626 — an agent composes a URI flow from the action spaceExample 25 ran a fixed kvm → ocr → llm chain. Here an **agent decides the chain**:2727 — a real LLM agent drives a computer-control task over tellmesh URIsExample 26 used a heuristic planner. This one plugs in a **real LLM** (OpenRouter via2828 — an LLM drives a real noVNC desktop from a natural-language intentYou write an intent in plain language; an LLM is given the **typed schema of every2929 — the desktop as MCP tools: an LLM drives it with native tool-callingExample 28 used a custom (goal, space) -> steps planner. This one removes the planner3030 — control one computer from another, without RDP (urirun mesh)RDP gives a remote operator the *whole* machine. urirun gives the controller only the3131 — drive a remote computer's office work from natural language (LLM → URI → mesh)You type an office task in plain language on your **host**; an **LLM** (liteLLM, config3232 — drive a NAT'd node from natural language, through the relayThe capstone of the mesh story: a host turns **natural language** into a URI flow3232 — YAML task scenarios + a live event stream from the nodeThree things in one example:3333 — office automation from natural language (MCP tools → URI flow → verify)A user asks for an **office task in plain language**; a planner turns it into a3434 — install AND use every connector, driven by YAML flowsTwo ready [urirun flows](flows/) that together exercise the whole connector set:3535 — deploy a browser/office/tools surface onto a remote node (no SSH)Push a **self-contained, multi-scheme surface** onto a running urirun node over3636 — control a remote browser over CDP (no xdotool/ydotool, Wayland-safe)Drive a node's **real browser** from the host over the URI contract, using the3737 — closed-loop task automation (NL → YAML flow → execute → repair)Three **closed-loop** automation patterns against a urirun node, all over the URI3838 — self-managing urirun (resolver + loop + governance)> What's missing so urirun is not only **LLM-controlled** but **LLM-managed** — it3939 — autonomous READ-ONLY browser observation (gillm + LLM vision over URIs)Capture a node's **real screen** and let an LLM tell you what's on it — fully3939 — controlled social autonomy with a LinkedIn-shaped siteThis example is the development version of "full autonomy on a social site":4040 — local portals suite for autonomous browser testingThis example adds several local-only portals for testing autonomous browser work:4040 — create a WordPress article over a URI (REST API, Application Password)Create an article on **your own** WordPress blog as a URI route — the proper4141 — invoice audit flowInvoice audit and filesystem cleanup over a urirun node.4242 — host compute for node OCRUse the stronger host/NVIDIA machine for OCR while the documents stay on a4343 - camera + USB + OCR inspection loopThis example shows the URI shape for a physical scan station:44Chat Prompt SweepRuns a corpus of 100 natural-language prompts through the dashboard chat API.4444 — assisted KSeF token capture via the browser (Lenovo)Ease KSeF authorization: instead of hand-copying a token out of the **Aplikacja Podatnika4444 - phone WebRTC scanner through the urirun dashboardUse a phone camera as a better receipt/invoice scanner while the host dashboard4545 — send a KSeF FA(2) invoice (plan-ready)The last leg of the office pipeline: take the **FA(2) XML** (built in example 43 from a4646 — connect anything through URI adoptionThis example shows the intended first step for reusing an existing application,47Example 47 — Android Nexus 7 as a urirun nodeControl a Nexus 7 tablet (or any Android device) from urirun using:4747 — NL → ui:// plan → execute (autonomous desktop control)Turn a natural-language desktop task into a sequence of kvm://.../ui/* (+ browser/app)4848 - API and device nodesThis example shows how to register external APIs and multi-interface devices as4949-linkedin-compose-cdp5050 — contract-guarded flow**Reuse a urirun connector in a new flow, guarded by its contract.**5151 — router-guarded autonomy**The autonomy safety stack: DECIDE → ROUTE → EXECUTE → GUARD.**5252 — office work on a virtual machine over RDP, surfaced through noVNCA user asks for an **office task on a remote VM in plain language**; a planner turns

Run them locally

git clone https://github.com/if-uri/examples.git
cd examples
make test