Agent
Tool calling in a loop
Challenge
A few primitives
Context Engineering Principles
Offload — Move context from the LLM context window to the filesystem.
Reduce — Reduce the size of context pass to the LLM.
Isolate — Isolate context windows for tasks.
Offload Context
Offload context to filesystem
Let agent write to filesystem
This lets it save / recall information during long-running agent rollouts
This lets it save persistent memories across agent invocations
Offload actions from tools to scripts stored on filesystem
Many tools are confusing to agents
Many tools require instructions that bloat system prompt
SOTA agents increasingly use small number of atomic, general tools
Agent use “progressive disclosure” to discover actions
This metadata is the first level of progressive disclosure: it provides just enough information for Claude to know when each skill should be used without loading all of it into context. The actual body of this file is the second level of detail. If Claude thinks the skill is relevant to the current task, it will load the skill by reading its fullSKILL.mdinto context.
Tools in deep agents package
Tool Name | Location | Description |
|---|---|---|
write_todos | Creates and manages todo lists for tracking complex tasks | |
ls | filesystem.py:256-264 | Lists files in a directory (requires absolute path) |
read_file | filesystem.py:267-293 | Reads files with pagination support (offset/limit) |
write_file | filesystem.py:296-337 | Creates new files with content |
edit_file | filesystem.py:340-383 | Performs exact string replacements in files |
glob | filesystem.py:386-407 | Finds files matching glob patterns (e.g., **/*.py) |
grep | filesystem.py:410-440 | Searches for text patterns in files |
task | Launches ephemeral subagents for complex isolated tasks |
Tools in deep agents CLI
Tool Name | Location | Description |
|---|---|---|
write_todos | Via create_deep_agent | Todo list management |
All filesystem tools | Via create_deep_agent | ls, read_file, write_file, edit_file, glob, grep |
task | Via create_deep_agent | Subagent launcher |
shell | agent.py:143-145 | Execute shell commands with HITL support |
http_request | tools.py:17-89 | Make HTTP requests (GET, POST, PUT, DELETE) |
web_search | tools.py:92-140 | Web search using Tavily API (requires API key) |
Reduce Context
Isolate Context
Summary
Principle | Manus | Deep Agents CLI | ||
|---|---|---|---|---|
Offload context | Use filesystem | Yes | Yes (E2B) | Yes |
Enable user memories | Yes ( CLAUDE.md ) | Yes | Yes ( memories dir, agent.md ) | |
Minimize tools | Yes (~12) | Yes (<20) | Yes (11) | |
Give agent computer (bash tool) | Yes | Yes | Yes | |
Progressive disclosure of actions | Yes (skills) | Yes | WIP | |
Reduce context | Compaction | Yes | Yes | No |
Summarization | Yes | Yes | Yes | |
Isolate context | Sub-agents | Yes | Yes | Yes |