Skip to content

feat: add LocalFileTaskResultStore for caching task results locally#178

Merged
afarntrog merged 1 commit intostrands-agents:mainfrom
afarntrog:eval_store_filesystem
Mar 26, 2026
Merged

feat: add LocalFileTaskResultStore for caching task results locally#178
afarntrog merged 1 commit intostrands-agents:mainfrom
afarntrog:eval_store_filesystem

Conversation

@afarntrog
Copy link
Contributor

@afarntrog afarntrog commented Mar 26, 2026

Description

Add LocalFileTaskResultStore, a task result store backed by local JSON files that caches EvaluationData per case. This enables persisting and reloading task results across experiment runs without requiring an external data store.

  • Implement LocalFileTaskResultStore with save() and load() methods using Pydantic JSON serialization
  • Auto-create the storage directory on initialization
  • Export the class from the strands_evals package __init__.py

Related Issues

Documentation PR

Type of Change

New feature

Testing

Added unit tests in tests/strands_evals/test_local_file_task_result_store.py covering:

  • Round-trip save and load preserves all EvaluationData fields

  • Loading a nonexistent case returns None

  • Constructor creates nested directories automatically

  • Saved files contain valid JSON with expected content

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Introduce a new LocalFileTaskResultStore class that persists evaluation
task results as JSON files on the local filesystem. Each case is saved
as a separate file using the case name as the filename.

Includes unit tests and exports the class from the public API.
@afarntrog afarntrog merged commit 02f4bda into strands-agents:main Mar 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants