docs: add agent execution model to catalog population spec
This commit is contained in:
@@ -162,3 +162,16 @@ This design breaks into two sequential phases:
|
||||
2. `scripts/taxonomy/categories.ts` — canonical category map
|
||||
3. `scripts/crawl-all.ts` — batch runner by tier
|
||||
4. Test against 2-3 real manufacturers (Canyon, Apidura, Revelate Designs)
|
||||
|
||||
---
|
||||
|
||||
## Agent Execution Model
|
||||
|
||||
The crawl script launches a **Claude Code headless session** (via the Claude Agent SDK) rather than calling the Anthropic API directly. This gives the agent full tool access — WebFetch, browser navigation, file I/O — without needing to re-implement those capabilities. Auth is handled via OAuth rather than a raw API key.
|
||||
|
||||
Each manufacturer gets its own agent session. The session receives:
|
||||
- The manufacturer record (name, website, tier)
|
||||
- The target schema and canonical taxonomy
|
||||
- A GearBox API key scoped to write access
|
||||
|
||||
The agent browses the manufacturer site, extracts products, and posts to `POST /api/global-items/bulk` directly from within the session. No intermediate file serialization needed.
|
||||
|
||||
Reference in New Issue
Block a user