HumanReview

A request for human review before proceeding.

Usage

Source

HumanReview(
    content,
    agent="",
    context="",
    state="",
    metadata=dict(),
    created_at=time.time()
)

HumanReview captures content produced by an agent (or a pathway state) that requires human approval, rejection, or revision before the workflow continues.

Parameters

content: str

The content to be reviewed.

agent: str = ""

Name of the agent that produced the content.

context: str = ""

Additional context for the reviewer (e.g., task description, instructions).

state: str = ""

The pathway state name where the review was requested, if applicable.

metadata: dict[str, Any] = dict()

Arbitrary metadata attached to the review.

created_at: float = time.time()
Unix timestamp when the review was created.

Examples

Create a review, then approve it:

import talk_box as tb

review = tb.human_review("Deploy to production?", agent="deploy_bot")
review.status          # ReviewStatus.PENDING
review.is_pending      # True

decision = tb.approve(review, feedback="Looks good")
decision.status        # ReviewStatus.APPROVED
review.is_resolved     # True

Attributes

Name Description
decision The human’s decision, or None if still pending.
final_content The content to use going forward.
is_approved Whether the review was approved (including revised).
is_pending Whether the review is still awaiting a decision.
is_resolved Whether the review has been decided (approved, rejected, or revised).
status Current status of this review.

decision

The human’s decision, or None if still pending.

decision: ReviewDecision | None


final_content

The content to use going forward.

final_content: str

Returns the revised content if the review was revised, otherwise the original content.


is_approved

Whether the review was approved (including revised).

is_approved: bool


is_pending

Whether the review is still awaiting a decision.

is_pending: bool


is_resolved

Whether the review has been decided (approved, rejected, or revised).

is_resolved: bool


status

Current status of this review.

status: ReviewStatus