An Agent offers interaction with a single endpoint. This is the operational interface to endpoints. It is separate from the Endpoint because the agent is context-aware and may be bound to a specific fabric.

An endpoint agent manages one or more Behavior instances that implement a discrete subset of the agent's functionality.

Each endpoint agent has an associated Agent.Type that defines each Behavior.Type the endpoint supports.

Agent.Type is a permanent feature of an endpoint but agent instances themselves are transitory and there is no guarantee they will exist beyond the lifecycle of a single transaction.

Constructors

Accessors

Methods

  • Obtain a Behavior supported by this agent. Throws an error if the Behavior.Type isn't supported or is still initializing.

    You may also access behaviors using normal property access, e.g. agent.descriptor is the same as agent.get(DescriptorBehavior).

    Property access is available in TypeScript when the set of behaviors is defined statically.

    Type Parameters

    Parameters

    • type: T

    Returns InstanceType<T>