Skip to content

feat(lifecycle): add in-memory execution recorder - #890

Open
Whxuan0701 wants to merge 1 commit into
apache:mainfrom
Whxuan0701:agent/in-memory-execution-recorder
Open

Whxuan0701 wants to merge 1 commit into
apache:mainfrom
Whxuan0701:agent/in-memory-execution-recorder

Conversation

@Whxuan0701

Copy link
Copy Markdown

Provide a lightweight lifecycle adapter for asserting and debugging agent execution paths without configuring a tracking backend.

Changes

  • add InMemoryExecutionRecorder using the existing pre- and post-step lifecycle hooks
  • capture application identifiers, action order, inputs, results, exceptions, and business-state changes
  • distinguish missing state fields from fields whose value is None
  • exclude Burr's private __ state fields and expose frozen records through a tuple snapshot
  • use best-effort field snapshots so non-copyable runtime handles do not block the application
  • support synchronous and asynchronous applications and document harness usage

How I tested this

  • pre-commit run --all-files
  • python -m pytest tests --ignore=tests/integrations/persisters --ignore=tests/integrations/test_bip0042_bedrock.py -q (650 passed, 1 skipped)
  • python -m sphinx -T -W --keep-going -b dirhtml -d <doctrees> -D language=en . <html> from docs/

Notes

This is intentionally in-memory and process-local. It complements, rather than replaces, Burr's tracking and persistence integrations.

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@github-actions github-actions Bot added area/core Application, State, Graph, Actions area/hooks Lifecycle hooks, interceptors area/website burr.apache.org website labels Aug 18, 2026

This branch has not been deployed

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

Labels

area/core Application, State, Graph, Actions area/hooks Lifecycle hooks, interceptors area/website burr.apache.org website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant