MCPcopy Create free account
hub / github.com/langchain-ai/deepagents / _ThreadHistoryPayload

Class _ThreadHistoryPayload

libs/code/deepagents_code/app.py:1345–1396  ·  view source on GitHub ↗

Data returned by `_fetch_thread_history_data`.

Source from the content-addressed store, hash-verified

1343
1344@dataclass(frozen=True, slots=True)
1345class _ThreadHistoryPayload:
1346 """Data returned by `_fetch_thread_history_data`."""
1347
1348 messages: list[MessageData]
1349 """Converted message data ready for bulk loading."""
1350
1351 context_tokens: int
1352 """Persisted `_context_tokens` from the checkpoint (0 if absent)."""
1353
1354 model_spec: str
1355 """Persisted `_model_spec` from the checkpoint, or `""` for legacy threads
1356 saved before model persistence existed."""
1357
1358 model_params: dict[str, Any] | None = None
1359 """Persisted `_model_params` from the checkpoint, if any."""
1360
1361 rubric: str | None = None
1362 """Legacy persisted rubric or graph rubric input, if any."""
1363
1364 sticky_rubric: str | None = None
1365 """Persisted sticky rubric, if explicitly recorded by the TUI."""
1366
1367 sticky_rubric_recorded: bool = False
1368 """Whether the checkpoint explicitly recorded TUI sticky rubric state."""
1369
1370 goal_objective: str | None = None
1371 """Persisted active goal objective, if any."""
1372
1373 goal_status: GoalStatus | None = None
1374 """Persisted active goal status, if any.
1375
1376 Coerced to a known `GoalStatus` (or `None`) at construction; an unrecognized
1377 persisted value is dropped.
1378 """
1379
1380 goal_rubric: str | None = None
1381 """Persisted accepted goal criteria, if any."""
1382
1383 goal_status_note: str | None = None
1384 """Persisted evidence or blocker note, if any."""
1385
1386 pending_goal_completion_note: str | None = None
1387 """Persisted completion evidence awaiting rubric/user approval."""
1388
1389 rubric_status: str | None = None
1390 """Latest rubric grading status from `RubricMiddleware`, if any."""
1391
1392 pending_goal_objective: str | None = None
1393 """Persisted pending goal objective, if any."""
1394
1395 pending_goal_rubric: str | None = None
1396 """Persisted pending goal criteria, if any."""
1397
1398
1399def _new_thread_id() -> str:

Calls

no outgoing calls