Skip to content

Python: middleware: terminate flag behavior vs explicit raising  #3581

@eavanvalkenburg

Description

@eavanvalkenburg

The terminate flag in AgentRunContext needs better documentation to explain the difference between terminating at the agent level vs returning.

File: python/packages/core/agent_framework/_middleware.py
Location: Line ~72

\\python
terminate: A flag indicating whether to terminate execution after current middleware. # <- we need to better explain what this means, at the agent level, vs returning
\\

Action: Improve documentation to clarify the semantics of terminate at the agent level versus returning from middleware.

Parent issue: #3575

Metadata

Metadata

Labels

pythonv1.0Features being tracked for the version 1.0 GA

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions