Skip to content

BUG - Event Compaction model validate error #3707

Closed

Description

@MahorShekhar

During Event Compaction, getting error

  File "/Users/Shekhar/agno_ai_poc/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 365, in _run_one_step_async
    async for event in agen:
      yield event
  File "/Users/Shekhar/agno_ai_poc/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 455, in _preprocess_async
    async for event in agen:
      yield event
  File "/Users/Shekhar/agno_ai_poc/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/contents.py", line 53, in run_async
    llm_request.contents = _get_contents(
                           ~~~~~~~~~~~~~^
        invocation_context.branch,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
        invocation_context.session.events,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        agent.name,
        ^^^^^^^^^^^
    )
    ^
  File "/Users/Shekhar/agno_ai_poc/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/contents.py", line 378, in _get_contents
    events_to_process = _process_compaction_events(raw_filtered_events)
  File "/Users/Shekhar/agno_ai_poc/venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/contents.py", line 298, in _process_compaction_events
    compaction.start_timestamp is not None
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'start_timestamp'

Activity

  1. EdmondDantes21 commented on Nov 25, 2025

    @EdmondDantes21

    In case you are also using DatabaseSessionService: #3487

  2. added
    services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc
    on Nov 25, 2025
  3. Divyadarshee commented on Nov 27, 2025

    @Divyadarshee
  4. DeanChensj commented on Nov 27, 2025

    @DeanChensj
    Collaborator

    Hi @MahorShekhar , this should be addressed in 0094eea where we replace the individual column with a single JSON serialization.

  5. Divyadarshee commented on Nov 27, 2025

    @Divyadarshee

    @DeanChensj but i am still seeing this issue in 0.1.19.

    💭 You: hi
                                                                                             
    ❌ Error: 'dict' object has no attribute 'start_timestamp'
    Traceback (most recent call last):
      File "C:\Users\div\OneDrive\Desktop\agents\cli.py", line 168, in main
        async for event in runner.run_async(
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\runners.py", line 454, in run_async
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\runners.py", line 442, in _run_with_trace
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\runners.py", line 654, in _exec_with_plugin
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\runners.py", line 431, in execute
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\agents\base_agent.py", line 291, in run_async
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\agents\llm_agent.py", line 460, in _run_async_impl
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\flows\llm_flows\base_llm_flow.py", line 346, in run_async
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\flows\llm_flows\base_llm_flow.py", line 365, in _run_one_step_async
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\flows\llm_flows\base_llm_flow.py", line 455, in _preprocess_async
        async for event in agen:
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\flows\llm_flows\contents.py", line 53, in run_async
        llm_request.contents = _get_contents(
                               ^^^^^^^^^^^^^^
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\flows\llm_flows\contents.py", line 378, in _get_contents
        events_to_process = _process_compaction_events(raw_filtered_events)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\div\OneDrive\Desktop\agents\.venv\Lib\site-packages\google\adk\flows\llm_flows\contents.py", line 298, in _process_compaction_events
        compaction.start_timestamp is not None
    
  6. DeanChensj commented on Nov 27, 2025

    @DeanChensj
    Collaborator

    Hi @Divyadarshee , the fix is not in the latest release yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions