使用方法
- 复制安装命令,在自己的智能体环境安装前先检查源码包。
- 从原始文档核对所需工具、凭据和支持的宿主。
- 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/poorvith-mp/skills-agents --skill agent-architecture开始前需了解
- 安装不包含模型订阅、API 额度或访问文件的权限。
- 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容
按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。
Agent Architecture
Design multi-agent systems where coordination does not become the failure mode.
Process
- Justify the second agent. Most tasks that look multi-agent are one agent with better tools. Split only when roles need genuinely different context or run concurrently.
- Decompose by context boundary, not by job title. An agent exists to hold a distinct working set, not to mirror an org chart.
- Define the contract between agents — the exact shape of what is passed, and what is guaranteed about it. Free-text handoff is where multi-agent systems lose information.
- Decide where state lives. Shared mutable state between agents needs the same care as between threads.
- Isolate failure. One agent failing or looping must not stall the others; set timeouts and a supervisor that can terminate.
- Make the trace reconstructable. When output is wrong, you need to see which agent decided what, with what input.
- Bound the total cost. Agents that can spawn agents need a hard ceiling.
Deliverables
- Role decomposition with the context boundary justifying each agent
- Message contracts between agents
- Failure isolation, timeouts and supervision model
- Trace format and cost ceiling
Verification & Quality Checklist
- [ ] Code compiles and all automated tests and typechecks pass without new warnings.
- [ ] Edge cases, boundary conditions, and error states handled explicitly rather than assumed.
- [ ] No hardcoded secrets, credentials, or insecure defaults introduced.
- [ ] Changes are covered by a test that fails without them.
Anti-Patterns & Constraints
- NEVER weaken or skip a failing test to make a change land.
- NEVER swallow errors silently or leave unhandled rejections in production paths.
- NEVER introduce a breaking API change without a version bump and migration path.