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

297 行代码4 个工具

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

了解更多
03
L03TodoManager + nag reminder

TodoWritePlan Before You Act

445 行代码5 个工具

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

了解更多
04
L04Subagent spawn with isolated context

SubagentsClean Context Per Subtask

371 行代码5 个工具

Subagents use independent context, keeping the main conversation clean

了解更多
05
L05SkillLoader + two-layer injection

SkillsLoad on Demand

383 行代码5 个工具

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

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

CompactThree-Layer Compression

378 行代码5 个工具

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

了解更多
07
L07TaskManager with file-based state

TasksTask Graph + Dependencies

599 行代码8 个工具

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

了解更多
08
L08BackgroundManager + notification queue

Background TasksBackground Threads + Notifications

419 行代码6 个工具

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

了解更多
09
L09TeammateManager + file-based mailbox

Agent TeamsTeammates + Mailboxes

606 行代码0 个工具

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

了解更多
10
L10request_id correlation for protocols

Team ProtocolsShared Communication Rules

507 行代码0 个工具

One request-response pattern drives all team negotiation

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

Autonomous AgentsScan Board, Claim Tasks

333 行代码0 个工具

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

了解更多
12
L12Worktree lifecycle + event stream

Worktree IsolationIsolate by Directory

469 行代码0 个工具

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

了解更多
13
L13All mechanisms combined

Full Reference AgentCapstone — Everything Combined

787 行代码0 个工具

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

了解更多

代码量增长

L00
50
L01
143
L02
297
L03
445
L04
371
L05
383
L06
378
L07
599
L08
419
L09
606
L10
507
L11
333
L12
469
L13
787