langgoap.StoreExecutionHistory#
- class StoreExecutionHistory(store, *, index_limit=100)[source]#
Execution history backed by a LangGraph
BaseStore.- Parameters:
store (BaseStore) – Any
BaseStoreimplementation.get/putare the only methods invoked (plusaget/aputon the async path).search()is never called — see module docstring for the rationale.index_limit (int) – Maximum number of execution IDs kept in a single reverse-index entry. Defaults to 100 which is enough for most diagnostic use cases without incurring large per-write overhead.
Example:
store = InMemoryStore() history = StoreExecutionHistory(store) history.record(ExecutionRecord(...)) recent = history.query_by_goal("goal_abc", limit=5)
- __init__(store, *, index_limit=100)[source]#
- Parameters:
store (BaseStore)
index_limit (int)
- Return type:
None
Methods
__init__(store, *[, index_limit])aquery_by_goal(goal_hash[, limit])Async variant of
query_by_goal().aquery_failures(action_name[, limit])Async variant of
query_failures().arecord(record)Async variant of
record().goal_hash_for(goal)Return the goal-index key this history would file
goalunder.query_by_goal(goal_hash[, limit])Return up to
limitmost-recent records forgoal_hash.query_failures(action_name[, limit])Return up to
limitmost-recent failed runs that touchedaction_name.record(record)Persist
recordand update the reverse indexes.