Commit 802f9c0
committed
docs: comprehensive Go SDK Guide — complete API.md rewrite
Full rewrite of docs/API.md from a brief reference into a thorough
SDK guide for engineers building on odek as a Go library:
- Quickstart: import, configure, run in 10 lines
- Architecture overview: ReAct loop flow diagram
- Core types deep-dive: Config (all fields), Tool (all 4 methods),
Agent (all 6 methods with return types), ModelProfile, KnownProfiles
- Single-shot tasks: basic usage + custom tools + system prompts
- Multi-turn sessions: RunWithMessages, session persistence patterns
- Custom tools walkthrough: 5-step guide with real gitLog example
- Tool patterns table: 5 production patterns (zero-alloc, graceful errors, etc.)
- Memory system: AddFact, ReplaceFact, RemoveFact, BufferLines, episodes
- Model profiles: built-in table, custom profile registration, lookup
- Token tracking: per-call and session-level patterns
- Error handling: creation failures, run errors, tool error strategy
- Complete example: 100-line agent with line_count + slack_notify tools
- Package reference: all 4 exported functions, 4 types, 1 const, 1 var
- Import path + migration guide from v0.14.x
Updated README.md and landing page doc links to reference 'Go SDK Guide'1 parent 12ee25f commit 802f9c0
3 files changed
Lines changed: 604 additions & 157 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
0 commit comments