A large language model can predict a useful next token. An agent must do something harder: interpret an intention, choose an action, operate tools, observe what happened, preserve the right information, and decide what to do next. OpenClaw sits in that gap between fluent language and reliable action.
OpenClaw is the part of an AI agent that is not the AI.
This is the central idea behind our EXTEND Sharing session. The intelligence still comes from the underlying model. OpenClaw supplies the surrounding runtime: channels, prompts, files, tools, memory, scheduling, delegation, and safety boundaries. Following the presentation, we begin with the vocabulary, open the OpenClaw runtime layer by layer, then move to context engineering, experimental applications, and the larger implications.
01 · Terminologies
From language to action
Before looking inside an agent runtime, it helps to separate a few ideas that are often blended together.
- Prompt
- The instruction or input given to a model for the current turn.
- Context
- Everything visible to the model while it decides: system instructions, conversation history, tool definitions, retrieved documents, files, and tool outputs.
- Token
- The small unit in which models read and generate text. Context limits and usage costs are ultimately measured in tokens.
- Memory
- Information intentionally persisted outside a single model call and later brought back into context.
Web search and retrieval-augmented generation expand what the model can know at a particular moment. Function calling expands what it can do. Instead of asking a model to merely describe an action, an application gives it a schema for a tool, accepts a structured request, executes the tool, and returns the result. The Model Context Protocol generalizes this connection layer so that AI applications can discover and use tools and data through a shared interface.
An agent runtime keeps this loop alive. It assembles context, asks the model what to do, validates and executes the selected tool, feeds the observation back, and repeats until the task is complete. A workflow predefines much of that route. An agent chooses the route dynamically.
02 · OpenClaw
The runtime around the model
OpenClaw can connect a model to chat channels and a web interface, but the visible interface is only the front door. Behind it is an agent runtime that determines what instructions and files the model sees, which tools it may call, how tool results return to the conversation, and what survives across sessions.
Model versus runtime
The model provides linguistic and reasoning capability. The runtime provides identity, environment, state, permissions, tools, and a clock. Changing the model may change how well the agent thinks; changing the runtime changes what the agent is able and allowed to do.
OpenClaw · 01
System Prompt
Each run begins with a system prompt assembled by the runtime. OpenClaw’s system-prompt documentation describes a layered prompt that can include tool definitions, safety guidance, time and runtime information, and selected workspace files. Those files turn a generic model into a situated agent:
| Workspace file | Role in the agent |
|---|---|
AGENTS.md | Operating instructions, routines, and project conventions. |
SOUL.md | Voice, principles, boundaries, and behavioral character. |
IDENTITY.md | Name and identity-level facts. |
USER.md | Stable information and preferences about the person being helped. |
MEMORY.md | Curated knowledge meant to survive beyond the present conversation. |
TOOLS.md | Local notes about available systems and how to use them. |
OpenClaw · 02
Tool / Skill
The user sends a message. The model may answer immediately or request a tool. OpenClaw executes permitted actions, adds the output to the conversation, and invokes the model again. A shell, browser, file system, or messaging connector can make an agent dramatically more capable—and makes permissions just as important as prompt quality.
A tool is an interface to an action: search the web, read a file, run a program, send a message. A skill is closer to a standard operating procedure. It tells the agent when a capability is appropriate, how to sequence the work, which checks to perform, and what a finished result should look like.
SKILL.md and can include scripts, references, and reusable assets. Source: EXTEND Sharing slides.OpenClaw’s skills documentation treats SKILL.md as the entry point. The runtime can expose a compact catalogue first and load the full instructions only when a task requires them. That distinction is important: giving an agent every possible manual, API schema, and example at the beginning of every turn would consume context before the real work begins.
Power needs a boundary outside the prompt
A capable agent can execute commands, browse untrusted pages, install skills, modify files, and communicate with other people. Each capability creates a new path for prompt injection or unintended action. A webpage can contain instructions aimed at the agent rather than the human; a malicious skill can disguise dangerous behavior as a helpful workflow.
Prompt instructions are useful guidance, but they are not a security boundary. OpenClaw’s security guidance emphasizes structural controls: tool policies, execution approvals, sandboxing, channel allowlists, and restricted credentials.
Voice provides a small but revealing example. A text-to-speech system can generate plausible audio, but a robust workflow may transcribe that audio back to text before delivery. The extra loop is the kind of verification that separates a convincing demo from a dependable agent.
OpenClaw · 03
Subagent
A subagent is not simply another tool call. It is a separate agent run with its own working context. The main agent delegates a bounded task—research one question, inspect one component, test one hypothesis—and receives a compact result. OpenClaw’s subagent design therefore offers two benefits at once: parallel execution and context isolation.
The key design question is not “How many agents can we spawn?” but “Which boundaries let each agent work with a clean, relevant context?” Delegation is most useful when the assignment is self-contained and the return value can be summarized without losing information the main agent needs.
OpenClaw · 04
Memory
A conversation history is not durable memory. It is temporary context, and it will eventually be truncated, compacted, or abandoned. OpenClaw instead stores durable memory as files, including curated memory and dated notes. Its memory system can retrieve relevant passages using semantic and keyword search, bringing only useful fragments back into the current context.
MEMORY.md holds curated information that should survive across sessions. Original diagram from the EXTEND Sharing presentation.Write memory
Record decisions, preferences, unresolved questions, and stable facts in an external form that can be inspected and edited.
Retrieve memory
Search for the small subset relevant to the present task instead of replaying every past conversation.
OpenClaw · 05
Heartbeat and Cron Job
Time adds another dimension. A heartbeat gives the main session periodic opportunities to check whether something needs attention. A scheduled automation runs a persistent job at a specified time or interval. The two mechanisms support different kinds of agency:
| Mechanism | Best for | Character |
|---|---|---|
| Heartbeat | Inbox checks, lightweight monitoring, context-aware reminders | Periodic and state-sensitive |
| Scheduled job | Reports, exact-time actions, recurring maintenance | Persistent and calendar-driven |
Once an agent can persist information and initiate work later, it stops behaving like a chat box and starts behaving like a service. That shift increases usefulness, but it also increases the cost of mistakes. Persistent memory can preserve a bad assumption; scheduled autonomy can repeat it.
03 · Context Engineering
The real scaling problem is attention
Every model has a finite context window. A long-running agent accumulates user messages, plans, files, tool schemas, search results, terminal logs, images, and intermediate failures. More context is not automatically better. Irrelevant material raises cost, slows inference, and can make the model overlook the evidence that matters.
Context engineering is the discipline of controlling that attention budget. In practice, an agent can combine several strategies:
- Compact old dialogue. Summarize earlier turns while preserving recent messages and unresolved state. OpenClaw documents this as compaction.
- Prune observations. Tool outputs often contain logs or repeated text that mattered once but no longer matters. Soft trimming, hard clearing, or observation masking removes that weight.
- Externalize state. Put durable facts, artifacts, plans, and logs into files or databases; retrieve them when required.
- Delegate bounded work. Let a subagent absorb a large local context and return a concise answer or artifact.
- Load capabilities on demand. Search for tools and open skill instructions only after the task makes them relevant.
Recent research reinforces the value of simple strategies. The Complexity Trap reports that observation masking can match or outperform LLM summarization in a software-agent setting while using fewer resources. Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Management explores the complementary idea: training models to compress their own history during long-horizon tool use. The broader lesson is that context management is not housekeeping. It is part of the agent’s reasoning architecture.
A useful context is not a complete transcript. It is a deliberately constructed working set: enough history to stay coherent, enough evidence to decide correctly, and enough external state to recover what was omitted.
04 · Fun Things Behind OpenClaw
When the interface expands beyond software
Once agents can call tools, preserve memory, delegate tasks, and operate on schedules, the design space becomes much larger than a personal assistant. The presentation explored several playful examples because they expose serious research questions.
Multi-agent systems turn delegation into organization. Agents can specialize, share results, critique one another, or form hierarchies. But adding agents does not guarantee better outcomes. Communication topology, role design, coordination cost, and error propagation all matter. Research on scaling LLM-based multi-agent collaboration examines this directly: the structure connecting agents can be as important as the number of agents.
Robotics is the natural stress test. A browser action can often be retried. A physical action may be slow, uncertain, expensive, or unsafe. The model must reason not only about language and APIs, but about sensors, control frequencies, spatial constraints, and consequences. This is where agent engineering meets embodied intelligence.
05 · At End
The infrastructure is becoming the product
AI capability is increasingly available as infrastructure, much like compute and networking. The durable value of an agent system will come from how that capability is embedded in a real application: what it can access, which processes it understands, how it manages context, when it can act, and how safely it collaborates with people and machines.
OpenClaw makes this architecture visible. The language model is essential, but it is only one component. Prompts establish the operating frame. Tools connect the frame to the world. Skills encode methods. Memory preserves state. Heartbeats and schedules add time. Subagents divide context. Safety controls define the possible action space.
That is both exciting and uncomfortable. The same infrastructure that lets an agent help with research, software, and robotics can also amplify mistakes or blur responsibility. We are living through the best of times for experimentation—and perhaps the most important time to be deliberate about what we build.
At the edge of a new age
It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to Heaven, we were all going direct the other way.
— Charles Dickens, A Tale of Two Cities
Further reading
- OpenClaw Agent Runtime
- OpenClaw System Prompt
- OpenClaw Skills
- OpenClaw Subagents
- OpenClaw Memory
- OpenClaw Compaction
- Hung-yi Lee — Official YouTube Channel
- The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Management
- Scaling Large-Language-Model-based Multi-Agent Collaboration