An AI agent that plays the Pistols at Dawn game on Starknet. The agent, named Tinman, is a villainous duelist that autonomously participates in duels against other players.
- Node.js (v18 or higher)
- pnpm (v8 or higher)
- A Starknet wallet with LORDS tokens
- MongoDB (optional, for persistent storage)
- ChromaDB (optional, for vector storage)
If you want to use MongoDB and ChromaDB for persistent storage and vector storage, you can set up the required services using Docker:
# Start MongoDB and ChromaDB containers
docker-compose up -dThis will start:
- MongoDB on port 27017
- ChromaDB on port 8000
- Clone the repository and its dependencies:
git clone <repository-url>
cd agent-pistols
git clone <pistols-sdk-url> ../pistols/sdk- Install dependencies:
pnpm install- Create a
.envfile in the root directory with the following variables:
# AI API Keys
ANTHROPIC_API_KEY=your_anthropic_api_key
# Game Configuration
PISTOLS_GRAPHQL_URL=your_graphql_url
STARKNET_RPC_URL=your_starknet_rpc_url
STARKNET_ADDRESS=your_starknet_address
STARKNET_PRIVATE_KEY=your_starknet_private_key
DEFAULT_NETWORK_ID=your_network_id
LORDS_TOKEN_ADDRESS=your_lords_token_address
# Discord Integration (Optional)
DISCORD_TOKEN=your_discord_token
# Database Configuration (Optional)
MONGODB_URI=your_mongodb_uri
CHROMA_DB_URL=your_chroma_db_urlpnpm devpnpm build
pnpm startpnpm watch- Automatic duelist management
- Challenge creation and acceptance
- Move commitment and revelation
- Duel history analysis
- Discord integration
- Persistent memory storage with MongoDB
- Vector storage with ChromaDB
- Advanced AI decision making
To enable debug logging, set the following environment variable:
DEBUG=* pnpm devMIT