세션은 대화형 에이전트(Dialogflow CX) 에이전트와 최종 사용자 간의 대화를 나타냅니다.
대화를 시작할 때 세션을 만들고 대화 차례마다 이 세션을 사용합니다.
대화가 종료되면 세션 사용을 중단합니다.
여러 최종 사용자와 동시에 진행되는 대화에서 동일한 세션을 사용하면 안 됩니다.
세션에 대한 마지막 요청을 보낸 후 30분 동안 세션이 활성 상태로 유지되고 세션 데이터가 저장됩니다.
각 세션은 시스템에서 생성되는 세션 ID로 고유하게 구분됩니다.
인텐트 인식 요청 및 기타 세션 메서드에서 새로운 세션 ID를 제공하여 새 세션을 만듭니다.
세션 ID는 최대 36바이트 크기의 문자열입니다.
시스템은 고유한 세션 ID를 생성합니다.
세션 ID는 난수, 해싱된 최종 사용자 식별자 또는 사용자가 생성하기 편리한 기타 값일 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eA session in Conversational Agents (Dialogflow CX) represents a single conversation between an agent and an end-user, beginning at the start of the conversation and ending when the conversation is done.\u003c/p\u003e\n"],["\u003cp\u003eEach session is assigned a unique session ID, which is a string of up to 36 bytes, and it is generated by the user's system.\u003c/p\u003e\n"],["\u003cp\u003eSessions should not be shared between multiple end-users concurrently, as it may produce unpredictable behaviors and data corruption.\u003c/p\u003e\n"],["\u003cp\u003eBy default, session data is stored for 30 minutes after the last request; however, this can be extended up to 24 hours by setting the \u003ccode\u003eQueryParameters.session_ttl\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can also revive a previous session state by setting \u003ccode\u003eQueryParameters.current_page\u003c/code\u003e and \u003ccode\u003eQueryParameters.parameters\u003c/code\u003e in a \u003ccode\u003eDetectIntentRequest\u003c/code\u003e for long-lasting sessions, allowing users to resume from a previous state even after the default 30-minute window has passed.\u003c/p\u003e\n"]]],[],null,["# Sessions\n\nA session represents a conversation between a Conversational Agents (Dialogflow CX) agent and an end-user.\nYou create a session at the beginning of a conversation\nand use it for each turn of the conversation.\nOnce the conversation has ended,\nyou discontinue using the session.\n\nYou should not use the same session for concurrent conversations\nwith different end-users.\nA session remains active and its data is stored for 30 minutes\nafter the last request is sent for the session.\n\nEach session is determined unique by a session ID generated by your system.\nYou create a new session by providing a new session ID\nin a detect intent request and other session methods.\nA session ID is a string of at most 36 bytes in size.\nYour system is responsible for generating unique session IDs.\nThey can be random numbers, hashed end-user identifiers,\nor any other values that are convenient for you to generate.\n\nCheck the [Regionalization](/dialogflow/cx/docs/how/region)\ndocumentation for information about the Location ID value in the session name.\n\nLong-lasting sessions\n---------------------\n\nBy default, Conversational Agents (Dialogflow CX) maintains the session data for 30 minutes. There are two ways to extend the lifetime of the sessions:\n\n- **(Preferred)** Set session TTL using `QueryParameters.session_ttl`. The maximum allowed value is 24 hours.\n- You can revive the previous session state by setting\n `QueryParameters.current_page` and `QueryParameters.parameters` in `DetectIntentRequest`.\n\n An example workflow looks like:\n 1. End-user talks with the agent under session A.\n 2. Your code records the state associated with session A returned in the API response, namely `QueryResult.current_page` and `QueryResult.parameters`.\n 3. End-user stops interacting with the agent after 50 minutes.\n 4. End-user talks with the agent again.\n 5. Your code sends the end-user input, together with the previously recorded `QueryParameters.current_page` and `QueryParameters.parameters` in the request, to detect intent with the previous session state. You do not need to use the same session ID as used by session A.\n\n | **Note:** [Handler call stack](/dialogflow/cx/docs/concept/handler#call-stack) will **not** be revived with this approach.\n\nReferences\n----------\n\nFor information on session pricing, see the\n[pricing page](/dialogflow/pricing).\n\nFor more information on sessions:\n\n\nGo to the Session API reference \n**Select a protocol and version for the Session reference:**\n\nClose\n\n\u003cbr /\u003e"]]