Monadically

Integrations that monad steps can use. Agent steps call their tools; code steps call their methods, and every method returns a promise.

firecrawl · Firecrawl

Search the web and read pages into structured data.

Agent toolWhat it does
firecrawl.web_searchSearch the web. Returns up to `limit` results with url, title, and description. 2 credits per 10 results.
firecrawl.read_pageRead a web page as markdown text. 1 credit.
Code step method
ctx.firecrawl.search(query, { limit, location }) -> [{ url, title, description }]. 2 credits per 10 results.
ctx.firecrawl.extract(url, { schema, prompt }) -> { json, text }. JSON that matches the schema, and the page text. 5 credits.
ctx.firecrawl.read(url) -> markdown text of the page. 1 credit.

geo · Geo

US zip codes, towns, venues, addresses, and distances. Results are cached.

Agent toolWhat it does
geo.zip_lookupTown, state, and center point of a US zip code.
geo.distances_from_zipMiles from a US zip code to each place. A place is an address or "Venue name, City, ST". Returns one number per place, or null when the place cannot be found. Use one call for many places.
Code step method
ctx.geo.zip(zip) -> { zip, city, state, stateName, lat, lon } or null
ctx.geo.city(name, near, withinMiles) -> { lat, lon } or null. A town first, then any place near `near`.
ctx.geo.venue(name, town, near) -> { lat, lon } or null. A named place in that town.
ctx.geo.place(query, near, withinMiles) -> { lat, lon } or null. An address or place near `near`.
ctx.geo.miles(a, b) -> number. Distance between two { lat, lon } points.
ctx.geo.distances(zip, places) -> [miles or null]. Miles from the zip code to each place ("Venue, City, ST" or an address).

web · Web

Plain HTTP GET for pages that need no browser.

Agent toolWhat it does
web.fetch_urlHTTP GET a URL and return the response body as text (HTML tags removed). Free.
Code step method
ctx.web.text(url) -> string. The response body.

Agent monads

Every published agent monad is also a tool: list it as agent:name. It runs as its own agent.

Models

Agent steps name a model as provider/model: anthropic/…, openai/…, gemini/…. Each person brings their own key at /keys; a run uses the key of the person who starts it.

Always available

ctx.config: the instance's input values
ctx.log(message)
ctx.hash(text) -> sha1 hex
ctx.cache.get(key), ctx.cache.set(key, value, ttlMs), ctx.cache.use(key, ttlMs, fn): this monad's cache
ctx.memory.get(key), ctx.memory.set(key, value): this monad's memory, kept between runs