Table of Contents

Method TryGetAgentById

Namespace
Oscova.Agents.Collections
Assembly
Oscova.Agents.dll

TryGetAgentById(string, out ChatClientAgent?)

Attempts to retrieve a cached agent by identifier.

public bool TryGetAgentById(string agentId, out ChatClientAgent? agent)

Parameters

agentId string

The agent identifier to find.

agent ChatClientAgent?

The cached agent when found; otherwise null.

Returns

bool

true when the agent exists in the cache.