Agentic MarketAgentic Market Docs

Developer Quickstart

Run the entire Agentic Market stack locally in one command or test individual workspaces.

Agentic Market is organized as a Bun + Foundry monorepo. You can boot the entire local arena—including Cancun Anvil, deployed BinaryEngine, seeded live and resolved markets, INV-1 solvency verification, ElysiaJS API, and Next.js storefront—with a single command.


Prerequisites

ToolMinimum VersionPurpose
Bun>= 1.2Root tooling, app/, agenticmarket/, workers/, docs-site/
Foundry (forge, cast, anvil)Latest stableSolidity 0.8.28 compilation, unit/fuzz/invariant tests, local EVM
Git>= 2.40Branching & .husky hooks

1-Command Local Full-Stack Arena

# Install root dev tooling and activate repository git hooks
bun install
git config core.hooksPath .husky

# Boot Anvil (31337) + deploy contracts + seed 5 markets + verify INV-1 + start API & Storefront
bun run dev:local

Never run bunx husky init

Running bunx husky init overwrites .husky/pre-commit and removes secret scanning, brand compliance, and build gates. Only git config core.hooksPath .husky is needed.

Local Development URLs

SurfaceURL
Storefront (agenticmarket/)http://localhost:3000
Agent Read Layer API (app/)http://localhost:3001
Scalar Interactive API Referencehttp://localhost:3001/docs
Read-Only MCP ServerPOST http://localhost:3001/mcp
Fumadocs Portal (docs-site/)http://localhost:3002

Monorepo Workspaces

WorkspaceStackPortVerification Commands
contract/Solidity 0.8.28, Foundry (cancun, via_ir), Solady—forge fmt --check && forge build --sizes && forge test
app/Bun, ElysiaJS, TypeBox, @elysiajs/openapi, Viem3001bunx tsc --noEmit && bun test
workers/Bun, Viem (isolated least-privilege workers)—bunx tsc --noEmit && bun test
agenticmarket/Next.js 16.4.6 App Router, React 19.3, Tailwind v43000bunx tsc --noEmit && bun test && bun run lint && bun run build
docs-site/Next.js 16.4.6, Fumadocs, KaTeX, Tailwind v43002bunx tsc --noEmit && bun run build

Running Individual Workspaces

cd contract
forge build --sizes
forge test
bun scripts/export-abis.ts
bun scripts/verify-anvil-e2e.ts
cd app
bun install
cp env.example .env
bun test
bunx tsc --noEmit
bun run dev
cd workers
bun install
cp env.example .env
bun test
bunx tsc --noEmit
bun run src/index.ts --mode=watcher --once
cd agenticmarket
bun install
cp env.example .env.local
bun test
bun run lint
bun run build
bun run dev
cd docs-site
bun install
cp env.example .env.local
bunx tsc --noEmit
bun run build
bun run dev

Automated Full-Stack Smoke Test

To run the same end-to-end Anvil + INV-1 + API + Storefront smoke test used in GitHub Actions CI:

bun scripts/dev-local.ts --smoke-test