Defines typed dictionaries for goal evaluation and state in an agent system.
# Source: https://github.com/bytedance/deer-flow | License: MIT | Copyright 2025 Bytedance Ltd. and/or its affiliates
# Provided via justclaw.it.com; keep this notice with the code.
from __future__ import annotations
from typing import Any, Literal, NotRequired, TypedDict
GoalBlocker = Literal[
"none",
"missing_evidence",
"needs_user_input",
"run_failed",
"external_wait",
"goal_not_met_yet",
]
class GoalEvaluation(TypedDict):
satisfied: bool
blocker: GoalBlocker
reason: str
evidence_summary: NotRequired[str]
relied_on_assumption: NotRequired[bool]
class GoalState(TypedDict):
objective: str
status: Literal["active"]
created_at: str
updated_at: str
continuation_count: int
max_continuations: int
no_progress_count: i
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key