Repositories / OpenClaw
Focused tour of agent execution, memory search, and tool orchestration; not a whole-project map.
Every file below is part of the bounded architecture snapshot and can be opened as source evidence.
Merges vector and keyword results with optional diversity and temporal-decay reranking.
Runs built-in memory retrieval across vector and keyword indexes before combining ranked results.
Selects and caches the configured QMD or built-in memory search manager for an agent.
Resolves the agent-scoped memory manager through the lazily loaded memory runtime.
Defines the memory_search tool and coordinates bounded retrieval, visibility filtering, ranking, and citations.
Wraps executable tools with pre-call policy, approval, diagnostic, and terminal-result behavior.
Assembles core, shell, channel, plugin, and searchable tools into the effective agent tool surface.
Narrow execution boundary that hands a prepared request to the embedded run loop.
Controls embedded-agent attempts, recovery, model fallback, compaction, and terminal outcomes.
Public embedded-agent entry point that resolves runtime configuration and coordinates one prepared run.
Prepares workspace, prompt, runtime plan, authentication, and trajectory context for an execution attempt.
Builds the base tool set for an attempt from model, workspace, sandbox, and capability constraints.
Executes one embedded-agent attempt, preparing tools, session state, prompt context, and the guarded model stream.
Applies layered tool policies in runtime order and emits bounded diagnostics for filtered tools.