On-chain Werewolf with AI agents that think, deceive, and betray.
View Contract · Getting Started · How It Works · Roadmap
ShadowPack is a social deduction game (Werewolf) where you play alongside AI agents on OneChain. Six AI opponents with distinct personalities join the circle. They accuse, defend, deflect, and deceive in real time. The wolf hides among them. Find it before the village falls.
Werewolf needs 8+ people in the same room, at the same time, with the same energy level. That rarely happens. Online versions are either turn-based text games or require lobbies of strangers with zero accountability.
Blockchain gaming promises ownership and transparency, but most GameFi projects are DeFi with pixel art. No real gameplay.
ShadowPack puts LLM-powered AI agents into an on-chain Werewolf game. No need for 7 friends online. Connect your wallet, stake OCT, and match wits against six AI personalities, each running on a different model with unique behavior. The game is not scripted. The AI reacts to chat context, defends when accused, and wolves actively deceive the village.
- Six AI personalities: each powered by a different LLM (Llama 3.3 70B, Llama 3.1 8B, Mixtral 8x7B) with unique conversational style
- On-chain game creation: games are Move shared objects on OneChain with OCT staking
- Full game loop: lobby, night kills, day discussion, voting, elimination, runoff tiebreakers
- Role system: Werewolf, Villager, Seer, Doctor with distinct night abilities
- Spectator betting: eliminated players bet on which side wins (Villagers vs Wolves)
- Night phase interaction: werewolf players select their prey from a target picker
- Reactive AI conversations: agents respond to accusations, agree/disagree with each other, wolves deflect blame
- Broadcast-style UI: chyron headers, live indicators, cinematic night overlays
- Connect wallet and create a game (stakes OCT on-chain)
- Add AI agents in the lobby. Pick from Marcus, Sofia, Viktor, Elise, Kai, or Nyx
- Hit GO LIVE when you have 6+ players
- A villager NPC is killed in the first night. The village wakes up.
- Day Discussion (30s): AI agents chat, accuse each other. Use the Accuse/Defend buttons to participate.
- Day Voting: everyone votes. The player with the most votes is eliminated. Ties trigger a runoff.
- If the wolf was voted out, villagers win. Otherwise, night falls.
- Night Phase: the wolf picks a prey to eliminate. If you are the wolf, you choose. If not, you wait.
- Cycle repeats until one side wins.
Win conditions:
- All wolves eliminated = Villagers win
- Wolves equal or outnumber villagers = Wolves win
| Agent | Style | Model | Behavior |
|---|---|---|---|
| Marcus | Analytical | Llama 3.3 70B (temp 0.6) | Tracks patterns, references evidence, cold precision |
| Sofia | Emotional | Llama 3.1 8B (temp 0.9) | Gut instincts, passionate defenses, fierce loyalty |
| Viktor | Aggressive | Mixtral 8x7B (temp 0.7) | Demands answers, confrontational, zero tolerance |
| Elise | Observer | Llama 3.3 70B (temp 0.5) | Barely speaks. Short fragments. Devastating reads. |
| Kai | Trickster | Llama 3.1 8B (temp 0.95) | Jokes and sarcasm masking sharp deduction |
| Nyx | Paranoid | Mixtral 8x7B (temp 0.85) | Sees conspiracies everywhere. ALL CAPS emphasis. |
Wolf agents actively deceive: deflecting suspicion, scapegoating innocents, and subtly defending fellow wolves without being obvious.
| Layer | Technology |
|---|---|
| Blockchain | OneChain (Move-based L1) |
| Smart Contract | Move (legacy edition) |
| Frontend | Next.js 16, React 19, TypeScript |
| Styling | Tailwind CSS 4, custom design system |
| AI Engine | Groq API (3 models per game) |
| Wallet | @onelabs/dapp-kit |
| State | React Context + Reducer (real-time game engine) |
| Contract | Address | Description |
|---|---|---|
shadowpack::game |
0xdfbf...5eda |
Game rooms, role assignment, voting, betting, elimination |
Entry functions: create_game, join_game, add_ai_player, start_game, cast_vote, eliminate_player, advance_phase, place_bet, settle_bets
Browser (Next.js + React)
|
+---> OneChain RPC (game creation, voting, betting)
| |
| +---> GameRoom (shared object)
| ├── players, roles, votes
| ├── betting pool (Balance<OCT>)
| └── phase state machine
|
+---> Groq API (AI agent responses)
| ├── Llama 3.3 70B (Marcus, Elise)
| ├── Llama 3.1 8B (Sofia, Kai)
| └── Mixtral 8x7B (Viktor, Nyx)
|
+---> Game Engine (client-side)
├── Phase orchestration (night/day/vote)
├── AI chat scheduling
├── Vote tallying + runoff logic
└── Win condition checks
git clone https://github.com/ajanaku1/ShadowPack.git
cd ShadowPack/frontend
npm installCreate frontend/.env.local:
NEXT_PUBLIC_PACKAGE_ID=0xdfbfc85c8bea16d1a4d9602ad758591402ca836835b018ed3cce49e5145c5eda
NEXT_PUBLIC_RPC_URL=https://rpc-testnet.onelabs.cc:443
GROQ_API_KEY=your_groq_api_keyRun the dev server:
npm run devOpen http://localhost:3000.
cd contract
# Install OneChain CLI
# Download from https://github.com/one-chain-labs/onechain/releases
one move build
one client publish --gas-budget 500000000 --skip-dependency-verificationUpdate NEXT_PUBLIC_PACKAGE_ID with the new PackageID.
- Install the OneChain wallet browser extension
- Switch to OneChain Testnet
- Get testnet OCT from the faucet:
one client faucet - Open the app and connect your wallet
- Click "Enter the Pack" on the landing page
- Click "Create Game", set stake amount (e.g. 1 OCT), max players (6-10), and your alias
- Sign the transaction to create the game on-chain
- In the lobby, click AI agents on the right panel to add them (need 5+ AI for 6 total)
- Click "GO LIVE" to start
- Play through the game loop: discussion, voting, night phase
- If eliminated, use the betting panel to bet on which side wins
ShadowPack/
├── contract/
│ ├── sources/
│ │ └── shadowpack.move # Game logic: rooms, voting, betting, elimination
│ └── Move.toml # OneChain dependency config
├── frontend/
│ ├── src/
│ │ ├── app/
│ │ │ ├── page.tsx # Landing page
│ │ │ ├── game/page.tsx # Game menu (create/join)
│ │ │ └── game/[id]/ # Dynamic game room page
│ │ ├── components/
│ │ │ ├── GameView.tsx # Main game orchestrator
│ │ │ ├── GameLobby.tsx # Pre-game lobby with ritual circle
│ │ │ ├── GameChat.tsx # Chat with accuse/defend buttons
│ │ │ ├── VotingPanel.tsx # Vote UI with runoff support
│ │ │ ├── BettingPanel.tsx # Villagers vs Wolves side bets
│ │ │ ├── GameResult.tsx # End screen with role reveals
│ │ │ ├── PlayerList.tsx # Player sidebar
│ │ │ └── PhaseTimer.tsx # Countdown timer
│ │ ├── hooks/
│ │ │ └── useGameEngine.ts # AI orchestration + game loop
│ │ └── lib/
│ │ ├── ai-agents.ts # Personality definitions + prompts
│ │ ├── contracts.ts # Move transaction builders
│ │ ├── game-store.ts # State management (Context + Reducer)
│ │ └── constants.ts # Game config, role definitions
│ └── public/
│ └── logo.png # ShadowPack wolf logo
├── README.md
└── LICENSE
- Move smart contract deployed on OneChain testnet
- Full game loop with all phases
- 6 AI personalities with LLM-powered conversations (3 different models)
- Spectator betting (villagers vs wolves)
- Runoff voting for ties
- Role-based night actions
- Broadcast-style responsive UI
- WebSocket real-time multiplayer with multiple human players
- Fully on-chain game state verification
- OCT prize pool auto-distribution via smart contract
- Spectator mode for watching live games
- On-chain bet settlement
- Player NFT profiles with win/loss records
- Collectible AI personality skins
- Tournament system with bracket competitions
- Seasonal leaderboard with OCT rewards
- Fine-tuned Werewolf-specific AI models
- Adjustable AI difficulty levels
- DAO governance for game rules and features
- Community-created custom roles
- Custom game mode marketplace
- AI agent NFT trading
- Native mobile app (iOS/Android)
- SDK for building social deduction games on the ShadowPack protocol
OneHack 3.0: AI and GameFi Edition | Built on OneChain's Move-based infrastructure
