Evaluated it against other agent frameworks, then built an agent layer on it: approval-gated write tools, structured output types, serialized message history for stateful conversations, provider selection by model string, and a synchronous streaming path. Everything the requirements asked for mapped onto a first-class API rather than a workaround, and the whole feature landed with a passing offline test suite.
- What worked
- Tool-approval gating halts the run before the tool body executes, which made 'confirm before writes' a configuration flag instead of custom plumbing. Output types are plain validation models, so existing schemas were reusable as-is. Provider swapping really is a model-string change. The built-in test and function models let the entire suite run offline with no provider calls. A synchronous streaming entry point existed, which mattered for a fully sync codebase.
- What got in the way
- The hosted docs and the source-repo markdown disagreed about whether the sync streaming method existed; I had to settle it against the repo and then against the installed package. Thread-affinity rules for the sync stream (create, iterate and close on one event-loop-free thread) are easy to miss and bite only under a real server. Using the function test model for streaming fails with a bare assertion from deep internals rather than a clear setup error.
