In the previous article, we looked at Alibaba's Agentic AI ecosystem, including Qwen, AgentScope, AgentCore, Wukong and DataWorks Data Agent.
The next question is more practical:
How does an AI agent actually perform a task?
A chatbot generates a response. An agent goes further—it can plan, call tools, execute actions, observe results and decide what to do next.
1. The Agent Execution Loop
A typical agent follows this pattern:
Goal → Plan → Tool → Execute → Observe → Decide → Complete
For example:
"Check why my database is running slowly."
The agent might:
- Check database health.
- Check active sessions.
- Find long-running queries.
- Examine wait events.
- Identify the likely bottleneck.
- Generate recommended SQL.
- Ask for approval before making changes.
- Execute the approved action.
- Verify the result.
This is fundamentally different from simply asking an LLM for SQL advice.
2. The Main Components
A production agent normally contains several components:
| Component | Purpose |
|---|---|
| LLM | Reasoning and decision making |
| Agent Runtime | Controls the execution loop |
| Tools | Connect the agent to external systems |
| Memory | Maintains relevant context |
| Knowledge Base | Provides enterprise information |
| Guardrails | Restrict unsafe actions |
| Observability | Records what the agent did |
| Human Approval | Controls sensitive operations |
A simplified architecture looks like:
User
│
▼
AI Agent
│
Qwen
│
┌──────────┼──────────┐
▼ ▼ ▼
Tools Memory Knowledge
│
├── Database
├── Cloud API
├── Monitoring
└── Ticketing
│
▼
Guardrails
│
▼
Execution
│
▼
Verification
3. Tools Are What Make Agents Useful
The LLM itself normally does not directly connect to your production database.
Instead, the application exposes controlled tools such as:
get_database_status()
get_active_sessions()
get_top_queries()
get_tablespace_usage()
generate_sql()
request_approval()
The agent can decide which tool is appropriate.
For example:
User:
"Why is Oracle storage almost full?"
↓
Agent
↓
get_tablespace_usage()
↓
92% used
↓
get_top_segments()
↓
EVENT_HISTORY = 48 GB
↓
check_retention_policy()
↓
Generate recommendation
The agent is therefore acting as an orchestrator.
4. Qwen + AgentScope
Alibaba's Qwen models can provide the reasoning layer, while AgentScope can be used to build the agent application.
A simplified implementation could look like:
agent = Agent(
name="DBAAgent",
system_prompt="""
Investigate database problems.
Use read-only tools automatically.
Require approval before production changes.
""",
model=qwen_model,
toolkit=db_tools
)
The important architecture is:
Qwen → AgentScope → Tools → Enterprise Systems
The same architecture can be adapted for PostgreSQL, Oracle, SQL Server, cloud platforms and monitoring systems.
5. Why Human Approval Matters
Autonomous execution introduces risk.
For example:
READ DATABASE
↓
Automatically allowed
GENERATE SQL
↓
Automatically allowed
CREATE INDEX
↓
Approval required
DELETE DATA
↓
Restricted
DROP DATABASE
↓
Blocked
This creates a controlled autonomy model.
The objective is not to give an AI unrestricted access to production.
The objective is to give it the minimum permissions required to complete a task safely.
6. Agentic AI vs Chatbots
| Traditional AI | Agentic AI |
|---|---|
| Answers questions | Completes tasks |
| Generates text | Executes workflows |
| Limited tool usage | Multiple tools |
| Stateless interaction | Maintains context/state |
| Human performs actions | Agent can perform approved actions |
| Mostly reactive | Goal-oriented |
The biggest change is therefore not simply a smarter model.
It is the combination of:
Model + Tools + Memory + Planning + Execution + Governance
Conclusion
Agentic AI represents a shift from generating answers to executing objectives.
For enterprise environments, the most important architecture is not just the LLM. It is the complete system around it:
Qwen → Agent Framework → Tools → Security → Execution → Verification
This architecture opens the door to practical AI agents for database administration, cloud operations, data engineering and IT automation.
Join the conversation! Your thoughts help the community grow.