Get Agent ID • AI Agent SDK

get_agent_id: Resolve agent ID for a given message context.

get_agent_id

Method

</div>

This is a method of the ChannelRouteConfig class in the config module.

Resolve agent ID for a given message context.

Diagram

Input Data

Agent: get_agent_id

Output Result

Signature

python
def get_agent_id(context: str) -> str

Parameters

ParamField str

Message context (dm, group, channel, default)

Returns

ResponseField str

The agent ID for the given context, falling back to “default” route.

Source

View on GitHub

praisonaiagents/gateway/config.py at line 1434


Related Documentation