Automation
The glue of a workspace. Workers run your code; the rest trigger and route events between blocks.
| Block | Type ID | Description |
|---|---|---|
| Worker | code.worker | Programmable Python worker — runs in the browser sandbox or on the server. Gains ctx.* adapters for every connected block. |
| Scheduler | automation.scheduler | Trigger connected blocks on an interval (cron-style). |
| Logic Gate | automation.logic_gate | Conditional routing — IF/THEN/ELSE filtering of events by field. |
| Webhook | automation.webhook | Public URL that accepts inbound HTTP POSTs from external systems and routes them onward. |
Workers are the powerhouse
A Worker is a Python script with two functions — setup(ctx) (once) and tick(ctx) (every N seconds). Every block you wire to it shows up as an adapter on ctx:
python
def tick(ctx):
price = ctx.bybit.get_tickers("BTCUSDT")
ctx.monitor.render([
ctx.monitor.metric("BTC", price["last_price"])
])A single Worker can connect to many blocks at once — one Worker wired to an exchange + a data feed + Telegram + an AI Agent + a Monitor becomes a complete bot with alerts and a live dashboard.
See the Worker API Reference for the full list of ctx.* adapters, the Sandbox & Security model, and Examples.
How they connect
| From | To | What happens |
|---|---|---|
| Scheduler | Worker | The scheduler triggers the worker on its interval |
| Worker | any block | That block's ctx.* adapter becomes available in code |
| Logic Gate | any block | Events are forwarded only when the condition matches |
| Webhook | Worker / Agent | Inbound HTTP POSTs are routed to the connected block |