AI Agent Learning

学习路径

第 0 课到第 13 课:使用 OpenAI Java SDK 渐进式 Agent 设计

层次图例

Tools & Execution
Planning & Coordination
Memory Management
Concurrency
Collaboration
00
L00Minimal chat completion loop

Basic Chat LoopThe Foundation of Every Agent

50 行代码0 个工具

“The simplest agent is just a while loop calling the model”

了解更多
01
L01Function calling + tool dispatch

Tool UseFunction Calling Basics

143 行代码1 个工具

“Function calling turns a chat model into an agent that can act”

了解更多
02
L02Tool dispatch map

ToolsOne Handler Per Tool

329 行代码4 个工具

“The loop stays the same; new tools register into the dispatch map”

了解更多
03
L03TodoManager + nag reminder

TodoWritePlan Before You Act

469 行代码5 个工具

“An agent without a plan drifts; list the steps first, then execute”

了解更多
04
L04Subagent spawn with isolated context

SubagentsClean Context Per Subtask

408 行代码5 个工具

“Subagents use independent context, keeping the main conversation clean”

了解更多
05
L05SkillLoader + two-layer injection

SkillsLoad on Demand

414 行代码5 个工具

“Inject knowledge via tool_result when needed, not upfront in the system prompt”

了解更多
06
L06micro-compact + auto-compact + archival

CompactThree-Layer Compression

422 行代码5 个工具

“Context will fill up; three-layer compression enables infinite sessions”

了解更多
07
L07TaskManager with file-based state

TasksTask Graph + Dependencies

640 行代码8 个工具

“A file-based task graph with ordering, parallelism, and dependencies”

了解更多
08
L08BackgroundManager + notification queue

Background TasksBackground Threads + Notifications

474 行代码6 个工具

“Run slow operations in the background; the agent keeps thinking ahead”

了解更多
09
L09TeammateManager + file-based mailbox

Agent TeamsTeammates + Mailboxes

644 行代码0 个工具

“When one agent can't finish, delegate to persistent teammates via async mailboxes”

了解更多
10
L10request_id correlation for protocols

Team ProtocolsShared Communication Rules

554 行代码0 个工具

“One request-response pattern drives all team negotiation”

了解更多
11
L11Task board polling + self-governance

Autonomous AgentsScan Board, Claim Tasks

353 行代码0 个工具

“Teammates scan the board and claim tasks themselves; no need for assignment”

了解更多
12
L12Worktree lifecycle + event stream

Worktree IsolationIsolate by Directory

484 行代码0 个工具

“Each works in its own directory; tasks manage goals, worktrees manage directories”

了解更多
13
L13All mechanisms combined

Full Reference AgentCapstone — Everything Combined

829 行代码0 个工具

“The capstone combines every mechanism from Lessons 1–12 into one agent”

了解更多

代码量增长

L00
50
L01
143
L02
329
L03
469
L04
408
L05
414
L06
422
L07
640
L08
474
L09
644
L10
554
L11
353
L12
484
L13
829