nanobot and Agent development glossary

Core execution

TermMeaning in this libraryCurrent source anchor
AgentA software runtime that accepts a goal and combines a model, context, and Tools to advance the task; it is not a single LLM requestnanobot/agent/loop.py, nanobot/agent/runner.py
TurnOne top-level processing lifecycle triggered by an inbound message; it may contain multiple model requests and Tool CallsAgentLoop._process_message()
AgentLoopManages outer Turn state, Session, commands, persistence, response delivery, and concurrency boundariesnanobot/agent/loop.py::AgentLoop
AgentRunnerRepeatedly calls a Provider, parses Tool Calls, executes Tools, and feeds results back to the model within one runnanobot/agent/runner.py::AgentRunner
ContextBuilderAssembles the system prompt, workspace files, Skills, history, and current input into model contextnanobot/agent/context.py::ContextBuilder
ProviderAdapts nanobot’s unified model request and response contract to a particular model backendnanobot/providers/base.py::LLMProvider
LLMResponseThe unified response object returned by a Provider to the Runner; includes text, reasoning, Tool Calls, usage, and related datananobot/providers/base.py::LLMResponse
Tool CallA structured request from the model for its host to execute a Tool; the model is not itself running Python or shellnanobot/providers/base.py::ToolCallRequest
stop reasonWhy the Runner ended this run, not merely its final textnanobot/agent/runner.py, AgentRunResult.stop_reason

Messages, events, and Sessions

TermMeaningCurrent source anchor
InboundMessageA business message sent from an entry point into core, including channel, sender, chat, content, media, and metadatananobot/bus/events.py
OutboundMessageUser-visible output handed by core to a Channel or direct callernanobot/bus/events.py
MessageBusAsynchronous queues for inbound and outbound business messagesnanobot/bus/queue.py::MessageBus
RuntimeEventBusIn-process publish/subscribe bus for runtime state; it does not carry ordinary chat contentnanobot/bus/runtime_events.py::RuntimeEventBus
SessionPersistable conversation history and metadata used for recovery across Turnsnanobot/session/manager.py::Session
Session keyA Session’s logical identifier; by default it is based on channel:chat_id, but callers can override itnanobot/session/keys.py, InboundMessage.session_key
model contextThe messages, system prompt, and Tool schemas actually sent in one Provider callnanobot/agent/context.py, nanobot/agent/runner.py
checkpointA temporary recovery point during Tool execution that protects context after cancellation or failurenanobot/agent/runner.py::_emit_checkpoint, nanobot/agent/loop.py::_restore_runtime_checkpoint
compactionCompressing Session history at token or idle boundaries to reduce later context loadnanobot/agent/memory.py::Consolidator, nanobot/agent/autocompact.py
MemoryLong-term knowledge material the Agent reads and writes in the workspace; it is not raw Session historynanobot/agent/memory.py
DreamA mechanism that periodically starts an isolated Session and invokes the Agent to organize long-term memoryDream helpers in nanobot/agent/memory.py, system tasks in nanobot/cli/commands.py

Capabilities and extensions

TermMeaningBest suited to
ToolAn action with an explicit JSON schema that the host executes and returns as structured data or text“Let the Agent perform a specific action”
ToolRegistryRuntime container that registers, lists, validates, and executes ToolsEnforcing a unified Tool contract
Tool loaderDiscovers built-in Tools, package modules, and nanobot.tools entry pointsPlugin-based Tool integration
SkillInstructions, procedures, and resources injected for the model to guide a class of tasks“Teach the Agent how to do something”
MCPConnects to an external MCP server and wraps remote capabilities as nanobot ToolsReusing an independent Tool service
ProviderModel-backend protocol adapterReplacing or adding an LLM backend
ChannelAdapter between an external chat platform and InboundMessage/OutboundMessageAdding a messaging platform
GatewayComposes long-running services such as AgentLoop, Channels, Cron, Heartbeat, and WebUIPersistent operation with several entry points
SDKPublic interface for invoking the nanobot runtime within a Python processEmbedding nanobot in a Python application
HTTP APIOpenAI-compatible network interfaceLetting external programs invoke nanobot over HTTP

Long-running work

TermMeaningDo not confuse with
GoalPersistent goal state stored in Session metadataAn ordinary one-shot prompt
ContinuationA control boundary that starts another Agent run within the same top-level TurnA new user message
SubagentA child-task runtime spawned by the main Agent with its own execution contextAn ordinary parallel Tool
CronPersistent scheduling of actions by at, every, or cron expressionHeartbeat itself
HeartbeatA periodic check or wake-up mechanism currently backed by CronAn operating-system health check

Security and reliability

TermMeaningBoundary
workspace restrictionApplication-level path policy that attempts to constrain file Tools to the workspaceIt is not automatically OS isolation
sandboxA stronger execution boundary for commands, files, or network; the current bwrap path depends on Linux/container conditionsA Windows configuration name does not prove enforcement
SSRFManipulating a server into accessing localhost, private networks, reserved addresses, or unsafe redirectsRequires checks across URL, DNS, and redirect layers
fallbackTrying candidate models or Providers after the primary Provider failsNot every failure should switch
retryRepeating a retryable failure against the same Provider or actionNot the same as fallback
atomic writeWriting a temporary file and replacing the target to avoid leaving half-written stateDoes not provide a multi-file transaction

Commonly confused relationships

flowchart LR
    A["Turn<br/>one top-level lifecycle"] --> B["Multiple Provider calls"]
    B --> C["Zero or more Tool Calls"]

    D["Session<br/>persistent history"] --> E["ContextBuilder selects and transforms"]
    E --> F["Model context<br/>actual input for this call"]

    G["MessageBus<br/>business messages"] -.different.-> H["RuntimeEventBus<br/>runtime state"]
    I["Skill<br/>teaches the model how"] -.different.-> J["Tool<br/>host executes an action"]
    J -.one remote source.-> K["MCP server"]

Return to Quick reference.