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 and press Enter when
prompted.
1. Create the project
2. Start the engine
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
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
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:
workers/math-worker/src/math_worker.py in your code editor 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 containingworker-compose.yaml, run:
workers/caller-worker/src/worker.ts and uncomment the HTTP block at the bottom of the file:
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:
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. It uses this project as the worked example.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.Real-world tutorial
Go beyond the basics and explore the full power of iii by building a real-world application.
Use iii
Learn how to use iii in production.
Understanding iii
Understand the Function, its call and observe operators, and the Workers that host it.