Search documentation

Browse Awaken Agents docs
Docs/Awaken Agentsv1.0.0-dev/Internal mechanisms/UnderstandGlossary
Note·You're reading pre-release documentation (v1.0.0-dev). Interfaces and behavior may change before a stable release.

Internal mechanisms · Understand

Glossary

What this page covers

Definitions of the core Awaken terms — runtime, thread, run, phase, typed state, plugins, tools, and serving — in English and Chinese.

Term中文Description
Thread会话线程Persisted conversation + state history.
Run运行One execution attempt over a thread.
Phase阶段The committed run status: Phase { Running, Waiting, Ended(EndCause) }. It is not a sequence of named lifecycle steps — the points a hook observes within a step are the separate PhaseHookPoint enum.
PhaseHookPoint阶段钩子点The five points a phase hook may observe within one step: StepStart, BeforeInference, AfterInference, AfterTool, StepEnd.
EndCause结束原因Why a run ended: NaturalEnd, MaxSteps, Cancelled, Stopped(reason), or Error(Failure).
Runtime智能体运行时The embeddable execution engine (awaken-runtime). Runtime::run consumes a ExecutableAgentSnapshot; it owns the model/tool loop, commit boundary, permission gate, and resolver.
AgentConfig智能体规约Serializable agent definition authored through config: instructions, model_binding, tool_ids, plugin_ids, per-plugin config, and context policy.
ExecutableAgentSnapshot快照The resolved, serializable agent snapshot the runtime installs and executes; carries a CatalogFingerprint.
AgentEvent智能体事件The neutral, post-commit projection of a run (seven variants); each protocol Transcoder maps it to a wire format.
Key状态地址The plain string newtype used by the persisted Command/Store core; it requires no registration.
StateKey类型化状态视图An optional typed whole-value view that fixes a key’s address, scope, merge policy, and value shape while producing the same Command. FoldStateKey adds deterministic typed updates.
Command状态命令One staged state transition { key, scope, merge, action }, where action is Set(value) or Remove. Producers stage commands; the commit boundary validates and applies them.
Scope键作用域The declaration scope of a key: Run, Thread, Shared, or Profile. Binding to a concrete run/thread happens at commit.
MergePolicy合并策略How concurrent writes to one (scope, key) reconcile in a commit batch: Disjoint (later write replaces), Commutative (object values shallow-merge, non-object replace), or Exclusive (a second write in one batch is a conflict → Failure::StateConflict).
Store状态映射The materialized read side — a (scope, key) → value map rebuilt from committed commands for replay. Hooks and gates receive a read-only &Store.
Plugin插件A unit of runtime extension: declares a PluginManifest + CapabilityBound and contributes tools, state keys, phase hooks, tool gates, and run-end guards through Plugin::resolve.
Contributions插件贡献The bundle a Plugin::resolve returns — tools, state keys, phase hooks, tool gates, tool observers, run-end guards, and dynamic tools — merged into ResolvedExecutionEnv.
CapabilityBound能力边界The declared upper bound of what a plugin may contribute (tool ids, state keys, phase hooks, gates, guards, …). Actual contributions must be a subset, or the run fails closed with Failure::CapabilityBound.
PhaseHook阶段钩子An async hook bound to one PhaseHookPoint; returns a HookReaction that stages Commands. It runs at five points including AfterTool (which reacts to a tool result). At BeforeInference it injects request-only context by writing the ContextMessages state key, which is never committed to the transcript.
ToolGateHook工具闸门钩子A pre-execution hook that decides whether a tool call is allowed, blocked, short-circuited, suspended, or scheduled. It can only restrict, never grant.
RunEndGuard运行结束守卫A guard consulted at the natural-end boundary; returns RunEndDecision::{Complete, Steer}. The first guard that steers wins, otherwise the run ends.
Tool工具A model-callable capability with an id, JSON-Schema parameters, and a call/invoke implementation returning a ToolOutput.
ToolDescriptor工具描述符Model-visible tool metadata: id, description, parameters schema, content hash. Carries no executable handle.
ToolOutput工具结果A tool call’s result: { call_id, content, is_error, state: Vec<Command> }.
HookReaction钩子反应What a phase hook returns: staged Commands plus committed messages. An AfterTool hook’s messages reach the transcript; request-only context is not a message here — it is the ContextMessages state key written at BeforeInference.
ResumeTicket挂起票据The committed record of a parked run (correlation/run/thread/snapshot ids, catalog fingerprint, AwaitReason, pending tool, deadline). A resume is accepted only on an exact match.
AwaitReasonAwait reasonWhy a Run is Awaiting: ToolPermission, UserInput, ExternalEvent, RateLimit, ManualPause, ScheduledAction, or Delegation.
RunDelegationService智能体解析器The port the runtime routes the delegation tool (agent_run) to; it runs native (in-process) or remote (A2A) sub-agents chosen by agent id, returning an DelegationStep.
RunActivation运行激活The immutable, serializable input to start a run: run id, thread id, snapshot, input, and trace.
RunIngress运行入口The delivery port for run submission and control. DirectRunIngress is the in-process path; DurableRunIngress (in awaken-run-ingress) is single-node durable with queue, recovery, and scheduled wake.
ContextPolicy上下文策略How the model-visible context window is bounded: KeepAll or KeepLast { keep_last }.
ModelSpec模型规约A catalog entry for a model: stable id, optional context window / max output / modalities / knowledge cutoff, and pricing. Referenced by a stable id from an agent’s model binding.
Transcoder流转码器A stateful per-protocol mapper from the AgentEvent stream to a protocol’s wire format; there is no single fixed wire envelope.
TokenUsage令牌用量Token consumption report from LLM inference.
CancellationToken取消令牌Cooperative token threaded through a run to request cancellation (EndCause::Cancelled).