Extending AI Agent Capabilities: A Practical Guide to Tools, Services, and Skills
This guide explains how to extend AI agent capabilities beyond the underlying model by combining prompts with tools. It covers built-in tool categories, designing custom tools, connecting external services, and packaging reusable skills, along with selection criteria and a security checklist for building reliable, production-ready agents.
Extending AI Agent Capabilities: A Practical Guide to Tools, Services, and Skills
Introduction: Why “Being Able to Chat” Is Not the Same as “Being Able to Get Work Done”
General-purpose agent frameworks have been releasing updates in quick succession, and the industry’s focus has shifted from “can the model answer correctly” to “can the agent finish the job.” When one general-purpose agent framework was officially released, the hottest community discussions were not about parameter counts but about its engineering capabilities: permission policies, model integration methods, the plugin system, and several built-in preset working modes. One of these modes, which features “self-evolution,” allows the agent to read its own runtime context and generate new functionality. This is regarded as a key step in moving from a “chat tool” to a “programmable assistant.”
This article does not focus on any specific product. Instead, it abstracts the common capabilities behind this type of framework into a reusable practical guide: how to provide tools to an agent, how to connect external services, and how to package reusable skills. When these three things are done well, the capability boundary of an agent is no longer determined by the model itself.
1. The Capability Formula: Agent = Model + Prompt + Tools
A widely accepted simplified formula in the industry is:
Agent = LLM + Prompt + Tools
Missing any of the three leads to a collapse in capability. With only the model, output stays at the text level; with only the prompt, the model cannot perceive the real state of the environment; with only tools and no clear instruction constraints, tool calls become disordered or even produce side effects.
A model without tools can be compared to “a person with a brain but no hands and feet”: ask it to look up a record, call an API, or modify a file, and it can only offer suggestions rather than deliver results. Once tools are connected, the agent gains three basic types of actions:
- Read: view files, logs, and configurations to build an understanding of the environment;
- Execute (bash / shell): run builds, tests, and scripts to obtain real feedback;
- Write (write / edit): modify code and configurations to produce verifiable artifacts.
These three types of actions form a closed loop: perception → action → feedback → correction. Any engineered agent framework is essentially designed for safety and controllability around this loop.
2. The Built-in Toolbox: A Ready-to-Use Capability Foundation
Mature frameworks usually come with a set of built-in tools covering the following common categories:
| Capability Category | Typical Use | Usage Notes |
|---|---|---|
| File system | Search, read, write, patch-style modification | Control the scope of accessible directories |
| Command execution | Build, test, install dependencies | Set timeouts and whitelists |
| Web retrieval | Obtain external material and version information | Verify source credibility |
| Task management | Break down to-dos, track progress | Keep state recoverable |
| Skill invocation | Trigger user-defined skills | Define clear trigger descriptions |
| Multi-agent collaboration | Assign and aggregate subtasks | Limit concurrency and isolate context |
When using these tools, there is no need to specify each step manually; the agent selects them automatically based on task semantics. What developers really need to invest in is constraint design, not invocation details:
- Least privilege: Open only the directories and commands necessary to complete the task, avoiding full file system exposure.
- Observability: Keep structured logs for each tool call, including a summary of inputs, return status, and elapsed time.
- Rollback capability: Keep a snapshot or branch before write operations so that deviations can be quickly recovered.
- Idempotency first: Repeated execution without side effects is the prerequisite for stable automation workflows.
3. Custom Tools: Tailored on Demand, Effective Immediately
Built-in tools cannot cover every business scenario, so frameworks generally support custom tools. A well-formed tool definition usually contains four elements: name, description, parameter schema, and execution function. The quality of the description directly determines invocation accuracy, because the model performs semantic matching based on the description.
Illustrative definition (pseudocode):
@tool(name="query_order_status",description="Query fulfillment status by order number; only single queries are supported; input must be a numeric order number",parameters={"order_id": "string"})def query_order_status(order_id: str) -> dict:if not order_id.isdigit():return {"error": "order_id must be numeric"}return {"order_id": order_id, "status": "shipped"}
Design points:
- State boundaries clearly in the description: Explain what is supported, what is not, and input format constraints. This significantly reduces incorrect invocations.
- Strong parameter validation: Perform type and range checks at the function entry and return clear error messages, giving the model a chance to correct itself.
- Return structured data: Prefer JSON to avoid large blocks of natural language that bloat the context.
- Hot loading: Quality frameworks support adding tools during a session and making them effective immediately without a restart, which noticeably improves debugging efficiency.
- Readable errors: Design error messages for the model, stating “what went wrong and how to fix it.”
4. External Service Integration: Protocol Adaptation and Governance
In addition to local tools, agents often need to access external systems. A common industry practice is to adopt an open service integration protocol, where the server exposes a capability manifest and the client discovers and invokes capabilities based on it. Four points are recommended in implementation:
- Capability discovery: Prefer standardized capability description formats to avoid writing hard-coded adapters for every service.
- Transport selection: In-process local communication has low latency and suits tool-type services; remote communication suits sharing capabilities across teams.
- Credential management: Inject keys through environment variables or a key management service; never write them into code or prompts.
- Timeouts and circuit breaking: Set timeouts, retry limits, and fallback paths for each external call to prevent a single point of failure from dragging down the entire workflow.
When deploying in the cloud, common-category capabilities can be combined: put service registration information in a configuration center, host the call chain on a container platform, connect logs and metrics to logging services and monitoring alerts, store large file artifacts in object storage, and decouple asynchronous tasks with a message queue. This gives the agent’s call chain the engineering properties of observability, scalability, and operability.
5. Skill Packaging: Turning Methodology into Reusable Assets
Tools solve “can do”; skills solve “does it according to standards.” A skill is usually a structured set of operating instructions plus optional scripts, describing the complete workflow and acceptance criteria for a type of task.
A usable skill description template:
name: code_review_flowdescription: Used when the user requests a code change review, covering style, boundaries, and testingsteps:- Read changed files and dependency context- Check items one by one against the checklist- Run relevant tests and summarize results- Output issue grading and fix suggestionsacceptance:- Each issue includes location, cause, and suggestion- Explicitly list uncovered items
The value of skills lies in three points: reuse (the same workflow used across projects), consistency (unified output standards across sessions), and evolution (improving the workflow only requires updating the skill file). The standard for judging whether a skill is well written is whether the trigger description is clear, whether the steps are executable, and whether the acceptance criteria are determinable.
6. Choosing Among the Three Extension Paths
| Scenario | Recommended Path | Reason |
|---|---|---|
| A single atomic operation | Custom tool | Small granularity, easy to test |
| Accessing a team’s existing systems | Service integration | Avoids duplicate implementation |
| A multi-step standard workflow | Skill packaging | Ensures output consistency |
| A complex long workflow | Skill + tool + task management | State is traceable and recoverable |
In practice, the three are additive rather than mutually exclusive: skills call tools internally, and tools connect to services behind them, forming a layered structure. The benefit of layering is that each layer can be tested and replaced independently, reducing overall maintenance costs.
7. Security and Quality Checklist
- Grant write and execution operations tiered authorization; high-risk actions require explicit confirmation;
- Treat external input as untrusted data, applying escaping and length limits to prevent prompt injection;
- Label the source of tool-returned content to avoid executing external text as instructions;
- Set up manual review points for critical paths, especially actions involving deletion, release, or payment;
- Build a regression test set and run it after tool or skill changes to prevent capability degradation.
Conclusion
An agent’s real competitiveness lies not in how much knowledge the model has memorized, but in whether the engineering system can reliably connect the model to the real environment. Make tools small, connect services stably, and write skills clearly, then add permission, logging, and rollback mechanisms, and a “work-getting-done” intelligent assistant takes shape. This methodology is independent of any specific product and applies to any technology choice that follows the “model + prompt + tools” paradigm. It can also be combined with general capabilities such as container platforms, logging services, and monitoring alerts from Baidu AI Cloud.
