Extending AI Agents in Practice: A Guide to Tools, Services, and Skills
This article explains how to extend AI agent capabilities through three main approaches: using built-in tools, creating custom tools, and connecting external services and reusable skills. It covers the core elements of tool definitions, practical design considerations, standardized service integration, skill packaging, and the governance mechanisms needed to keep an agent system reliable and maintainable.
Introduction: From Chatting to Getting Work Done
As agent technology evolves quickly, a common understanding is taking shape: an agent equals a large language model plus prompts plus tools. The model provides reasoning and language ability, prompts define the role and boundaries, and tools give the model the “hands and feet” it needs to interact with the outside world. Without tool access, a model facing tasks such as querying a database, calling an API, or reading and writing files can often only offer suggestions rather than take action. Once tools are connected, a coding agent can read files, run commands, and write code, shifting from a conversation partner to an execution entity.
This article takes a general technical perspective and focuses on three main lines of agent capability extension: using built-in tools, creating custom tools, and connecting external service protocols and reusable skills. It does not cover any specific vendor product, and all examples use illustrative patterns common in the industry.
1. Built-in Tools: A Ready-to-Use Capability Foundation
Mainstream agent frameworks usually come with a set of built-in tools that cover the following scenarios:
- File system: Find, read, write, and edit files, with pattern matching to locate targets.
- Command execution: Run scripts, builds, and tests in a controlled sandbox.
- Task management: Track progress and dependencies for multi-step tasks using a to-do list.
- Web search: Retrieve public information to address gaps in the model’s knowledge freshness.
- Skill invocation: Mount user-defined skills as tools to reuse capabilities.
- Multi-agent collaboration: Spawn subtasks for sub-agents to process in parallel.
These tools share a common trait: automatic invocation on demand. The model decides when to call a tool and what parameters to use based on the current task, so users do not need to orchestrate calls manually. A practical recommendation is to first understand each tool’s capability boundaries and permission constraints, then design the task flow. This helps avoid having the model repeatedly test the limits between “no permission” and “exceeding permission.”
An illustrative tool description usually includes a name, purpose, and parameter structure:
{"name": "read_file","description": "Read the text content of a file at the specified path","parameters": {"path": "string, file path","offset": "number, starting line, optional","limit": "number, number of lines to read, optional"}}
2. Custom Tools: Tailored on Demand and Ready Immediately
Built-in tools cannot cover every business scenario, so frameworks generally allow users to define their own tools. There are three core elements:
- Metadata declaration: Name, natural language description, and parameter schema (usually expressed with JSON Schema). Description quality directly affects how likely the model is to select the right tool, so it should clearly state what the tool does, when to use it, and when not to use it.
- Execution implementation: This can be a local script, a command-line wrapper, or an HTTP call. It is best to keep a single responsibility and use structured input and output.
- Registration and hot loading: Place the tool in an agreed directory or configuration manifest. Most implementations support changes taking effect immediately after a new tool is added, without restarting the session.
A minimal working skeleton for a custom tool looks like this:
def search_orders(params):keyword = params.get("keyword", "")limit = int(params.get("limit", 20))# Connect to internal query logic here and return structured resultsreturn {"items": [], "total": 0, "keyword": keyword, "limit": limit}TOOL_SPEC = {"name": "search_orders","description": "Search order summaries by keyword, suitable for order query questions","parameters": {"keyword": "string, search keyword","limit": "number, maximum number of results, default 20"}}
Key design points: idempotency and retryability, timeout and fallback, concise output (return only the fields the model needs for decisions), and masking of sensitive information. If a tool returns overly long content, it takes up the context window and can actually reduce overall effectiveness.
3. Connecting External Service Protocols: Standardizing the Extension Boundary
Beyond local tools, the industry commonly uses an open service access protocol (often referred to as a model context protocol type of solution) to expose external data sources and operational capabilities in a unified way. The architecture usually has three parts: the host (the agent runtime environment), the client (the protocol connection layer), and the server (the capability provider that exposes resources, tools, and prompt templates).
The connection process generally includes declaring the server address and transport method (local process or remote connection) in a configuration file, declaring an available tool allowlist as needed, and setting timeout and failure retry policies. For security, follow the principle of least privilege: open only necessary tools, and inject credentials through environment variables or a key management service rather than storing them in plaintext in configuration files.
4. Skill Packaging: Turning Methodology into Reusable Assets
Tools solve “whether something can be done,” while skills solve “what standards to follow when doing it.” A skill is usually a directory containing a description file (covering applicable scenarios and execution steps) and optional scripts and template resources. When an agent encounters a matching scenario, it loads the description and follows the documented process to call tools and complete the task.
Writing recommendations:
- In the description file, clearly state trigger conditions, prerequisite checks, execution steps, and failure handling.
- Keep steps as atomic as possible, with each step corresponding to one tool call.
- Provide example inputs and outputs to reduce ambiguity.
- Use version control to make rollback and team collaboration easier.
5. Permissions, Observability, and Evaluation
Capability extension must move in step with governance. For the permission layer, it is best to distinguish three levels: read-only, write, and execute, and enable sandboxing and directory allowlists for command execution tools. For the observability layer, log a summary of the input parameters, elapsed time, and result status of each tool call to help identify failure causes. For the evaluation layer, prepare a task set covering typical scenarios, and run regression checks after adding tools or modifying skill descriptions, observing changes in task completion rate and invocation accuracy.
Conclusion
The upper limit of an agent’s capability is largely determined by the quality of its extension system. Using a general approach, start by making good use of built-in tools, then fill custom tool gaps based on business needs, connect external services through standard protocols, and finally turn stable workflows into skills, supported by permission, logging, and evaluation mechanisms. This is how you build a reliable, maintainable, and continuously evolving AI coding assistant. If running in the cloud, you can also combine general capabilities such as container platforms, object storage, logging services, and monitoring alerts to achieve elastic scaling and full-chain observability.
