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
casacadeIdthat 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
cascadeIdthat starts with “calln” implies its a recursive delegation of depth n. So the first recursive delegation will result in acascadeIdthat starts with “call1” -
If a
cascadeIdstarts 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
userIdby appending or prepending tocascadeId - 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,eufor tracking - Encoding model preference -
anthropic_haiku_uuidto select provider and model, though there are better ways of doing it
This is the reason we don’t generate cascadeIds for you.