@squidcloud/backend
    Preparing search index...

    Class SecureAiAgentContext

    Provides context to the security rules of an AI Agent for each new user prompt. Refer to the @secureAiAgent annotation for more details.

    Index
    agentId: string
    options?: AiChatRequestOptions

    The request's chat options. model may be a routing choice the caller asked for: check 'models' in model before reading it as a concrete model selection.

    prompt?: string

    The user prompt. A voice call (transcribeAndChat, transcribeAndAsk, transcribeAndAskWithVoiceResponse) runs the rules twice: first with no prompt, where true allows the paid transcription of its audio, then with the transcript as the prompt.

    session?: UpsertSessionRequest

    The session the call asks to attach. Without the app API key, a new id creates it with the caller's data, and a live one is attached as it is: a rule that rejects it refuses the call.

    storedSession?: Session

    The live session stored under session.id, which a caller without the app API key attaches as it is: check that the caller may use it. Absent with the API key, which skips the rules.