Agent Extension in Practice: A Guide to Tools, Services, and Skills
This article explains how to extend AI agent capabilities through three layers: built-in tools, custom tools, external services, and reusable skills. It covers the core logic of agent capability expansion, the design of tool contracts and permission policies, the value of standardized client-server integration protocols, and how to package workflows as skills. It also outlines a four-stage evolution path and engineering practices for observability, auditability, and safe production use.
1. Why Agents Need “Hands and Feet”: The Logic of Capability Extension
Before discussing implementation, it is worth stating a widely validated conclusion: an agent’s effective capability can be abstracted as “LLM + prompt + tools.” The LLM provides reasoning and language understanding, the prompt constrains goals and behavioral boundaries, and tools turn cognitive ability into the ability to operate on a real environment.
An LLM without a tool layer is like a person with a brain but no execution organs. It can analyze requirements and propose solutions, but it cannot read a configuration file from disk, run a build command, or write generated results back to a code repository. Once tools are connected, a coding agent can perform closed-loop actions such as reading files, executing commands, and writing code, shifting from a “conversation partner” to an “executor that delivers output.”
It is important to emphasize that tools are not a simple list of functions, but a contract system that needs to be designed. A mature tool layer usually answers four questions: how to describe capability boundaries, how to validate parameters, how to control permissions, and how to return execution results. Every extension method discussed below essentially revolves around these four questions.
2. The Built-In Toolbox: A Ready-to-Use Capability Foundation
Mainstream agent frameworks ship with a set of general-purpose tools covering the following scenarios:
- File operations: search, read, write, and partial edits to support code understanding and modification;
- Execution: running scripts and build commands to obtain compilation, testing, and runtime feedback;
- Task management: maintaining to-dos and progress as a checklist to avoid goal drift in long workflows;
- Web retrieval: supplementing external information beyond the model’s knowledge cutoff;
- Skill invocation: exposing user-defined capabilities to the model as tools;
- Multi-agent collaboration: splitting parallel subtasks to improve efficiency on complex engineering work.
The defining feature of these tools is automatic invocation on demand. Developers do not need to drive them with explicit step-by-step instructions; they only state goals and constraints in the prompt, and the agent decides when and in what order to call each tool during reasoning. The practical focus is therefore not memorizing tool names, but understanding each tool’s capability boundaries and side effects: which operations are read-only, which modify the workspace, and which generate external network requests. Clarifying side effects is the prerequisite for permission design later on.
3. Custom Tools: Extend on Demand and Take Effect Immediately
When built-in capabilities cannot cover a business scenario, the next step is custom tools. A maintainable custom tool typically consists of four parts:
name: unique tool identifier, semantically named, avoiding conflicts with built-in toolsdescription: explains "what it does" and "when to use it"; this is the main basis for the model's tool selectionparameters: parameter structure, types, required fields, and value rangeshandler: actual execution logic, including parameter validation, exception handling, and structured returns
There are three design essentials. First, descriptions are written for the model, not for humans; they should state applicable and non-applicable scenarios clearly, because vague descriptions directly cause incorrect invocations. Second, return results should be structured and length-controlled; overly long output consumes context budget, so pagination or summary modes are recommended. Third, tool definitions should support hot loading, meaning tools added or modified during a session take effect without a restart, which determines the iteration speed of extensions.
For permissions, a tiered strategy is recommended: read-only tools are allowed by default; write tools are restricted to a designated working directory; execution tools use command allowlists and timeout limits; tools involving external requests require explicit approval. An example:
permissions:read: allowwrite: { scope: workspace, require_approval: false }exec: { allowlist: ["build", "test", "lint"], timeout: 120s }net: { require_approval: true }
4. Connecting External Services: The Value of Standardized Protocols
Tools address local capabilities, while cross-process and cross-system capabilities require a standardized integration protocol. The industry commonly adopts a client-server separation approach: the agent acts as the client, and external systems expose a set of capability descriptions as servers. The client automatically discovers available functions based on these descriptions, without modifying the main program for each system individually.
This decoupling brings three direct benefits. First, capabilities are reusable: the same service can be shared by multiple agents. Second, permissions can be consolidated: sensitive credentials stay on the server rather than in the model context. Third, the technology stack is neutral: the server can be implemented in any language as long as it follows the protocol specification.
In practice, pay attention to caching strategies for service discovery and capability manifests, call timeouts and retry limits, failure fallback paths, and centralized hosting and rotation of credentials. Credentials should never appear in plaintext in prompts or tool parameters; this is the most common and most dangerous problem in practice.
5. Skill Packaging: Turning Methodology into Reusable Assets
Tools are atomic capabilities, while skills are goal-oriented process encapsulations. A skill is usually organized as a directory containing documentation, trigger condition descriptions, and optional scripts and template resources. When the model recognizes a matching scenario, it loads the corresponding skill and invokes underlying tools by following the steps defined within it.
Experience in writing high-quality skills: single responsibility, where one skill solves only one class of problems; explicit steps, writing key workflows as verifiable checklists; mandatory pre-checks and failure rollback; and annotated applicability boundaries in descriptions to reduce cross-scenario misfires. Skills and tools form layers: tools handle “whether it can be done,” while skills handle “in what order and by what standard it is done.”
6. Evolution Path and Engineering Recommendations
A four-stage approach is recommended. First, use built-in tools to complete a closed loop and validate prompt quality. Then, add a small number of custom tools for high-frequency gaps. Next, expose enterprise internal systems through standardized protocol services. Finally, distill stable workflows into a skill library and place it under version control.
Supporting engineering practices include: establishing change review and regression test cases for tools and skills; recording structured logs for every invocation to facilitate tracing the causes of incorrect calls; budgeting context consumption to prevent long outputs from drowning out key information; and keeping manual confirmation for high-risk operations. If running on a container platform or cloud host, object storage can hold artifacts, while logging services and monitoring alerts track the invocation chain, forming an observable and auditable closed loop.
Only when tools, services, and skills are layered together does an agent move from “being able to talk” to “being able to do.” The key to extension is not quantity, but clear boundaries, controllable permissions, and reusable workflows; these three points determine whether an agent can reliably enter a real production environment.
