Make sure you have installed iii before proceeding. If you haven’t then visit the
Install guide first.
1. Scaffold the project
2. Start the engine
ws://localhost:49134. Keep this terminal open and open a second
terminal in the quickstart directory for the remaining commands.
3. Start the Python worker
Workers only need a WebSocket connection to the iii engine. They can run locally, in the cloud,
replicated in kubernetes, or anywhere else.
math::add with the engine. You could call this function right
now using the command below.
4. Start the TypeScript worker
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:6. Add state
Theiii worker add command incrementally adds built-in workers to your running system. Start by
adding the state worker, which gives every function access to a persistent key-value store.
From the folder containing iii’s config.yaml run:
workers/math-worker/math_worker.py and uncomment the state block so the handler looks
like this:
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 iii’sconfig.yaml run:
workers/caller-worker/src/worker.ts and uncomment the HTTP block at the bottom of the file:
iii trigger now also respond to HTTP requests with no code
changes to the handlers themselves.
8. How it works
Python worker
workers/math-worker/math_worker.py:
register_worker connects to the engine over WebSocket. register_function makes math::add
available to the entire system.
TypeScript worker
workers/caller-worker/src/worker.ts:
registerWorker connects to the engine the same way the Python worker does. The iii.trigger()
call inside the handler invokes math::add on the Python worker through the engine. The TypeScript
worker doesn’t need to know where the math::add function is running, its language, or anything
else.
Worker manifest
Each worker has aniii.worker.yaml that describes how to run the worker. Here is the Python
worker’s manifest. While these workers are started with the iii worker add command they do not
need to be running alongside the iii instance. These workers can run anywhere and even be
replicated. Every worker simply connects to iii over WebSocket. iii then handles all routing.
name identifies the worker. runtime tells the engine the language and entrypoint. scripts
define how to install dependencies and start the worker.
Architecture
9. Explore with the iii Console (Optional)
iii contains an interactive web interface to help observe a iii system end to end. It’s particularly useful for debugging. The console can be started in a new terminal:10. Add Agent Skills (Optional)
Give your IDEs and AI coding agents full context on iii: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.How to use Functions & Triggers
Learn how to register functions, trigger them, and bind them to events.
Concepts
Understand Functions, Triggers, and Workers from a conceptual point of view.