@squidcloud/client
    Preparing search index...

    Interface AiChatRequestSession

    The session (squid.sessions()) a chat request runs in. It is part of the request only: never stored with the agent.

    interface AiChatRequestSession {
        session?: UpsertSessionRequest;
    }
    Index

    Every AI function the request calls gets the session as context.session. With the app API key, the request creates the session or updates the one with the same id. Without it, a new id creates the session with its data and a live one is attached as it is; the agent's @secureAiAgent rules see both and can refuse them. A call that skips the rules, to a public agent or with the agent's API key, cannot attach one.