Files
letta-server/alembic/versions/d0880aae6cee_add_compaction_settings_to_agents_table.py
Sarah Wooders 7ea297231a feat: add compaction_settings to agents (#6625)
* initial commit

* Add database migration for compaction_settings field

This migration adds the compaction_settings column to the agents table
to support customized summarization configuration for each agent.

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* fix

* rename

* update apis

* fix tests

* update web test

---------

Co-authored-by: Letta <noreply@letta.com>
Co-authored-by: Kian Jones <kian@letta.com>
2025-12-15 12:02:34 -08:00

29 lines
720 B
Python

"""add compaction_settings to agents table
Revision ID: d0880aae6cee
Revises: 2e5e90d3cdf8
Create Date: 2025-12-10 16:17:23.595775
"""
from typing import Sequence, Union
import sqlalchemy as sa
from alembic import op
from letta.orm.custom_columns import CompactionSettingsColumn
# revision identifiers, used by Alembic.
revision: str = "d0880aae6cee"
down_revision: Union[str, None] = "2e5e90d3cdf8"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.add_column("agents", sa.Column("compaction_settings", CompactionSettingsColumn(), nullable=True))
def downgrade() -> None:
op.drop_column("agents", "compaction_settings")