Skip to content

Commit 802f9c0

Browse files
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

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ odek run "@README.md what does this project do?"
147147
|-----|--------|
148148
| [CLI Reference](docs/CLI.md) | All commands, subcommands, flags, error codes |
149149
| [Configuration](docs/CONFIG.md) | Config files, env vars, priority chain, all sections |
150-
| [Programmatic API](docs/API.md) | Go library: Tool interface, Config, Agent, Run, model profiles |
150+
| [Programmatic API](docs/API.md) | **SDK Guide**: import, Agent lifecycle, Tool interface, multi-turn sessions, memory system, model profiles, complete examples |
151151
| [Providers & Models](docs/PROVIDERS.md) | Supported providers, thinking config, context windows |
152152
| [Memory](docs/MEMORY.md) | Three-tier design, go-vector merge-on-write, `memory` tool |
153153
| [Sessions](docs/SESSIONS.md) | Multi-turn conversations, save/resume/trim/cleanup |

0 commit comments

Comments
 (0)