Ambassadors (Serverless Functions)
Learn about Ambassadors (Serverless Functions) in WaymakerOS.
Ambassadors are serverless functions deployed through Waymaker Host to a global edge network — 330+ locations worldwide, sub-50ms latency. They run your business logic close to your users — webhooks, scheduled tasks, API integrations, AI-powered automations, and more.
What Are Ambassadors?
Think of ambassadors as your organization's automated agents. They:
- Run on schedule — Check inventory, send reports, sync data
- Respond to events — Process webhooks, handle API requests
- Connect systems — Bridge your Waymaker data with external services
- Think with AI — Extract data, classify content, generate summaries, and process images
- Scale automatically — Run on a global edge network across 330+ cities worldwide
AI Capabilities
Ambassadors have two built-in ways to use AI: One AI (ctx.ai.generate()) — the full-power path routed through One for complex reasoning, premium writing, and compliance-aware processing — and Edge AI (ctx.ai.edge()) — a fast, low-cost model running on the same network as your ambassador, ideal for extraction, classification, and high-volume structured output. Both draw on your WaymakerOne Pass credits.
Full guidance, code examples, and a when-to-use-which comparison are in Using AI in Ambassadors.
Creating an Ambassador
Required Fields
- name — Used to generate the URL slug
Optional Fields
- repository_url — GitHub repo containing your function code
- repository_branch — Branch to deploy from (default:
main) - function_path — Entry file path within the repo (default:
index.ts) - auth_mode —
required(default),public, orapi-key - schedule — Cron expression for automatic invocation (e.g.,
0 */6 * * *) - workspace_id — Associate with a specific workspace
CLI Example
This can also be done from the Waymaker CLI — see the command reference in the developer docs.
MCP Example
"Create an ambassador called weekly-report from my reports repo that runs every Monday at 9am"
Deploying
Trigger a deployment:
This can also be done from the Waymaker CLI — see the command reference in the developer docs.
The build runner:
- Checks out your repo
- Builds the serverless function
- Deploys to the global edge network (330+ cities)
- Updates the ambassador status
Invoking Manually
Test an ambassador by invoking it directly:
This can also be done from the Waymaker CLI — see the command reference in the developer docs.
This sends a POST request to the ambassador's deployed URL and returns the response.
Viewing Logs
See recent invocations:
This can also be done from the Waymaker CLI — see the command reference in the developer docs.
Each entry shows the timestamp, status, duration, and the input and output data. For the full detail — including how to read failures and timeouts — see Invoking & Logs.
Authentication & Schedules
An Ambassador can require a Waymaker auth token, be public, or use an API key — and it can run on a schedule (a cron expression). Both are configured in the ambassador's settings; see Settings, Schedules & Auth for the auth modes and the cron reference.
Ambassador Lifecycle
| Status | Meaning |
|---|---|
pending | Created, not yet deployed |
building | Build in progress |
active | Deployed and running |
error | Last deployment failed |
archived | Soft-deleted |
Deleting an Ambassador
This can also be done from the Waymaker CLI — see the command reference in the developer docs.
This archives the ambassador and removes the serverless function. Only the creator can delete.
Environment Variables
Ambassadors have their own environment variables, separate from apps. See Environment Variables for details.