Skip to Content

Conventions

cascadeId can be used as a lightweight coordination primitive.

Cascaide uses some conventions about how cascadeId should be structured. Moreover, we encourage developers to create their own conventions - cascadeId can be used to carry information.

The conventions cascaide use are:

  • A casacadeId that starts with “call” are assumed to be sub agent delegations. This follows from OpenAI API convention of tool calls Ids starting with “call”, so your tool call Id of a sub agent delegation tool call could double as the cascadeId

  • A cascadeId that starts with “calln” implies its a recursive delegation of depth n. So the first recursive delegation will result in a cascadeId that starts with “call1”

  • If a cascadeId starts with ”_”, streaming will be automatically suppressed. Useful when running deeply recursive agents to avoid strain on SSE transport. This is the only convention that changes the runtime behaviour.

Some Ideas

We encourage you to create your own conventions that don’t clash with the ones above.

  • Encoding userId by appending or prepending to cascadeId
  • Encoding a sessionId for grouping related cascades in a single user session — useful for the audit log dashboard
  • Encoding the initiating node name — like call-searchAgent_uuid — so logs immediately show which node spawned the cascade without querying the database
  • Encoding server region us, eu for tracking
  • Encoding model preference - anthropic_haiku_uuid to select provider and model, though there are better ways of doing it

This is the reason we don’t generate cascadeIds for you.

Last updated on