Skip to content

chore: Update Actor development skill with more information about standby mode#35

Merged
nmanerikar merged 2 commits into
mainfrom
chore/skills-standby
Apr 23, 2026
Merged

chore: Update Actor development skill with more information about standby mode#35
nmanerikar merged 2 commits into
mainfrom
chore/skills-standby

Conversation

@nmanerikar
Copy link
Copy Markdown
Contributor

  • Add a quick section in the main Actor development skill about when to choose standby mode
  • Add essential details about standby mode to the separate standby reference
  • Update the actor.json reference to add a couple of standby-specific params

@nmanerikar nmanerikar requested review from raethlo and tobice April 1, 2026 12:28
@nmanerikar nmanerikar self-assigned this Apr 1, 2026
Copy link
Copy Markdown

@tobice tobice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Should we ask @patrikbraborec for review? He is responsible for general DX.

Copy link
Copy Markdown
Collaborator

@raethlo raethlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Nish, overall looks great. One thing I am not sure about is omitting standby from scraping/crawling use cases in the instructions. What do you think?

}
```

### OpenAPI Schema (`webServerSchema`)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] I would consider instructing to use a openapi tooling middleware if a framework is used (like express/hono/flask/fastapi whatever) and ideally also to define schemas/types annotations in code too -- we can iterate on this later

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not try to confuse it with more tool mentions. I've just added a line to make it ensure that the schema confirms to the spec. As you say, we can iterate on this later.

Use Standby when the Actor must respond to HTTP requests in real time - API endpoints, webhook receivers, real-time data lookups, MCP servers, or any synchronous request-response pattern.

You can recognize a standby Actor by checking the `usesStandbyMode` property in `.actor/actor.json`. Only implement the readiness probe if this property is set to `true`.
Do NOT use Standby for batch jobs (scraping, crawling, data pipelines, scheduled exports). Use the default batch mode instead.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is the case, there are legit use cases where you might want to expose a scraping/crawling workflow with a standby to handle bursts and benefit from the auto-scaling and/or optimize resource util (especially if the input to scrape is not well defined in advanced)

Comment thread skills/apify-actor-development/SKILL.md Outdated

See [references/standby-mode.md](references/standby-mode.md) for complete standby mode documentation including readiness probe implementation for JavaScript/TypeScript and Python.
**When to use Standby vs. batch mode:**
- **Standby mode** - Actor runs as a persistent HTTP server responding to requests in real time. Use when the user needs: an API endpoint, webhook receiver, real-time data lookup, MCP server, or any synchronous request-response pattern. Signal words: "API", "endpoint", "webhook", "real-time", "server", "on-demand", "low latency".
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as mentioned above, scraping can also be a valid use case, maybe it's more about the nature of frequency of calls and nature of the input? like, "one-url scraping jobs that come in bursts that you don't know in advance" (i.e. a standby handling a fleet of browser instances and exposing "scraping api")

@patrikbraborec
Copy link
Copy Markdown
Collaborator

Hi, thanks! I missed the notification, I will check it today.

@nmanerikar nmanerikar requested a review from raethlo April 10, 2026 11:57
Copy link
Copy Markdown
Collaborator

@raethlo raethlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good ✅ , just one small comment

1. Start the HTTP server directly (e.g., `node src/main.js` or `python src/main.py`)
2. Send requests with curl/httpie to verify endpoints
3. Test the readiness probe: `curl -H "x-apify-container-server-readiness-probe: true" http://localhost:<port>/`
4. Deploy with `apify push` and test via the Standby URL. Local Standby URLs use the format `http://<username>--<actor-name>.localhost:8003/<path>?token=<APIFY_TOKEN>` (e.g., `http://meaningful-sand--standby-actor.localhost:8003?token=apify_api_...`)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like sth that works only if you'd have the platform spun up locally -- but maybe I'm missing sth

@nmanerikar nmanerikar merged commit 27c9092 into main Apr 23, 2026
2 checks passed
@nmanerikar nmanerikar deleted the chore/skills-standby branch April 23, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants