Skip to content
English

执行与工作流 ​

Core · 接口与运行保证 · 返回本层目录

符号类别用途
AgentBranchinterfaceImmutable identity of one branch of an agent. The three required ids are generated per engine unless the host restores a branch; the optional ids are only present on a fork and record the exact origin, so a forked run can be attributed without consulting external storage.
AgentCacheAddressinterfaceExact immutable address passed to the App port, including cancellation for this visit.
AgentCacheOptionsinterfacePersistent and volatile storage are independent; there is no implicit fallback or mirroring.
AgentCachePortinterfaceApp-owned storage. Capacity, expiry, serialization and user isolation belong to the App.
AgentCheckpointinterfaceIn-memory checkpoint with a copy-on-read accessor. The stored data is already a clone, and read clones again, so a caller cannot mutate the checkpoint by mutating what it read.
AgentCheckpointRecordinterfaceHost-owned serializable data, never a saved credential, model budget or executable handler.
AgentCoreEngineclassBounded execution shared by applications; business rules are registered by each host. Configuration is bound before a run and may be bound only once per model, tool runtime and workflow. A run resolves its signal from the engine, the request runtime and the caller, then executes either the bound workflow or a supplied step function until the round budget, cancellation or a completion stops it.
AgentCoreEngineOptionsinterfaceEngine construction options.
AgentCoreEngineSetuptypeEngine construction options. Combines round budget and error factories with exactly one model shape (a single bound model or a named catalog), an optional tool runtime, an optional branch identity, and an optional workflow together with its App dependencies.
AgentModelBindingtypeModel binding accepted by the engine. Execution scope belongs to the engine, so a bound model may not carry its own signal or execution options.
AgentModelRuntimetypeThe subset of a runner an engine may drive; kept small so the App can supply it.
AgentWorkflowclassExecutable catalog: validate references and bounded cycles before any handler runs. Validation happens once, at construction, so traversal can assume every target exists and every cycle is budget-bounded.
AgentWorkflowDefinitiontypeThe graph an engine executes.
AttemptBudgetclassSuccessful acquisitions consume attempts; a refused acquisition never grants another. available is a snapshot of the counter, not a reservation: a caller must still call take and honor its boolean result before acting.
CacheContextinterfaceCache access shared by workflow visits and the low-level $step loop.
CacheReadOptionsinterfaceOnly reads may name another node. Partition names are not authorization boundaries.
CoreSteptypeOne loop iteration. Must be re-entrant: the same step object runs every round.
defineWorkflowfunctionBuild a validated workflow from a definition.
EngineCacheOptionsinterfaceOptional Engine memory bounds; TTL is measured from the latest write.
ExecutionEventDescriptorinterfaceEvent name, content class and the producing execution identity.
ExecutionObserverinterfaceLive consumer of Core facts.
LoopEventinterfaceProgress fact for one loop round, correlated with the enclosing diagnostics span.
NodeAgentCacheinterfaceAsync node view. Writes and clear can only address the current partition.
NodeCacheinterfaceSynchronous view of the current node's Engine-owned memory. Values retain identity.
requireWorkflowValuefunctionRead a state field that must already be present. Used by requires declarations and terminal deliveries, so a node cannot observe a field as undefined and silently produce a wrong result.
routefunction
StepOutcometypeDecision a step returns to the engine.
WorkflowChaininterfaceObserved visits, never merged by static node id or synthesized from adjacency.
WorkflowChainCoverageinterfaceCapture completeness is independent of whether diagnostic content was included.
WorkflowChainNodeinterfaceA single node visit, with flat ordered subflow records including every independent fix.
WorkflowChainNodeEventinterfaceNode-local lifecycle facts; payload remains subject to the source's content policy.
WorkflowChainSourcetypeApp resolves authorization, retention, pagination and storage paths before returning.
WorkflowChainTransitioninterfaceActual handoff evidence; a target span does not prove its enter event was captured.
WorkflowContextinterfaceExecution facts available to every node of a running workflow.
WorkflowEventinterfaceMetadata only: never includes state, prompt, parameters, results or raw errors.
WorkflowExtensioninterfaceAdditional nodes and routes merged into an existing definition.
WorkflowFailureinterfaceError retained only while entering a registered failure phase.
WorkflowGraphinterfacePure registered topology; routes sharing a target share an edge within one kind.
WorkflowGraphEdgeinterfaceCompletion has no target node; recovery edges remain distinct from normal edges.
WorkflowGraphNodeinterfaceNode metadata and derived incident edges, without executable callbacks.
WorkflowGraphRouteinterfaceDeclaration order is retained even when multiple routes share a topology edge.
WorkflowModelinterfaceModel and tool access for one workflow invocation. Every call is charged to the workflow's shared budget. Overloads select the transport: a prepared call, the default plain-text transport, or one registered transport with its typed result.
WorkflowNodetypeOne node of the graph.
WorkflowNodeReportinterfaceDetail an App node reports about its current visit.
WorkflowRoutetypeOne route out of a node. Routes are evaluated in array order and the first match wins. A route either continues at targetNodeId or completes the workflow through complete; declaring both is invalid.
WorkflowSubflowRecordtypeHistorical subflow snapshots may omit recorder fields or descriptive content.

接口参考、使用示例与开发指南。