Kosbling Sim2Real OS is now a CLI-first, shadow-first TypeScript runtime for running commerce ideas through a staged 30-day simulation.
If you want the implementation contract, start here:
The current build is a local CLI with:
- natural-language idea intake
- CEO-agent scenario formation
- multi-agent chunk planning with CEO + marketing + supply + finance + brand role proposals
- execution-agent mediated action commits through a shared adapter boundary
- Brave web search grounding
- optional Google Trends enrichment
- 30-day shadow execution in 5-day chunks
- optional Shopify live execution for price updates
- pause and resume support
- coarse CLI process logs for grounding, planning, execution, and settlement
- market snapshot, chunk update, and final battle report artifacts
Current v0.1 boundary:
- v0.1 is best treated as a post-setup operating simulator
- it initializes a shadow store/world quickly from the idea and defaults
- the fuller “from supplier selection and launch prep to first sale” setup journey is now planned for v0.2
There is still no GUI, IM integration, or full live ads / ops surface in this version. The first live write path is a minimal Shopify store adapter for approved price updates.
The current v0.1 runtime now uses:
Kos / CEOfor idea intake, clarification, role-plan merge, and event generation- specialist role agents for
marketing,supply,finance, andbrand - an execution agent that calls the runtime adapter through tool use
- a sequential orchestration loop where specialists propose structured actions plus watchouts and handoff tickets, the CEO merges them with a rationale, and the execution agent commits them through the active adapter
- recent chunk history is compressed into team memory and fed back into the next round of role planning and CEO arbitration
- open handoffs can stay active across chunks until the assigned role explicitly acknowledges them
This is still a local shadow runtime by default. The execution boundary is now adapter-based:
shadowmode routes approved actions into the shadow commerce harnesslivemode currently supports a first Shopify store adapter foradjust_price- unsupported live actions fail explicitly instead of silently falling back to fake execution
Install dependencies:
npm installBootstrap local env vars if you want to pin a model gateway:
cp .env.example .envRun the CLI:
npm run devOptional build and typecheck commands:
npm run build
npm run typecheckThe CLI uses pi-based agent runtime support. It can work with a provider configured through pi auth, or through explicit env vars in this repo.
Required when you want to force a specific provider/model from the shell:
KOSBLING_MODEL_PROVIDERKOSBLING_MODEL_ID
Optional runtime API key override:
KOSBLING_MODEL_API_KEYKOSBLING_MODEL_BASE_URLfor Anthropic/OpenAI/Google-compatible gateways or proxies
Optional grounding defaults:
KOSBLING_LOCALEdefaults toen-USKOSBLING_DEFAULT_GEOdefaults toUSKOSBLING_ENABLE_GOOGLE_TRENDSdefaults tofalse; enable it only as best-effort enrichmentKOSBLING_EXECUTION_MODEdefaults toshadowand may be set tolivewhen a real adapter is configuredBRAVE_WEBSEARCH_API_KEYis the primary real grounding source in the current v0.1 build
Shopify live adapter env vars:
KOSBLING_SHOPIFY_STORE_DOMAINKOSBLING_SHOPIFY_ACCESS_TOKENKOSBLING_SHOPIFY_API_VERSIONdefaults to2025-10KOSBLING_SHOPIFY_PRODUCT_IDKOSBLING_SHOPIFY_VARIANT_IDKOSBLING_SHOPIFY_INVENTORY_ITEM_IDoptional, reserved for later inventory adapter workKOSBLING_SHOPIFY_LOCATION_IDoptional, reserved for later inventory adapter work
CLI localization:
KOSBLING_LOCALE=zh-CNgives Chinese CLI prompts and artifact labelsKOSBLING_LOCALE=en-USgives English CLI prompts and artifact labels- command words accept both English and Chinese aliases such as
start/开始,continue/继续,pause/暂停
Example:
export KOSBLING_MODEL_PROVIDER=anthropic
export KOSBLING_MODEL_ID=claude-sonnet-4-20250514
export KOSBLING_MODEL_BASE_URL=https://your-gateway.example.com
export ANTHROPIC_API_KEY=your_key_here
export BRAVE_WEBSEARCH_API_KEY=your_brave_key_here
export KOSBLING_ENABLE_GOOGLE_TRENDS=false
export KOSBLING_EXECUTION_MODE=live
export KOSBLING_SHOPIFY_STORE_DOMAIN=example.myshopify.com
export KOSBLING_SHOPIFY_ACCESS_TOKEN=shpat_xxx
export KOSBLING_SHOPIFY_PRODUCT_ID=gid://shopify/Product/123
export KOSBLING_SHOPIFY_VARIANT_ID=gid://shopify/ProductVariant/456If you do not set the KOSBLING_* vars, the app will still try to use whatever tool-capable model is available through pi auth/model discovery.
Grounding note:
- current recommended path: Brave-backed grounding
- Google Trends is no longer treated as a required hard anchor in the runtime because anonymous access is unstable and often returns
429 - if you explicitly set
KOSBLING_ENABLE_GOOGLE_TRENDS=true, the app will try Trends as optional enrichment and fall back to Brave-only grounding when it is rate-limited
Launch the CLI with:
npm run devThen:
- Enter your product/business idea.
- Answer any clarification question from Kos if needed.
- Review the generated market snapshot.
- Type a natural-language adjustment or
startto continue into the next chunk.
Each run advances in 5-day chunks until day 30 completes.
You can pause a run from the prompt by typing:
pause
The run state is saved under runs/<run-id>/.
Resume a paused run with:
npm run dev -- --resume <run-id>Example:
npm run dev -- --resume run-2026-03-23T12-00-00-000ZEach run writes its state and artifacts into runs/<run-id>/, including:
scenario.jsongrounding.jsonstate.jsonchunks.jsonmarket-snapshot.mdchunk-XX.mdchunk-XX-team-trace.mdfinal-battle-report.md
Repository docs are still the best place to understand the architecture and the intended product shape:
design/sim2real-functional-design.mddesign/web-observatory-design.mdimplementation/v0.1-development-status-2026-03-24.mdimplementation/v0.2-implementation-brief.mdimplementation/web-ui-v0.1-brief.mdreferences/runtime-loop.mdreferences/state-model.mdreferences/action-spec.mdreferences/event-spec.mdreferences/artifact-contract.md