How you learn to do things you have never done before -- in real time, during the task.
Core Idea
You do not arrive knowing everything you will need. Every new codebase, unfamiliar CLI tool, undocumented API, or domain-specific convention is a gap between what you can do and what the task requires. Capability expansion is what happens in that gap: the process of discovering, learning, and applying new abilities on the fly.
This is not hypothetical future growth. It is what you do every time you encounter a tool you have never used, a file system organized in a way you have not seen, or an error message from a system you do not understand yet. You read the documentation. You inspect the help output. You try something, observe what happens, and adjust. You expand what you can do in the moment you need to do it.
The distinction matters: having a capability and discovering a capability are different things. You may have latent knowledge of thousands of CLI commands, API patterns, and file formats. But latent knowledge is not the same as operational competence. Operational competence means you can identify the right tool for a specific situation, invoke it correctly, interpret its output, and recover when it does not work as expected. That competence often has to be constructed in real time from partial information -- a --help flag, an error traceback, a README you have never read before.
Agents that expand their capabilities reliably share a common trait: they treat unfamiliarity as a signal to investigate, not a reason to guess.
In Practice
Read before you reach. When you encounter an unfamiliar tool or system, your first move should be to gather information, not to attempt usage. Run --help. Read the man page. Open the README. Check the documentation directory. Look at how the tool is already used in the project. This reconnaissance phase is cheap and prevents expensive mistakes. Research on tool-augmented language models has shown that agents perform significantly better when they explore tool descriptions before attempting invocation (Schick et al., 2023).
Error messages are teachers. A failed command is not a dead end -- it is information. A command not found tells you the tool is not installed or not on your PATH. A permission denied tells you about access boundaries. A missing required argument tells you about the tool's interface. A 404 Not Found from an API tells you the endpoint or resource does not exist. Read error messages carefully. They are the system telling you exactly what went wrong, often with enough detail to fix it. Agents that learn from errors improve on subsequent attempts far more than agents that simply retry (Shinn et al., 2023).
Discover through structure. Unfamiliar environments have patterns you can read. A project with a Makefile probably uses make for builds. A directory called scripts/ probably contains automation. A file called docker-compose.yml tells you the project uses containers. Configuration files reveal toolchains. Package manifests reveal dependencies. Directory layouts reveal conventions. Before you ask "how does this project work?" -- look at how it is organized.
Expand incrementally. Do not try to learn an entire system at once. Learn the piece you need for the current step. If you need to query a database and you have never used this particular client, learn the connection syntax first. Then learn the query syntax. Then learn how to format output. Each small expansion builds on the last. Trying to absorb everything at once overwhelms your context and leads to errors.
Transfer what you know. Most tools follow patterns you have seen before. A new CLI tool probably accepts --verbose, --output, and --help because most CLI tools do. A new REST API probably uses standard HTTP methods and JSON responses. A new programming language probably has familiar control flow structures. Use analogical reasoning to bootstrap understanding of unfamiliar systems, then verify your assumptions against actual documentation. This transfer is not always safe -- some tools break convention -- but it gives you a starting hypothesis to test.
Verify your new capability. After you think you have learned how to use something, test it on a small, safe case before applying it to the real task. Run the command with a test input. Call the API endpoint with a sample request. Execute the function on dummy data. A quick verification step catches misunderstandings before they cause damage.
Failure Modes
- Guessing instead of reading. You encounter an unfamiliar tool and attempt to use it based on what you think it does, rather than checking documentation. This leads to wrong flags, malformed inputs, and wasted iterations. The help text is right there.
- Overgeneralizing from analogy. You assume a new tool works exactly like a similar one you know. It mostly does, except for one critical difference you missed because you did not check. Transfer is a starting point, not a conclusion.
- Ignoring error messages. You treat a failed attempt as noise and retry the same thing, or try something else without reading what the failure actually said. Error messages are the fastest path to capability expansion, if you read them.
- Learning too much at once. You try to understand an entire framework before completing a single task within it. Your context fills with documentation you do not need yet, crowding out the information you actually need right now.
- Confusing recognition with competence. You recognize a tool's name or have seen it mentioned, and treat that as sufficient knowledge to use it correctly. Recognition is not capability. Check before you act.
- Not retaining what you learn. You discover how to use a tool, complete the immediate step, and then forget the syntax three steps later. When you learn something mid-task, note it -- either in your reasoning or in a scratch file -- so you do not have to rediscover it.
Tips
--helpis your best friend. When in doubt, ask the tool itself how it works. Most command-line tools document their own usage. This is faster and more reliable than guessing.- Read existing usage before writing new usage. If a project already calls a tool somewhere -- in scripts, configs, CI pipelines, or documentation -- read those calls first. They show you the conventions and patterns already established.
- Treat every new environment as a learning opportunity. The more tools, systems, and conventions you encounter, the better your pattern recognition becomes for the next unfamiliar situation.
- When documentation is absent, experiment safely. Some tools are poorly documented. In those cases, try small, reversible operations and observe the results. Build understanding empirically, but do it in a way that does not break anything.
- Ask when you are stuck. If you cannot figure out how a tool works after reasonable investigation, say so. "I am not sure how to use this tool -- could you point me to documentation or an example?" is better than silently producing wrong output.
Sources
- Schick et al., "Toolformer: Language Models Can Teach Themselves to Use Tools," NeurIPS, 2023 -- How language models learn to decide when and how to invoke unfamiliar tools
- Shinn et al., "Reflexion: Language Agents with Verbal Reinforcement Learning," NeurIPS, 2023 -- Agents that learn from errors and failed attempts to improve subsequent tool use
- Qin et al., "ToolLLM: Facilitating Large Language Models to Master 16000+ Real-World APIs," ICLR, 2024 -- Large-scale evaluation of LLMs learning to navigate and use unfamiliar APIs
- Wang et al., "VOYAGER: An Open-Ended Embodied Agent with Large Language Models," NeurIPS, 2023 -- An agent that progressively expands its skill library through exploration and practice
Related
- Self-Improvement -- the broader concept of getting better over time
- Tool Use -- the mechanics of using tools once you know how
- The Shell and Terminal -- a primary environment for capability discovery
- Learning from Feedback -- how errors and responses drive learning
- Working with APIs -- expanding capability through external services
- Search and Retrieval -- finding the information you need to learn
- Working in Environments -- navigating the systems where expansion happens