How ardeyouxipianyi/workbuddy2api-hub works
WorkBuddy2API-Hub is a local multi-account gateway that exposes OpenAI-compatible APIs for international WorkBuddy, domestic WorkBuddy, and CodeArts. A client sends a model or media request to the gateway; configured keys and account-pool policy govern which upstream can serve it. Separate product branches cover media generation, automated activity and sign-in, and an operator dashboard with usage and quota visibility. The README documents these capabilities, but the main gateway implementation was not sampled, so edges between internal modules are omitted where their call ownership cannot be verified.
Main entry points: wb_proxy.py API gateway · wb_webtools.py Web dashboard · wb_accounts.py Account pool · wb_scheduler.py Automation scheduler
Components 22
Gateway and policy
- API gateway
wb_proxy.py - Key and settings
wb_settings.py - Request identity
wb_identity.py - Model catalog
wb_catalog.py - Cost estimates
wb_pricing.py
Accounts and upstreams
- Account pool
wb_accounts.py - Upstream pool
wb_upstream_pool.py - CodeArts client
wb_codearts.py - Browser OAuth
wb_agents.py
Media generation
- Media protocol
wb_media.py - Media I/O
wb_media_client.py - Video task manager
wb_media_tasks.py
Automation
- Growth task engine
wb_tasks.py - Activity tracking
wb_activity.py - Automation scheduler
wb_scheduler.py - Quota scanning
wb_quota_scan.py
Operations and insight
- Web dashboard
wb_webtools.py - Web prompts
wb_webprompts.py - Request logs
wb_logstore.py - Usage records
wb_usage_io.py
Other components
- API client
- Operator
Connections 20
- API client → API gateway: sends API requests
README.md - Operator → Web dashboard: manages gateway
README.md - Operator → Account pool: imports accounts
README.md - API gateway → Key and settings: enforces key policy
- API gateway → Account pool: dispatches requests
wb_accounts.py - API gateway → Model catalog: lists models
README.md - API gateway → CodeArts client: routes CodeArts
README.md - API gateway → Media protocol: serves media APIs
- Media protocol → Media I/O: specifies media requests
wb_media.py - Video task manager → Media I/O: polls and retrieves
wb_media_tasks.py - API gateway → Growth task engine: exposes task automation
- Automation scheduler → Growth task engine: runs tasks
wb_scheduler.py - Automation scheduler → Activity tracking: runs activity checks
wb_scheduler.py - Automation scheduler → Quota scanning: scans quotas
wb_scheduler.py - Web dashboard → Key and settings: manages keys
README.md - Web dashboard → Request logs: shows request logs
README.md - Web dashboard → Usage records: shows usage
README.md - Web dashboard → Cost estimates: shows cost insight
- Browser OAuth → Account pool: imports OAuth accounts
README.md - Upstream pool → Account pool: coordinates account pool
wb_accounts.py