AgentSkillsCN

ai-system-architecture

设计 AI 驱动的系统、自动化工作流、API 与代理。在进行集成架构设计、优化成本、构建数据管道,或设计代理型系统时使用。优先考虑可复用性、成本效益,以及尽可能减少人工干预。

SKILL.md
--- frontmatter
name: ai-system-architecture
description: Design AI-powered systems, automation workflows, APIs, and agents. Use when architecting integrations, optimizing costs, building pipelines, or designing agentic systems. Prioritizes reusability, cost-efficiency, and minimal human operation.

AI System Architecture

Design automation systems, APIs, and AI agents with production-grade reliability.

Architecture Workflow

  1. Goal → Define outcome and success metrics
  2. Constraints → Budget, latency, reliability, integrations
  3. Components → Identify required building blocks
  4. Design → Architecture diagram and data flow
  5. Optimize → Cost, latency, failure modes
  6. Implement → Phased rollout plan
  7. Operate → Monitoring, alerting, maintenance

LLM Cost Optimization

StrategyWhen to UseSavings
Model tieringRoute simple tasks to cheaper models50-80%
CachingRepeated identical queries90%+
BatchingNon-realtime processing20-40%
Prompt compressionLong context tasks30-50%
Output length controlVerbose responses20-30%

Agent Design Principles

  1. Single responsibility → One agent, one job
  2. Explicit handoffs → Clear triggers between agents
  3. Fail gracefully → Define fallback for every failure mode
  4. Human escalation → Always have escape hatch
  5. Audit trail → Log decisions, not just outputs

Reusability Standards

  1. Configuration over code → Parameters externalized
  2. Modular components → Swap without rewrite
  3. Documentation → Inline comments + README
  4. Testing → Unit tests for core logic
  5. Versioning → Semantic versioning for APIs