Skip to documentation
Docs navigation
Docs/getAgentId()
Fleet Memory

getAgentId()

Read the worker agent ID.

What it does

Read the worker agent ID.

The operation follows the fleet’s memory mode and agent identity rules when selecting, storing, or transferring memory.

Signature

TypeScript
getAgentId(): string

Result

The requested identifier or text value.

Example

example.ts
const id = worker.getAgentId();