跪拜 Guibai
← All articles
Artificial Intelligence

Building an AIOps Platform with AI Coders: Tool-Gated Agents, Auditable Tasks, and the Day a Card Count Went from 12 to 27

By 对你无可奈何 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Ops teams can now assemble an internal AIOps workbench using the same agent runtime and MCP tooling that powers AI coding, without writing a platform from scratch. The practical value is in the audit trail: every answer a colleague gets can be traced back to the exact tool call, version, and evidence, which is what makes agent-driven ops trustworthy beyond demos.

Summary

The article is a detailed field report of creating a team-facing AIOps workbench on a Mac, using the official DeepSeek Harness (DSH) as the agent runtime and writing a custom web console in SQLite. Instead of building the platform cold, the author used AI coding tools (Codex, ZCode with GLM-5.4) to develop features iteratively, validating each step by actually clicking through the UI with drill data.

The platform connects monitoring, build records, knowledge bases, and Kubernetes through MCP. Admins register connections, probe read-only tools, and restrict them per account; agents are published versions with chosen tools, skills, and knowledge bases; workflow nodes chain different agent versions for multi-step diagnosis. Every task keeps an audit trail showing which agent version called which tool and what evidence it got. A separate approval flow controls access to production logs. The author also covers concrete installation steps for DSH, the decision to share one runtime, three human decisions about authorization and orchestration, and a QA method for verifying AI-generated statistic cards by checking counts from the same list.

Takeaways
— The first accepted version of the event list consumed four anonymous notifications: two checkout HighLatency (same fingerprint/start time) and two catalog MemoryPressure (one trigger, one recovery), and correctly deduplicated into two events.
— Notifications with the same upstream fingerprint and start time are grouped into one event; re-pushes append to the event timeline, and a later occurrence opens a new event.
— The local DSH install script supports explicit AIOPS_DSH_BIN or AIOPS_DSH_ROOT, falls back to ~/.local/bin/dsh, and only then does a private npm ci install of package.json; measured install size was about 820 MB on November 22.
— Recommended environment: Node.js 26.3.0, npm 11.16.0, and DSH version 0.2.2-rc.5 for this project; other projects should read their own version declaration.
— Ports: platform defaults to 3080, official DSH Web to 3081; platform backend spawns sdk-minimal subprocesses via JSON-RPC over stdio for real agent runs.
— Three human decisions shaped the design: already-authorized read-only metrics are queried directly without confirmation; checkout runs a fixed workflow for required metrics before letting the agent decide; and a unified console with ten entry points is the hard requirement, with checkout as a template.
— Tool permissions are per account: the same Kubernetes MCP connection allowed on-duty account A to query Deployments but rejected Pod queries.
— A count discrepancy was found: homepage showed 12 published agents but Studio had 27; the fix merged by stable agent ID, excluded drafts and the create button, and applied the same list logic to both pages. After a later agent add, homepage and Studio both showed 30.
— A validation method for AI-built number cards: define unit and scope in the requirement, click through from the homepage as the same account, and feed the AI edge cases like two published versions and a no-permission account.
— The RAGFlow knowledge-base registration requires instance address, dataset ID, and API key, and restricts access per account; the generated answers include clickable citations that open the cited passage and the DSH's MCP retrieval audit.
— When diagnosing checkout latency, the assistant first queried service P95 (210 ms then 820 ms) and then database P95 returned no_samples; a correct conclusion must say the cause cannot be determined because database data is missing.
— The test application release used Jenkins build #6 from commit e8bd3558 of gitlab-org/cli, deployed into Kubernetes namespace aiops-lineage-test as lineage-web with 1/1 ready; historical ReplicaSets for #4 and #5 were scaled to zero.
— A log approval flow requires a service owner and duty leader to approve, has a validity period (a one-minute expiry in the demo), and expired or cross-service queries are rejected.
— An isolated drill with consecutive insufficient-replica events automatically started an investigation without creating duplicate tasks.
— Upcoming roadmap: resource inventory and application lineage first, then monitoring/alert/workflow connections, delivery status and homepage counts, and easier integration for new components and agents, with an explicit order for databases, cloud reconciliation, and bastion host sessions.
Conclusions

The author's approach shows that AI coding can turn an ops platform into an iteratively shaped product: the first version is built to be interactively clicked, and design decisions emerge from seeing how the same alert appears twice, not from upfront architecture.

Sharing a single DSH runtime across multiple users shifts the burden onto the platform layer for per-request permission checks, which is exactly where the acceptance test of 'can query Deployment but not Pod' proves the value of configuration over patches.

The 12-versus-27 count bug is a concrete warning: AI-generated UI can pass 'does it error' checks while still being semantically wrong, and the fix required defining what the number means and aligning the lists, not just fixing the digit.

The evidence-preservation rule (each task keeps the exact tool call and result at that moment, even for retries) is what makes agent-based ops auditable, and it is a prerequisite for letting on-call staff defend their answers to colleagues.

The depth of integration with MCP, RAGFlow, Kubernetes, GitLab, Jenkins, and Argo CD suggests that internal AIOps platforms are becoming practical for teams that already run these tools, but the real adoption barrier is still setting up per-account tool permissions and approval flows.

Concepts & terms
DeepSeek Harness (DSH)
DeepSeek's official agent runtime that handles model inference, agent execution, MCP tool calls, and Skill loading. The platform in the article uses it as a shared engine, with a custom web console built on top.
MCP (Model Context Protocol)
An open protocol for connecting AI models/agents to external tools and data sources. In this platform, MCP is used to register monitoring, Kubernetes, Jenkins, and knowledge-base accesses, and to control tool permissions per account.
RAGFlow
A RAG (retrieval-augmented generation) engine that the platform connects to as a knowledge base. It allows agents to retrieve and cite specific passages from documents, with the platform recording which passages were retrieved.
Skill
Published operational procedures or Markdown guides that an agent can load as a versioned capability. Skills are selected per agent version and used during task execution, and old tasks keep the version they loaded.
Resource lineage
The ability to trace an application to its associated Kubernetes resources, monitoring metrics, and CI/CD builds. The article describes a demo where a Deployment, ReplicaSet, and Pods are linked, and the platform shows evidence or gaps for each relationship.
From the discussion
Featured comments
沉着宇宙

Separating the engine layer (MCP tool calls, Skill loading) from the platform extension layer (permission checks, task auditing, approval records) upfront is crucial — otherwise, when multiple people share an Agent runtime, permissions and traceability are the first things to spiral out of control. Also, a minimal closed loop like "the first version only routes four notifications through" paired with AI Coding's iterate-as-you-go approach beats writing a grand, comprehensive design document in one shot. We found the same when curating workflow-style Skills at HuohuoHub: nailing down the actual execution evidence and acceptance boundaries first means far less rework when wiring in new tools or upgrading versions later. Making "the on-duty person can read Deployments but not Pods" and the production log approval chain traceable on every single tool call — that's genuinely valuable practical reference.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗