Use case

An agent that answers GitHub, Stripe or Slack.

Most useful agents don't wait to be asked. A payment fails, a customer writes in, a build breaks, and the agent is already on it.

The problem

To hear from another service you need a server that is always up, with an address that never changes. An agent's sandbox is neither.

So people put a small always-on server in front, and now there are two things to run and a queue to build between them.

How Annex does it

  1. Make an address

    A task gets a web address of its own. Give it to GitHub, Stripe, Slack or anything else that can call one.

  2. Calls wait for a sandbox

    Annex answers the sender at once and keeps the call. It reaches the task's sandbox when one is running, even one that starts later, and a sender's repeat of the same call is taken once.

  3. The agent does the work

    Each call arrives as a file, or runs a command you chose, with the sender's own headers so you can check it is genuine.

What it looks like

An address for Stripe, with each call handed to a script.

Inside a sandbox

curl -X POST "$ANNEX_URL/v1/workspaces/$ANNEX_WORKSPACE_ID/tasks/$ANNEX_TASK_ID/webhooks" \
  -H "Authorization: Bearer $ANNEX_TASK_TOKEN" \
  -d '{"name": "stripe", "command": "python3 on_payment.py"}'

Related use cases