diff --git a/hosting/docker-compose/ee/docker-compose.dev.yml b/hosting/docker-compose/ee/docker-compose.dev.yml index b26c27e0cf..29ed893d43 100644 --- a/hosting/docker-compose/ee/docker-compose.dev.yml +++ b/hosting/docker-compose/ee/docker-compose.dev.yml @@ -424,6 +424,12 @@ services: AGENTA_RUNNER_DAYTONA_SESSION_IDLE_TTL_MS: ${AGENTA_RUNNER_DAYTONA_SESSION_IDLE_TTL_MS:-} AGENTA_RUNNER_DAYTONA_SESSION_MAX_WARM: ${AGENTA_RUNNER_DAYTONA_SESSION_MAX_WARM:-} AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES: ${AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES:-} + # This service has no env_file (see above), so the session flags must be listed + # here or they can never be set. AGENTA_SESSIONS_RECONSTRUCT must be enabled + # together with the web NEXT_PUBLIC_SESSIONS_LAST_MESSAGE_ONLY, or a turn that + # carries only its last message loses the conversation. + AGENTA_SESSIONS_RECONSTRUCT: ${AGENTA_SESSIONS_RECONSTRUCT:-} + AGENTA_RECORDS_DURABLE: ${AGENTA_RECORDS_DURABLE:-} # === STORAGE ============================================== # volumes: - ../../../services/runner/src:/app/src diff --git a/hosting/docker-compose/ee/docker-compose.gh.yml b/hosting/docker-compose/ee/docker-compose.gh.yml index 2e71f84034..a27df46a02 100644 --- a/hosting/docker-compose/ee/docker-compose.gh.yml +++ b/hosting/docker-compose/ee/docker-compose.gh.yml @@ -295,6 +295,12 @@ services: AGENTA_RUNNER_DAYTONA_SESSION_IDLE_TTL_MS: ${AGENTA_RUNNER_DAYTONA_SESSION_IDLE_TTL_MS:-} AGENTA_RUNNER_DAYTONA_SESSION_MAX_WARM: ${AGENTA_RUNNER_DAYTONA_SESSION_MAX_WARM:-} AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES: ${AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES:-} + # This service has no env_file (see above), so the session flags must be listed + # here or they can never be set. AGENTA_SESSIONS_RECONSTRUCT must be enabled + # together with the web NEXT_PUBLIC_SESSIONS_LAST_MESSAGE_ONLY, or a turn that + # carries only its last message loses the conversation. + AGENTA_SESSIONS_RECONSTRUCT: ${AGENTA_SESSIONS_RECONSTRUCT:-} + AGENTA_RECORDS_DURABLE: ${AGENTA_RECORDS_DURABLE:-} # === SUBSCRIPTION MOUNTS (opt-in) ========================= # # Use your own harness subscription for LOCAL runs instead of a managed API # key. Mount the login READ-WRITE: the harness runs directly out of the mount and diff --git a/hosting/docker-compose/ee/env.ee.dev.example b/hosting/docker-compose/ee/env.ee.dev.example index 0782fe2c74..94bea8b7b0 100644 --- a/hosting/docker-compose/ee/env.ee.dev.example +++ b/hosting/docker-compose/ee/env.ee.dev.example @@ -111,6 +111,18 @@ AGENTA_RUNNER_DEFAULT_SANDBOX_PROVIDER=local # 5 min per tool call. # AGENTA_RUNNER_TOOL_CALL_TIMEOUT_MS=300000 +# --- Session history: last-message-only turns (all four default off) --- +# The client sends only the newest user message and the runner rebuilds the earlier turns +# from the durable session record log, which keeps requests and traces small on a long +# conversation. The first two must be flipped together: with the web flag on and the runner +# flag off, a turn arrives with no history at all. +# AGENTA_SESSIONS_RECONSTRUCT=true +# NEXT_PUBLIC_SESSIONS_LAST_MESSAGE_ONLY=true +# Records become the only copy of the conversation, so make writing them durable and keep +# the structure of a record whose body exceeds the API size cap. +# AGENTA_RECORDS_DURABLE=true +# AGENTA_RECORDS_SMART_TRUNCATION=true + # ================================================================== # # Agenta - API # ================================================================== # diff --git a/hosting/docker-compose/ee/env.ee.gh.example b/hosting/docker-compose/ee/env.ee.gh.example index a8de6f8618..3cef8caad3 100644 --- a/hosting/docker-compose/ee/env.ee.gh.example +++ b/hosting/docker-compose/ee/env.ee.gh.example @@ -113,6 +113,18 @@ AGENTA_RUNNER_TOKEN=replace-me # 5 min per tool call. # AGENTA_RUNNER_TOOL_CALL_TIMEOUT_MS=300000 +# --- Session history: last-message-only turns (all four default off) --- +# The client sends only the newest user message and the runner rebuilds the earlier turns +# from the durable session record log, which keeps requests and traces small on a long +# conversation. The first two must be flipped together: with the web flag on and the runner +# flag off, a turn arrives with no history at all. +# AGENTA_SESSIONS_RECONSTRUCT=true +# NEXT_PUBLIC_SESSIONS_LAST_MESSAGE_ONLY=true +# Records become the only copy of the conversation, so make writing them durable and keep +# the structure of a record whose body exceeds the API size cap. +# AGENTA_RECORDS_DURABLE=true +# AGENTA_RECORDS_SMART_TRUNCATION=true + # ================================================================== # # Agenta - API # ================================================================== # diff --git a/hosting/docker-compose/oss/docker-compose.dev.yml b/hosting/docker-compose/oss/docker-compose.dev.yml index 604d62bfa1..b178dfe07d 100644 --- a/hosting/docker-compose/oss/docker-compose.dev.yml +++ b/hosting/docker-compose/oss/docker-compose.dev.yml @@ -410,6 +410,12 @@ services: AGENTA_RUNNER_DAYTONA_SESSION_IDLE_TTL_MS: ${AGENTA_RUNNER_DAYTONA_SESSION_IDLE_TTL_MS:-} AGENTA_RUNNER_DAYTONA_SESSION_MAX_WARM: ${AGENTA_RUNNER_DAYTONA_SESSION_MAX_WARM:-} AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES: ${AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES:-} + # This service has no env_file (see above), so the session flags must be listed + # here or they can never be set. AGENTA_SESSIONS_RECONSTRUCT must be enabled + # together with the web NEXT_PUBLIC_SESSIONS_LAST_MESSAGE_ONLY, or a turn that + # carries only its last message loses the conversation. + AGENTA_SESSIONS_RECONSTRUCT: ${AGENTA_SESSIONS_RECONSTRUCT:-} + AGENTA_RECORDS_DURABLE: ${AGENTA_RECORDS_DURABLE:-} # === STORAGE ============================================== # volumes: - ../../../services/runner/src:/app/src diff --git a/hosting/docker-compose/oss/docker-compose.gh.yml b/hosting/docker-compose/oss/docker-compose.gh.yml index a9777adfa9..09f9f0e802 100644 --- a/hosting/docker-compose/oss/docker-compose.gh.yml +++ b/hosting/docker-compose/oss/docker-compose.gh.yml @@ -312,6 +312,12 @@ services: AGENTA_RUNNER_DAYTONA_SESSION_IDLE_TTL_MS: ${AGENTA_RUNNER_DAYTONA_SESSION_IDLE_TTL_MS:-} AGENTA_RUNNER_DAYTONA_SESSION_MAX_WARM: ${AGENTA_RUNNER_DAYTONA_SESSION_MAX_WARM:-} AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES: ${AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES:-} + # This service has no env_file (see above), so the session flags must be listed + # here or they can never be set. AGENTA_SESSIONS_RECONSTRUCT must be enabled + # together with the web NEXT_PUBLIC_SESSIONS_LAST_MESSAGE_ONLY, or a turn that + # carries only its last message loses the conversation. + AGENTA_SESSIONS_RECONSTRUCT: ${AGENTA_SESSIONS_RECONSTRUCT:-} + AGENTA_RECORDS_DURABLE: ${AGENTA_RECORDS_DURABLE:-} # === SUBSCRIPTION MOUNTS (opt-in) ========================= # # Use your own harness subscription for LOCAL runs instead of a managed API # key. Mount the login READ-WRITE: the harness runs directly out of the mount and diff --git a/hosting/docker-compose/oss/env.oss.dev.example b/hosting/docker-compose/oss/env.oss.dev.example index b75eb975e1..37e70a43c1 100644 --- a/hosting/docker-compose/oss/env.oss.dev.example +++ b/hosting/docker-compose/oss/env.oss.dev.example @@ -111,6 +111,18 @@ AGENTA_RUNNER_DEFAULT_SANDBOX_PROVIDER=local # 5 min per tool call. # AGENTA_RUNNER_TOOL_CALL_TIMEOUT_MS=300000 +# --- Session history: last-message-only turns (all four default off) --- +# The client sends only the newest user message and the runner rebuilds the earlier turns +# from the durable session record log, which keeps requests and traces small on a long +# conversation. The first two must be flipped together: with the web flag on and the runner +# flag off, a turn arrives with no history at all. +# AGENTA_SESSIONS_RECONSTRUCT=true +# NEXT_PUBLIC_SESSIONS_LAST_MESSAGE_ONLY=true +# Records become the only copy of the conversation, so make writing them durable and keep +# the structure of a record whose body exceeds the API size cap. +# AGENTA_RECORDS_DURABLE=true +# AGENTA_RECORDS_SMART_TRUNCATION=true + # ================================================================== # # Agenta - API # ================================================================== # diff --git a/hosting/docker-compose/oss/env.oss.gh.example b/hosting/docker-compose/oss/env.oss.gh.example index 7cf53d9c10..dfa65636ea 100644 --- a/hosting/docker-compose/oss/env.oss.gh.example +++ b/hosting/docker-compose/oss/env.oss.gh.example @@ -113,6 +113,18 @@ AGENTA_RUNNER_TOKEN=replace-me # 5 min per tool call. # AGENTA_RUNNER_TOOL_CALL_TIMEOUT_MS=300000 +# --- Session history: last-message-only turns (all four default off) --- +# The client sends only the newest user message and the runner rebuilds the earlier turns +# from the durable session record log, which keeps requests and traces small on a long +# conversation. The first two must be flipped together: with the web flag on and the runner +# flag off, a turn arrives with no history at all. +# AGENTA_SESSIONS_RECONSTRUCT=true +# NEXT_PUBLIC_SESSIONS_LAST_MESSAGE_ONLY=true +# Records become the only copy of the conversation, so make writing them durable and keep +# the structure of a record whose body exceeds the API size cap. +# AGENTA_RECORDS_DURABLE=true +# AGENTA_RECORDS_SMART_TRUNCATION=true + # ================================================================== # # Agenta - API # ================================================================== #