All authors

Claude Skills by iii-hq
github.com/iii-hq448 skills0 installs567 views
- Build An Agent<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/build-an-agent/orchestration-loop.mdx. -->Votes: 0GitHub stars: 18,821
- Build An AgentThis tutorial walks through building an agent in iii in three pieces: the functions the agent calls as tools, the loop that drives its think-act-observe cycle, and the memory it carries between turns. By the end you'll have a working agent worker you can extend with your own tools.Votes: 0GitHub stars: 18,821
- Incremental Adoption<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/incremental-adoption/migrate-persistence.mdx. -->Votes: 0GitHub stars: 18,821
- Incremental Adoption<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/incremental-adoption/offload-to-queue.mdx. -->Votes: 0GitHub stars: 18,821
- Incremental Adoption<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/incremental-adoption/overview.mdx. -->Votes: 0GitHub stars: 18,821
- Incremental Adoption<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/incremental-adoption/wrap-existing-api.mdx. -->Votes: 0GitHub stars: 18,821
- LinklyWhere a stream is for a live trickle of events, a **channel** is for **moving a large amount of data at once**: a direct streaming pipe between two endpoints, rather than one request and response. Channels are bidirectional (each end has both a reader and a writer), but here you'll stream in one direction, uploading a CSV of links. You'll give this its own `bulk-importer` worker so the `link` worker stays focused on single links.Votes: 0GitHub stars: 18,821
- Linkly- name: iii-queue config: queue_configs: clicks: type: standard max_retries: 5 concurrency: 5 adapter: name: builtin ``` <Note> Queue names are references to the queue and do not place any restrictions on what can be put into a given queue. </Note> You already wrote `link::record_click` in Chapter 3, where `http::redirect` triggers it directly. Nothing about that function needs to change to make it queuable. You only change how it's triggered with a `TriggerAction`. **First import `TriggerAct...Votes: 0GitHub stars: 18,821
- Linkly- name: iii-state config: adapter: name: kv config: store_method: in_memory ``` Since we're using an in-memory store every restart will clear the data we're storing. That's fine here; [Ch. 3: Persist everything](/tutorials/linkly/persistence) swaps in durable storage. You may also notice a iii.lock file: that's how iii tracks worker dependencies and versions so that iii deployments are repeatable. This is similar to lock files in other package managers. For now you don't need to edit anything...Votes: 0GitHub stars: 18,821
- Linkly- name: iii-worker-manager config: port: 49134 - name: iii-worker-manager config: host: 127.0.0.1 port: 3110 rbac: auth_function_id: auth::browser expose_functions: - match("link::create") - match("link::request_delete") - match("stream::*") ``` `expose_functions` is an allowlist of which functions a browser session can call. `auth_function_id` names a function `iii-worker-manager` invokes on every connection to admit or reject it; you write that next.Votes: 0GitHub stars: 18,821
- LinklyObservability in iii isn't something you bolt onto each service. Every cross-worker call already flows through the engine, so the engine can trace and log the whole system end to end. In this chapter you open the console to see that, then, if you want, read the same data directly from the engine.Votes: 0GitHub stars: 18,821
- LinklyThis tutorial builds **Linkly**, a link shortener, one worker at a time. You start with a single function that turns `/s/abc` into a redirect, and finish with a multi-tenant link platform that has durable execution, storage, analytics, a live click stream, bulk imports, and a browser worker on the same bus. Each chapter adds one capability by adding a worker to your existing system. The point is not the link shortener itself, but the pattern: a real system on iii is a set of small workers tha...Votes: 0GitHub stars: 18,821
- Linkly- name: database config: databases: primary: pool: acquire_timeout_ms: 5000 idle_timeout_ms: 30000 max: 10 url: sqlite:./data/iii.db ``` The worker will be in charge of defining its own schema. We'll build up the necessary changes to `link/src/index.ts` in pieces. First add the `DB` constant **near the top of `link/src/index.ts`**: ```typescript {4} src/index.ts import { registerWorker } from "iii-sdk"; import { Logger } from "@iii-dev/helpers/observability"; const DB = "primary"; // Matches ...Votes: 0GitHub stars: 18,821
- Linkly`iii-stream` is for **real-time data transmission**: pushing data to a client the moment it changes, like a live feed of clicks for a dashboard. A stream is bidirectional (subscribers can send messages back as well as receive them), but here you only need to broadcast clicks outward. You'll move the live-broadcast concern into its own `click-streamer` worker so the `link` worker stays focused on links.Votes: 0GitHub stars: 18,821
- Reactive Crud<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/reactive-crud/crud-endpoints.mdx. -->Votes: 0GitHub stars: 18,821
- Reactive Crud<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/reactive-crud/model-and-store.mdx. -->Votes: 0GitHub stars: 18,821
- Reactive CrudThis tutorial builds a real-time CRUD service with iii. You'll model your data on the iii state store, expose create/read/update/delete operations over HTTP triggers, and stream live changes to connected clients. By the end you'll have a service that streams state changes to clients in real time without writing pub/sub code.Votes: 0GitHub stars: 18,821
- Reactive Crud<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/reactive-crud/realtime-subscriptions.mdx. -->Votes: 0GitHub stars: 18,821
- Understanding Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/understanding-iii/channels.mdx. -->Votes: 0GitHub stars: 18,821
- Understanding Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/understanding-iii/engine.mdx. -->Votes: 0GitHub stars: 18,821
- Understanding IiiUnix gave processes a single interface. React gave components a single interface. iii gives every category of software (queues, schedulers, agents, frontends, sandboxes, business logic, etc.) a single interface: **Workers** host work, **Functions** are the work, **Triggers** are what causes the work to run, and the **Engine** routes between them. Once you have a mental model for those four pieces, everything else in iii is a variation on a theme. <Note>This page uses the [Quickstart tutorial]...Votes: 0GitHub stars: 18,821
- Upgrading``` </Tab> <Tab title="Rust"> ```rust // Before let sdk: III = /* ... */; use iii_sdk::WorkerTelemetryMeta; // After let sdk: IIIClient = /* ... */; use iii_sdk::TelemetryOptions; ``` </Tab> </Tabs>Votes: 0GitHub stars: 18,821
- Using IiiFor the most current list of commands, flags, and defaults, ask the binary directly: ```bash iii --help #lists iii's flags and available subcommands iii subcommand --help #lists the specific actions each sucommand accepts ``` Each subcommand's help also provides the defaults and environment variables that affect each command. <Note> The full CLI surface, including `iii worker` and `iii console`, is also published as an automatically generated [CLI reference](../cli-reference/index)...Votes: 0GitHub stars: 18,821
- Using Iii{/* TODO: Re-link worker references to https://workers.iii.dev/workers/<name> once the Worker Docs migration ships. */} <Note> The console is the visual UI for iii systems. It lists workers, functions, and triggers, and shows traces, logs, and metrics from the iii-observability worker. For scripting or agent integration, call worker functions directly. </Note>Votes: 0GitHub stars: 18,821
- Using IiiThis page covers running the iii engine and its workers in a production environment. For local development, see the [Quickstart](../quickstart) and the [Engine](./engine) page.Votes: 0GitHub stars: 18,821
- Using Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/using-iii/engine.mdx. -->Votes: 0GitHub stars: 18,821
- Using Iii}) ``` </Tab> <Tab title="Rust"> ```rust use iii_sdk::{TriggerAction, TriggerRequest}; use serde_json::json; let result = worker .trigger(TriggerRequest { function_id: "math::add".into(), payload: json!({ "a": 2, "b": 3 }), action: None, // action: Some(TriggerAction::Void), // fire-and-forget // action: Some(TriggerAction::Enqueue { queue: "math".to_string() }), // route through iii-queue timeout_ms: None, }) .await?; ``` </Tab> </Tabs> Some common actions ar...Votes: 0GitHub stars: 18,821
- Using Iii{/* TODO: Re-link worker references to https://workers.iii.dev/workers/<name> once the Worker Docs migration ships. */} <Note> Calling a function directly with `worker.trigger` or `iii trigger` are documented in [Using iii / Functions](./functions#triggering-invoking-functions). This page covers specifics about Triggers such as registering (binding) Triggers to Functions, gating triggers, and unregistering them. </Note>Votes: 0GitHub stars: 18,821
- Using Iii<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/using-iii/workers-registry.mdx. -->Votes: 0GitHub stars: 18,821
- Using Iii{/* TODO: Re-link worker references to https://workers.iii.dev/workers/<name> once the Worker Docs migration ships. */} {/* TODO: Add back once worker init is merged. <Note> This page covers using existing workers. For creating new workers (`iii worker init`), registering functions and triggers, and building or publishing worker images, see [Creating Workers / Workers](../creating-workers/workers). </Note> */}Votes: 0GitHub stars: 18,821
- Cli Reference{/* AUTO-GENERATED FILE, DO NOT EDIT. Generated from the clap CLI definitions by the hidden `gen-cli-docs` subcommand. Regenerate with `scripts/generate-cli-docs.sh`. */} Reference for the `iii` binary and the `iii worker` and `iii console` runtimes it dispatches to. Running `iii` with no subcommand starts the engine. The same information is available from the binaries themselves via `iii --help` and `iii <subcommand> --help`. For a guided overview, see [CLI](../using-iii/cli).Votes: 0GitHub stars: 18,821
- Creating Workers``` </Tab> <Tab title="Rust"> ```rust let channel = worker.create_channel(None).await?; // channel.writer // channel.reader // channel.writer_ref // channel.reader_ref ``` </Tab> </Tabs> Write the payload to the local `writer` and close it when finished. The bytes flow through the engine to whichever worker holds the matching `reader`. <Tabs> <Tab title="Node / TypeScript"> ```typescript const channel = await worker.createChannel(); channel.writer.stream.end(Buffer.from("file contents")); ```...Votes: 0GitHub stars: 18,821
- Creating Workersasync def write(data, metadata=None): return {"ok": True, "metadata": metadata} worker.register_function("audit::write", write) ``` </Tab> <Tab title="Rust"> ```rust // Two-argument closures receive the sidecar as `Option<Value>`; // one-argument closures keep working unchanged. worker.register_function( "audit::write", RegisterFunction::new_async(|input: Value, metadata: Option<Value>| async move { Ok(serde_json::json!({ "ok": true, "metadata": metadata })) }), ); ``` </Tab> </Tabs>Votes: 0GitHub stars: 18,821
- Creating Workerscurl -X POST http://localhost:3111/math/add -H 'content-type: application/json' -d '{"a":2,"b":3}' ```Votes: 0GitHub stars: 18,821
- Creating Workers``` </Tab> <Tab title="Rust"> ```rust use iii_sdk::TriggerAction; use iii_sdk::protocol::TriggerRequest; use serde_json::json; let receipt = worker .trigger(TriggerRequest { function_id: "email::send".to_string(), payload: json!({ "to": "a@b.com", "subject": "hi" }), action: Some(TriggerAction::Enqueue { queue: "email-jobs".to_string() }), // "queue" specifies the name of the queue timeout_ms: None, }) .await?; // receipt["messageReceiptId"] identifies the enqueued job ``` </Tab> </Tabs>Votes: 0GitHub stars: 18,821
- Creating Workersworker.unregister_trigger_type( {"id": "mini-http", "description": "Routes HTTP requests to bound functions"} ) ``` </Tab> <Tab title="Rust"> ```rust // e.g. config reload disabled the HTTP listener; stop accepting new bindings // while the worker keeps serving other trigger types. worker.unregister_trigger_type("mini-http"); ``` </Tab> </Tabs> {/* TODO: Update once this inconsistency is fixed */} <Note> Node's `registerTriggerType` also returns a `TriggerTypeRef` with an `.unregister()` shor...Votes: 0GitHub stars: 18,821
- Creating Workers- name: iii-worker-manager config: port: 49134 - name: iii-worker-manager config: host: 127.0.0.1 port: 3110 rbac: auth_function_id: auth::browser expose_functions: - match("link::create") - match("stream::*") ``` `auth_function_id` names a function the worker invokes once per connection to authorize the worker to connect (or reject it if authorization fails). That is covered in the next section. `expose_functions` is the allowlist of function IDs a session may call. Each entry is either a gl...Votes: 0GitHub stars: 18,821
- Creating Workers```Votes: 0GitHub stars: 18,821
- Creating Workersiii worker init my-worker iii worker init my-worker --language typescript ``` Supported languages: `typescript` (`ts`), `javascript` (`js`), `python` (`py`), `rust` (`rs`). Workers will typically store their program's entrypoint at `src/index.ext` or `src/main.ext` though this may vary slightly by programming language and template. The positional `NAME` is used as the target directory; pass `--directory` to override it. Worker init will fail by default when targeting a non-empty directory, us...Votes: 0GitHub stars: 18,821
- How To{/* TODO: write the how-to. Cover installing/enabling cron, registering a function, binding it to a `cron` trigger with a schedule expression, verifying it fires, common schedule strings, timezone behaviour, what happens on overlap (skip vs queue), and how to manually invoke for testing. */}Votes: 0GitHub stars: 18,821
- Reference{/* TODO: Re-link worker references to https://workers.iii.dev/workers/<name> once the Worker Docs migration ships. */} <Note> This page documents the wire-level protocol the engine and SDK workers exchange. Most projects use a language SDK ([Node](./sdk-node), [Python](./sdk-python), [Rust](./sdk-rust), [Browser](./sdk-browser)) and never touch the protocol directly. The shapes below are the source of truth those SDKs serialize to. </Note> <Note> Observability introspection (traces, logs, me...Votes: 0GitHub stars: 18,821
- Reference{/* AUTO-GENERATED FILE. Do not edit. Regenerate with docs/next/scripts/generate-api-docs.mts. */} {/* AI: any skill-check (vale/AI) text fixes belong in the source doc-comments under sdk/packages/node/helpers/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}Votes: 0GitHub stars: 18,821
- Reference{/* AUTO-GENERATED FILE. Do not edit. Regenerate with docs/next/scripts/generate-api-docs.mts. */} {/* AI: any skill-check (vale/AI) text fixes belong in the source doc-comments under sdk/packages/python/helpers/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}Votes: 0GitHub stars: 18,821
- Reference{/* AUTO-GENERATED FILE. Do not edit. Regenerate with docs/next/scripts/generate-api-docs.mts. */} {/* AI: any skill-check (vale/AI) text fixes belong in the source doc-comments under sdk/packages/rust/helpers/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}Votes: 0GitHub stars: 18,821
- Reference{/* AUTO-GENERATED FILE. Do not edit. Regenerate with docs/next/scripts/generate-api-docs.mts. */} {/* AI: any skill-check (vale/AI) text fixes belong in the source doc-comments under sdk/packages/node/iii-browser/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}Votes: 0GitHub stars: 18,821
- Reference{/* AUTO-GENERATED FILE. Do not edit. Regenerate with docs/next/scripts/generate-api-docs.mts. */} {/* AI: any skill-check (vale/AI) text fixes belong in the source doc-comments under sdk/packages/node/iii/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}Votes: 0GitHub stars: 18,821
- Referenceworker.shutdown() ``` --- Gracefully shut down the client, releasing all resources. Cancels any pending reconnection attempts, rejects all in-flight invocations with an error, closes the WebSocket connection, and stops the background event-loop thread. After this call the instance must not be reused. **Signature** ```python async () -> None ``` ```python worker = register_worker('ws://localhost:49134') await worker.shutdown_async() ``` --- Invoke a remote function. The routing behavior and r...Votes: 0GitHub stars: 18,821
- Reference{/* AUTO-GENERATED FILE. Do not edit. Regenerate with docs/next/scripts/generate-api-docs.mts. */} {/* AI: any skill-check (vale/AI) text fixes belong in the source doc-comments under sdk/packages/rust/iii/src (prose) or docs/next/scripts/ (structure/formatting), then regenerate. Never edit this file directly. */}Votes: 0GitHub stars: 18,821
- Incremental Adoption<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/tutorials/incremental-adoption/overview.mdx. -->Votes: 0GitHub stars: 18,821
- LinklyWhere a stream is for a live trickle of events, a **channel** is for **moving a large amount of data at once**: a direct streaming pipe between two endpoints, rather than one request and response. Channels are bidirectional (each end has both a reader and a writer), but here you'll stream in one direction, uploading a CSV of links. You'll give this its own `bulk-importer` worker so the `link` worker stays focused on single links.Votes: 0GitHub stars: 18,821