Skip to content

[WASM] Integration tests: App state and model state #2381

@awsarron

Description

@awsarron

Parent issue

strands-agents/sdk-typescript#1104

Scope

Write integration tests validating state management across invocations:

  • agent.get_app_state() / agent.set_app_state() - arbitrary JSON state
  • agent.get_model_state() / agent.set_model_state() - provider-specific state
  • State persists across multiple invocations on same agent instance
  • State round-trips correctly through WIT (serialization fidelity)
  • Session save/load preserves state

Context

App state and model state are get/set via WIT resource methods on the agent. They cross the WASM boundary as JSON-compatible values. Session managers can persist these alongside messages.

Key areas:

  • Complex nested JSON structures survive the WIT round-trip
  • State is accessible between invocations without re-initialization
  • Session save captures state, session load restores it

Done when

  • App state set/get works with primitive and nested values
  • Model state set/get works
  • State persists across multiple invocations
  • Session save/load preserves both state types
  • Edge cases: empty state, large state, null values

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-persistenceSession management or checkpointingenhancementNew feature or requestpythonPull requests that update python code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions