A decorator that can be used to secure an AI agent.
The function should return a boolean or a Promise of a boolean indicating
whether the action is allowed.
The function takes a context object as a parameter. The context object contains information about the action.
To read more about securing an AI agent, see the
documentation.
Parameters
OptionalagentId: string
The ID of the agent to secure - if not provided, this will apply to all agents.
A decorator that can be used to secure an AI agent.
The function should return a boolean or a
Promise
of a boolean indicating whether the action is allowed. The function takes a context object as a parameter. The context object contains information about the action.To read more about securing an AI agent, see the documentation.