Deliverable-ordered. Each step should be shippable and demeable on its own.
Get a running app + API with nothing in it, just the plumbing.
App (clawk/app/)
- React app using
@kibalabs/ui-react,@tanstack/react-query,wagmi,@kibalabs/core-reactrouter - Single
HomePageplaceholder ClawkClientextendingServiceClient(same pattern asYieldSeekerClient)- Dockerized, same build setup as agent-hack/app
API (clawk/api/)
- Python +
kiba-core, same structure as agent-hack/api - Postgres DB with Alembic migrations
- One health-check endpoint to confirm it's alive
- Dockerized
Deliverable: App loads in browser, API returns 200 on /health
TODO: DB not yet set up — need to provision Postgres, create credentials, and populate
~/.clawk-api.varson the appbox before the API can be deployed and run.
Get the OpenClaw runtime installed, configured, and deployed — with state persisted across redeployments.
Local setup
- Install OpenClaw globally (
npm install -g @openclaw/clior equivalent) - Configure Gemini as the LLM in
~/.openclaw/config.yml(verify correct model ID) - Create
clawk/skills/market-research/SKILL.md— teaches the agent to fetch Polymarket Gamma API data (markets, odds, volume). Read-only, no wallet. - Create
clawk/skills/polymarket-trade/SKILL.md— stub for now, just describes the trading intent - Confirm agent can answer questions about live Polymarket markets locally
Deployment
- Add a GitHub Actions workflow
openclaw-deploy.ymlthat SSHes to the appbox and restarts the OpenClaw process - OpenClaw state (conversation history, skill state) lives in a named volume / persistent directory on the appbox (
~/clawk-agent-data/) — mounted at the same path on every deploy so redeployment never wipes it - Skills are copied from the repo into the container/process on deploy; config and state dirs are excluded from the copy and always read from the persistent volume
Deliverable: OpenClaw running on the appbox, agent answers questions about live Polymarket markets, redeployment doesn't wipe state
Connect the agent to our backend so the frontend can talk to it.
conversation_manager.py— stores chat history in DB (mirrors agent-hack pattern)- API endpoints:
POST /v1/conversations/{id}/message,GET /v1/conversations/{id}/history - Wire OpenClaw agent execution into the API request handler
- Frontend
ChatPage— basic chat UI (reuseChatViewcomponent pattern from agent-hack)
Deliverable: Type a message in the browser, agent responds, history persists across refreshes
Wire up the onchain bits.
- Deploy AWK smart wallet on Polygon (or testnet first)
polymarket_smart_wallet.py— mirrorsyieldseeker_smart_wallet_v1.py, routes calls through AWK adapters- Wrap
py-clob-clientto sign EIP-712 orders via EIP-1271 (smart wallet signing) — this is the hard part - Update
polymarket-tradeskill with real tool implementations: place order, cancel order, check positions polymarket_client.py— thin wrapper around Gamma API + CLOB API
Deliverable: Agent can autonomously place a real (small) order on Polymarket via the AWK wallet
Make the demo story land.
- Deploy
PolymarketAdapter+USDCAdaptercontracts, register in AWKAdapterRegistry OnchainStatusPage— shows registered adapters, proves guardrails are activeAgentPage— live positions, P&L, recent agent actions (mirrorsAgentOverviewPage)- Demo script: agent places trade → attempt rogue USDC transfer → show onchain revert
- Record demo video
Deliverable: Full end-to-end demo ready for submission
- Steps 1–3 can be done without any crypto/wallet setup — good for early momentum
- Step 4 is the highest-risk step; if Polymarket CLOB + EIP-1271 proves too painful, swap in GMX/Kwenta perps (same AWK story, different protocol)
- Contracts (PolymarketAdapter) are intentionally last — they're needed for the demo story but not for building the agent itself