Skip to main content
AgentModule owns strategy and state transitions; Engine drives observe, decide, act, reduce and stopping. Decision.act declares actions and Decision.final ends the strategy. EngineResult contains state and typed step records; reduce observes dictionaries. Use the custom Agent tutorial for the complete wiring. RuntimeComposition defaults to a process-local store. AgentModule.run remains a programmatic convenience, not the canonical declarative setup. 完整可运行教程 / Complete tutorial · API index Signatures and fields below are extracted from the pinned source. Signatures are reference material, not standalone programs. Source links bind the same runtime baseline. Any does not imply arbitrary objects are supported; use the behavioral contract above and the linked tutorial.

AgentModule

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

AgentModule.init_state

Source

AgentModule.decide

Source

AgentModule.reduce

Source

AgentModule.should_stop

Source

AgentModule.run

Source

StateSchema

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

Task

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

Decision

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

Decision.act

Source

Decision.final

Source

Action

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

Engine

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

Engine.session

Source

Engine.run

Source

Engine.restore

Source

EngineResult

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

RuntimeBudget

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

StopReason

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.

RuntimeComposition

Source @ 19f6258 Usage and executable example Usage fragment: continues with objects from the linked complete tutorial; not a standalone program.