Skip to content
Back to skills

Next

ASecurity

In this tutorial you will learn how iii makes it unreasonably simple to build and extend systems. <Tip title="Install iii before proceeding"> Make sure you have installed iii before proceeding. If you haven't then visit the [Install](./install) guide first. There you can also learn how to [set up iii for agentic development](./install#start-a-project). </Tip> <Note> The Quickstart is our original tutorial. If you want a guided, agentic learning experience that can be completed in a few minute...

  • 18,978 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 3, 2026
developmenttypescriptpythongobashkubernetesapidocumentation

Works with

  • terminal
  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add iii-hq/iii --skill next --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Next?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Next
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iii-hq-next-eca115f6/badge)](https://www.skillsdirectory.com/skills/iii-hq-next-eca115f6)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
<!-- generated by iii-skill-render. DO NOT EDIT (changes here are overwritten on the next render). Edit docs/next/quickstart.mdx. -->

# Quickstart


In this tutorial you will learn how iii makes it unreasonably simple to build and extend systems.

<Tip title="Install iii before proceeding">
  Make sure you have installed iii before proceeding. If you haven't then visit the
  [Install](./install) guide first. There you can also learn how to [set up iii for agentic
  development](./install#start-a-project).
</Tip>

<Note>
  The Quickstart is our original tutorial. If you want a guided, agentic learning experience that
  can be completed in a few minutes then run the [install script](./install) and press Enter when
  prompted.
</Note>

## 1. Create the project

```bash
iii project init quickstart --template quickstart
cd quickstart
```

This creates the two workers that you'll run: a Python worker that adds two numbers and stores the
sum in state, and a TypeScript worker that exposes an http endpoint and calls the Python worker
through the iii engine.

```
workers/
  math-worker/
    src/math_worker.py  # Python worker
  caller-worker/
    src/worker.ts       # TypeScript worker
```

## 2. Start the engine

```bash
iii compose --up
```

Compose starts the engine and its daemon. The engine is now listening on `ws://localhost:49134`.
Keep this terminal open. Run the remaining commands from a second terminal in the same directory.
All commands in this tutorial use the `default` namespace.

## 3. Start the Python worker

<Info title="Workers can run anywhere">
  Workers only need a WebSocket connection to the iii engine. They can run locally, in the cloud,
  replicated in kubernetes, or anywhere else.
</Info>

```bash
iii call compose::add worker=./workers/math-worker
```

This first add also starts the sandbox adapter, `sandbox-libkrun`, that Compose adds to build and
boot the worker. The first start builds the image, dependencies included, so it takes longer than
the next ones. The Compose daemon terminal reports the adapter becoming ready, then the worker
building its image and becoming ready:

```text
→ sandbox-libkrun installing api.workers.iii.dev/sandbox-libkrun@0.4.0
✓ sandbox-libkrun ready (1.2s)
→ math-worker starting
[compose] math-worker: no build yet; running scripts.build
→ math-worker building
✓ math-worker ready (9.6s)
up: 2 of 2 changed in 10.8s
```

<Warning title="Linux: `KVM not accessible`">
  Workers boot in a microVM that needs access to `/dev/kvm`. If the worker fails with `KVM not
  accessible`, see [Troubleshooting](./troubleshooting#kvm-not-accessible).
</Warning>

This worker registered the function `math::add` with the engine. You could call this function right
now using the command below.

```bash
iii call math::add a=2 b=3
```

However this is not much different than running an equivalent script on its own. The utility of iii
comes from being able to place any functionality into a worker and then compose that worker with
other workers through the engine, regardless of where each one runs or what language it's written
in.

<Tip>
  A worker registers its functions after its image is built and it starts, which the first add waits
  for. If you see `"message": "Function math::add not found"`, wait until the daemon reports the
  worker ready and try again.
</Tip>

## 4. Start the TypeScript worker

```bash
iii call compose::add worker=./workers/caller-worker
```

The Compose daemon reports:

```text
→ caller-worker starting
[compose] caller-worker: no build yet; running scripts.build
→ caller-worker building
✓ caller-worker ready (10.3s)
up: 1 of 3 changed in 10.3s
```

This worker registered the function `math::add_two_numbers` with the engine.

## 5. Call across languages

Call the TypeScript worker. It will call the Python worker through the engine and return the result:

```bash
iii call math::add_two_numbers a=10 b=20
```

```json
{
  "c": 30,
  "success": "You've connected two workers and they're interoperating seamlessly, now let's add a few more workers to expand this project's functionality."
}
```

## 6. Add state

`compose::add` incrementally adds workers from the registry to your running project. Add the state
worker, which gives every function access to a persistent key-value store.

From the folder containing `worker-compose.yaml`, run:

```bash
iii call compose::add worker=state
```

Now open `workers/math-worker/src/math_worker.py` in your code editor and uncomment the state block
so the handler looks like this:

```python
def add_handler(payload: dict) -> dict:
    a = payload.get("a", 0)
    b = payload.get("b", 0)
    logger.info(f"math::add called in Python with a={a}, b={b}")
    result = {"c": a + b}

    running_total = worker.call(
        {
            "function_id": "state::get",
            "payload": {"scope": "math", "key": "running_total"},
        }
    )
    new_total = (running_total or 0) + result["c"]
    worker.call(
        {
            "function_id": "state::set",
            "payload": {"scope": "math", "key": "running_total", "value": new_total},
        }
    )
    result["running_total"] = new_total

    return result
```

Save the file and call the function a few times:

```bash
iii call math::add a=2 b=3
```

```json
{ "c": 5, "running_total": 5 }
```

```bash
iii call math::add a=10 b=20
```

```json
{ "c": 30, "running_total": 35 }
```

The running total persists across every call, including calls that arrive through
`math::add_two_numbers`.

## 7. Add HTTP endpoints

Now let's add an HTTP worker to expose your functions as REST endpoints.

From the folder containing `worker-compose.yaml`, run:

```bash
iii call compose::add worker=http
```

Open `workers/caller-worker/src/worker.ts` and uncomment the HTTP block at the bottom of the file:

```typescript
worker.registerFunction(
  "http::add_two_numbers",
  async (payload: { body: { a: number; b: number } }) => {
    const result = await worker.call<
      { a: number; b: number },
      { c: number; running_total: number }
    >({
      function_id: "math::add_two_numbers",
      payload: payload.body,
    });
    return {
      status_code: 200,
      body: { c: result.c, running_total: result.running_total },
      headers: { "Content-Type": "application/json" },
    };
  },
);

worker.observe(
  {
    function_id: "http::on-request",
    args: { method: "POST", path: "/math/add-two-numbers" },
  },
  "http::add_two_numbers",
);
```

Each request the http worker receives is a call of its function `http::on-request`. The observer
tells the http worker which route it wants in `args`, so each `POST /math/add-two-numbers` request
runs `http::add_two_numbers`, and the value it returns is the HTTP response.

Save the file, then call the new endpoint with curl:

```bash
curl -X POST http://localhost:3111/math/add-two-numbers \
  -H 'Content-Type: application/json' \
  -d '{"a": 100, "b": 200}'
```

```json
{ "c": 300, "running_total": 335 }
```

`math::add_two_numbers` answers both `iii call` and HTTP requests, which reach it through
`http::add_two_numbers`.

## How it works

For a walkthrough of how the functions in this scaffold call and observe each other, and how the
workers and the engine host and route them, see [Understanding iii](./understanding-iii). It uses
this project as the worked example.

<Tip title="Inspect what's running">
  Open the iii console in ADE: run `iii call compose::add worker=ade` in a new terminal in the
  project folder, then open `http://127.0.0.1:3113`. It shows your workers, traces, and logs, and
  lets you chat with agents. See the full [ADE documentation](./using-iii/ade) for details.
</Tip>

{/* TODO: re-add the "Give your coding agent context" Tip with `npx skills add iii-hq/iii/skills` once the iii skills worker (owned by Sergio) ships. */}

## Next Steps

You scaffolded a project, started two workers in different languages, called functions across them,
added persistent state, and exposed everything over HTTP, all by incrementally adding workers to a
running system.

<CardGroup cols={2}>
  <Card title="Real-world tutorial" href="./tutorials/linkly/overview" icon="graduation-cap">
    Go beyond the basics and explore the full power of iii by building a real-world application.
  </Card>
  <Card title="Use iii" href="./using-iii" icon="table-layout">
    Learn how to use iii in production.
  </Card>
  <Card title="Understanding iii" href="./understanding-iii" icon="table-layout">
    Understand the Function, its call and observe operators, and the Workers that host it.
  </Card>
</CardGroup>

Files in this skill

  • assets/favicon.svg17.4 KB
  • assets/iii-black.svg508 B
  • assets/iii-white.svg923 B
  • cli-reference/index.mdx10.2 KB
  • cli-reference/index.mdx.skill.md10.2 KB
  • creating-workers/channels.mdx9.6 KB
  • creating-workers/channels.mdx.skill.md9.6 KB
  • creating-workers/functions.mdx15.6 KB
  • creating-workers/functions.mdx.skill.md15.6 KB
  • creating-workers/http.mdx4.8 KB
  • creating-workers/http.mdx.skill.md4.8 KB
  • creating-workers/index.mdx2.6 KB
  • creating-workers/index.mdx.skill.md2.6 KB
  • creating-workers/observability.mdx5.4 KB
  • creating-workers/observability.mdx.skill.md5.4 KB
  • creating-workers/queues.mdx13.2 KB
  • creating-workers/queues.mdx.skill.md13.2 KB
  • creating-workers/sandboxes.mdx5 KB
  • creating-workers/sandboxes.mdx.skill.md5 KB
  • creating-workers/triggers.mdx18.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.