Skip to content

ts-standby: AGENTS.md should teach programmatic endpoint discoverability #839

Description

@DaveHanns

Problem

The ts-standby template's AGENTS.md (and the equivalent for any Standby template) teaches the mechanical setup — usesStandbyMode: true in actor.json, HTTP server binding to process.env.ACTOR_STANDBY_PORT — but does not teach endpoint discoverability.

Agents that follow the template commonly bind their primary handler on a verb-shaped path (/metadata, /api, ...) and use / for a plain-text help message. Result: the Actor works when a human types the correct URL, but is invisible to programmatic clients hitting /.

Suggested change

Add a Do-list bullet (or a small Discoverability section) to ts-standby/AGENTS.md:

- **Make your Standby endpoint programmatically discoverable.** One of:
  1. Bind your primary handler on `/` — the Standby URL you hand out IS the endpoint.
  2. Serve an OpenAPI spec at `/openapi.json` (see `webServerSchema` in `actor.json`).
  3. If `/` is reserved for something else, return machine-readable JSON at `/`:
     ```js
     res.json({ endpoints: [{ path: '/metadata', method: 'GET', params: { url: 'string' } }] });
     ```
  Do NOT return plain-text help ("Actor is ready. Use GET /metadata?url=...") at `/` — that
  makes the Actor reachable by humans only.

Related

Impact

Medium. Templates are the anchoring artifact for agent-authored Standby Actors — if the template AGENTS.md teaches discoverability, the anti-pattern goes away at the source.


Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions