@quantish/agent 0.1.28 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +335 -172
  2. package/dist/index.js +14 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,16 @@
1
1
  # @quantish/agent
2
2
 
3
- AI-powered CLI agent for building trading bots and applications on Polymarket.
3
+ AI-powered coding & trading agent for Polymarket and Kalshi. Build trading bots, analyze markets, and execute trades using natural language.
4
4
 
5
- Combines **coding tools** (file system, shell, git) with **trading tools** (Polymarket orders, positions, wallet) powered by Claude AI.
5
+ ## Features
6
+
7
+ - **🤖 Multi-Provider AI** - Use Anthropic Claude or 100+ OpenRouter models (GLM-4.7, MiniMax, DeepSeek, etc.)
8
+ - **💹 Live Trading** - Trade on Polymarket (Polygon) and Kalshi (Solana via DFlow)
9
+ - **🔧 Full Coding Tools** - Read/write files, run commands, git operations
10
+ - **🌐 Web Search** - Search the web with Exa AI or DuckDuckGo fallback
11
+ - **💾 Session Persistence** - Save and resume conversations across sessions
12
+ - **⚡ Queued Input** - Type while the agent is working, queue messages
13
+ - **📊 Cost Tracking** - Real-time token usage and cost display
6
14
 
7
15
  ## Installation
8
16
 
@@ -10,265 +18,420 @@ Combines **coding tools** (file system, shell, git) with **trading tools** (Poly
10
18
  npm install -g @quantish/agent
11
19
  ```
12
20
 
13
- Or run directly with npx:
21
+ ## Quick Start
14
22
 
15
23
  ```bash
16
- npx @quantish/agent
24
+ # First-time setup
25
+ quantish init
26
+
27
+ # Start interactive chat
28
+ quantish
17
29
  ```
18
30
 
19
- ## Quick Start
31
+ ## How It Works
32
+
33
+ The agent connects to three MCP (Model Context Protocol) servers:
34
+
35
+ | MCP | URL | Auth | Purpose |
36
+ |-----|-----|------|---------|
37
+ | Discovery | `quantish.live/mcp` | Public (embedded key) | Search markets across all platforms |
38
+ | Polymarket | `quantish-sdk-production.up.railway.app/mcp` | `QUANTISH_API_KEY` | Trade on Polymarket (Polygon) |
39
+ | Kalshi | `kalshi-mcp-production-7c2c.up.railway.app/mcp` | `KALSHI_API_KEY` | Trade on Kalshi (Solana via DFlow) |
40
+
41
+ **Polymarket** - Managed Polygon wallet:
42
+ - ✅ Gasless transactions (Polymarket covers fees)
43
+ - ✅ Signs orders using Polymarket's required format
44
+ - ✅ Works globally (no geo-restrictions)
45
+ - 🔒 Non-custodial - export your private key anytime
46
+
47
+ **Kalshi** - Managed Solana wallet via DFlow:
48
+ - ✅ Trade on CFTC-regulated Kalshi markets
49
+ - ✅ Uses DFlow protocol for on-chain settlement
50
+ - ⚡ Small SOL fees (~0.01 SOL per trade)
51
+ - 🔒 Non-custodial - export your private key anytime
52
+
53
+ ## Interactive Commands
54
+
55
+ ### Chat Commands
56
+
57
+ | Command | Description |
58
+ |---------|-------------|
59
+ | `/help` | Show all commands |
60
+ | `/clear` | Clear conversation history |
61
+ | `/compact` | Summarize conversation to save tokens |
62
+ | `/model <name>` | Switch model (opus, sonnet, haiku, glm, minimax, etc.) |
63
+ | `/provider <name>` | Switch LLM provider (anthropic, openrouter) |
64
+ | `/cost` | Show session cost breakdown |
65
+ | `/tools` | List available tools |
66
+ | `/config` | Show configuration info |
67
+
68
+ ### Session Commands
69
+
70
+ | Command | Description |
71
+ |---------|-------------|
72
+ | `/save [name]` | Save current session |
73
+ | `/resume` | Resume last session |
74
+ | `/sessions` | List all saved sessions |
75
+ | `/load <id>` | Load a session by ID |
76
+ | `/forget` | Delete all saved sessions |
77
+
78
+ ### Process Commands
79
+
80
+ | Command | Description |
81
+ |---------|-------------|
82
+ | `/processes` | List running background processes |
83
+ | `/stop <id>` | Stop a background process |
84
+ | `/stopall` | Stop all background processes |
85
+
86
+ ### Keyboard Shortcuts
20
87
 
21
- ### 1. Initialize
88
+ | Key | Action |
89
+ |-----|--------|
90
+ | `Enter` | Send message (or queue if agent is working) |
91
+ | `Esc` | Interrupt current generation |
92
+ | `Ctrl+C` | Exit CLI |
22
93
 
23
- Set up your API keys:
94
+ ## CLI Options
24
95
 
25
96
  ```bash
26
- quantish init
97
+ quantish # Interactive mode
98
+ quantish init # First-time setup wizard
99
+ quantish config # View configuration
100
+ quantish config --export # Export as .env format
101
+ quantish tools # List all available tools
102
+ quantish -p "message" # One-shot mode
103
+ quantish --version # Show version
27
104
  ```
28
105
 
29
- You'll need:
30
- - **Anthropic API Key** - Get one at https://console.anthropic.com/
31
- - **Quantish API Key** - Created automatically during setup
106
+ | Option | Description |
107
+ |--------|-------------|
108
+ | `-p, --prompt <message>` | Run a single prompt |
109
+ | `-v, --verbose` | Show detailed tool calls |
110
+ | `--no-mcp` | Disable trading tools |
111
+ | `--no-local` | Disable coding tools |
112
+
113
+ ## Available Tools
114
+
115
+ ### Local Tools (Coding)
32
116
 
33
- ### 2. Start Building
117
+ | Tool | Description |
118
+ |------|-------------|
119
+ | `read_file` | Read file contents with line numbers |
120
+ | `write_file` | Create or overwrite files |
121
+ | `edit_file` | Search and replace in files |
122
+ | `edit_lines` | Edit specific line ranges (efficient) |
123
+ | `list_dir` | List directory contents |
124
+ | `delete_file` | Delete files |
125
+ | `file_exists` | Check if file exists |
126
+ | `run_command` | Execute shell commands (blocking) |
127
+ | `start_background_process` | Run long-running processes |
128
+ | `get_process_output` | Get output from background process |
129
+ | `stop_process` | Stop a background process |
130
+ | `grep` | Search file contents |
131
+ | `find_files` | Find files by pattern |
132
+ | `setup_env` | Create/update .env files |
34
133
 
35
- **Interactive mode:**
134
+ ### Git Tools
135
+
136
+ | Tool | Description |
137
+ |------|-------------|
138
+ | `git_status` | Get repository status |
139
+ | `git_diff` | Show changes |
140
+ | `git_add` | Stage files |
141
+ | `git_commit` | Create commits |
142
+ | `git_log` | Show commit history |
143
+ | `git_checkout` | Switch branches |
144
+
145
+ ### Web Tools
146
+
147
+ | Tool | Description |
148
+ |------|-------------|
149
+ | `web_search` | Search the web (Exa/DuckDuckGo) |
150
+ | `web_answer` | AI-powered Q&A (requires Exa API key) |
151
+ | `fetch_url` | Fetch URL content |
152
+
153
+ ### MCP Tools - Discovery
154
+
155
+ | Tool | Description |
156
+ |------|-------------|
157
+ | `search_markets` | Search markets across Polymarket, Kalshi, Limitless |
158
+ | `get_trending_markets` | Get trending/popular markets |
159
+ | `get_market_details` | Get market info and prices |
160
+ | `get_categories` | List available categories |
161
+ | `get_market_stats` | Get platform statistics |
162
+
163
+ ### MCP Tools - Polymarket Trading
164
+
165
+ | Tool | Description |
166
+ |------|-------------|
167
+ | `get_balances` | Check USDC and position balances |
168
+ | `get_positions` | View current positions |
169
+ | `place_order` | Place buy/sell orders |
170
+ | `cancel_order` | Cancel open orders |
171
+ | `get_orders` | List orders |
172
+ | `get_orderbook` | Get market orderbook |
173
+ | `get_price` | Get current price |
174
+ | `transfer_usdc` | Transfer USDC |
175
+ | `claim_winnings` | Claim from resolved markets |
176
+ | `export_private_key` | Export wallet private key |
177
+
178
+ ### MCP Tools - Kalshi Trading
179
+
180
+ | Tool | Description |
181
+ |------|-------------|
182
+ | `kalshi_signup` | Create new account with Solana wallet |
183
+ | `kalshi_search_markets` | Search Kalshi markets |
184
+ | `kalshi_get_market` | Get market details by ticker |
185
+ | `kalshi_get_events` | Browse market categories |
186
+ | `kalshi_get_live_data` | Get live market data |
187
+ | `kalshi_get_quote` | Get quote for buy/sell order |
188
+ | `kalshi_place_order` | Execute a trade on Solana |
189
+ | `kalshi_get_wallet_info` | Get wallet address and balances |
190
+ | `kalshi_get_positions` | View Kalshi positions |
191
+ | `kalshi_check_market_initialization` | Check if market is tokenized |
192
+ | `kalshi_initialize_market` | Initialize market on-chain |
193
+ | `kalshi_check_redemption_status` | Check if market can be redeemed |
194
+ | `kalshi_export_private_key` | Export Solana private key |
195
+
196
+ ## LLM Providers
197
+
198
+ ### Anthropic (Default for new installs)
199
+
200
+ Uses Claude models directly via Anthropic API.
36
201
 
37
202
  ```bash
38
- quantish
203
+ /model opus # Claude Opus 4.5 - Most capable
204
+ /model sonnet # Claude Sonnet 4.5 - Balanced (default)
205
+ /model haiku # Claude Haiku 4.5 - Fastest/cheapest
39
206
  ```
40
207
 
41
- Example conversations:
208
+ ### OpenRouter
42
209
 
43
- ```
44
- You: Create a trading bot that monitors Bitcoin markets and alerts on price changes
45
- Assistant: I'll create that for you. Let me first search for Bitcoin markets...
46
- [Calling search_markets...]
47
- [Writing bitcoin-monitor.js...]
210
+ Access 100+ models from various providers.
48
211
 
49
- You: What's my current balance?
50
- Assistant: Your Safe wallet has 125.50 USDC available for trading.
212
+ ```bash
213
+ /provider openrouter # Switch to OpenRouter
51
214
 
52
- You: Place a $10 YES order on Trump winning at 55 cents
53
- Assistant: Order placed! Order ID: abc123...
215
+ /model glm # GLM-4.7 (default for OpenRouter) - Best for coding
216
+ /model minimax # MiniMax M2.1 - Fast and cheap
217
+ /model deepseek # DeepSeek V3.2 - Great reasoning
218
+ /model gemini # Gemini 2.0 Flash - Google's latest
219
+ /model grok # Grok 3 Mini Beta - xAI
54
220
  ```
55
221
 
56
- **One-shot mode:**
57
-
222
+ Or use any OpenRouter model ID:
58
223
  ```bash
59
- quantish -p "check my open orders"
224
+ /model anthropic/claude-3.5-sonnet
225
+ /model meta-llama/llama-3.3-70b-instruct
60
226
  ```
61
227
 
62
- ## Commands
228
+ ## Configuration
63
229
 
64
- | Command | Description |
65
- |---------|-------------|
66
- | `quantish` | Start interactive chat |
67
- | `quantish init` | Configure API keys |
68
- | `quantish config` | View configuration |
69
- | `quantish config --server <url>` | Set custom MCP server URL |
70
- | `quantish config --export` | Export keys for standalone apps |
71
- | `quantish tools` | List available tools |
72
- | `quantish -p "..."` | Run one-shot prompt |
230
+ Configuration is stored in `~/.quantish/config.json`.
73
231
 
74
- ## Options
232
+ ### Environment Variables
75
233
 
76
- | Option | Description |
77
- |--------|-------------|
78
- | `-p, --prompt <message>` | Run a single prompt |
79
- | `-v, --verbose` | Show tool calls |
80
- | `--no-mcp` | Disable trading tools |
81
- | `--no-local` | Disable coding tools |
82
- | `--version` | Show version |
83
- | `--help` | Show help |
234
+ | Variable | Description |
235
+ |----------|-------------|
236
+ | `ANTHROPIC_API_KEY` | Anthropic API key |
237
+ | `OPENROUTER_API_KEY` | OpenRouter API key |
238
+ | `QUANTISH_API_KEY` | Polymarket trading API key |
239
+ | `KALSHI_API_KEY` | Kalshi trading API key |
240
+ | `EXA_API_KEY` | Exa AI search key (optional) |
241
+ | `MCP_SERVER_URL` | Custom Polymarket MCP server URL |
242
+ | `KALSHI_MCP_URL` | Custom Kalshi MCP server URL |
84
243
 
85
- ## Building Standalone Applications
244
+ ### Export Configuration
86
245
 
87
- The real power of Quantish is building standalone applications that interact with prediction markets. The agent can create trading bots, web dashboards, notification systems, and more.
246
+ ```bash
247
+ quantish config --export > .env
248
+ ```
88
249
 
89
- ### MCP API Overview
250
+ ## Building Applications
90
251
 
91
- There are two MCP endpoints:
252
+ The agent can build standalone applications that use the Quantish MCP API. When building apps, ensure:
92
253
 
93
- | Endpoint | Purpose | Auth Required |
94
- |----------|---------|---------------|
95
- | Trading API | Wallet, orders, positions | Yes (QUANTISH_API_KEY) |
96
- | Discovery API | Search markets, prices | No (public key) |
254
+ 1. **Use HTTP API** - Don't use MCP SDK directly
255
+ 2. **Environment Variables** - Store API keys in `.env`
256
+ 3. **Three Endpoints**:
257
+ - Discovery: `https://quantish.live/mcp/execute` (public)
258
+ - Polymarket: `https://quantish-sdk-production.up.railway.app/mcp/execute` (requires `QUANTISH_API_KEY`)
259
+ - Kalshi: `https://kalshi-mcp-production-7c2c.up.railway.app/mcp` (requires `KALSHI_API_KEY`)
97
260
 
98
- ### Trading API (Requires Your API Key)
261
+ Example API calls:
99
262
 
100
263
  ```javascript
264
+ // Discovery MCP (simple format)
265
+ const response = await fetch('https://quantish.live/mcp/execute', {
266
+ method: 'POST',
267
+ headers: {
268
+ 'Content-Type': 'application/json',
269
+ 'X-API-Key': 'qm_ueQeqrmvZyHtR1zuVbLYkhx0fKyVAuV8'
270
+ },
271
+ body: JSON.stringify({
272
+ name: 'search_markets',
273
+ arguments: { query: 'bitcoin', limit: 5 }
274
+ })
275
+ });
276
+
277
+ // Polymarket Trading MCP (JSON-RPC format)
101
278
  const response = await fetch('https://quantish-sdk-production.up.railway.app/mcp/execute', {
102
279
  method: 'POST',
103
280
  headers: {
104
281
  'Content-Type': 'application/json',
105
- 'x-api-key': process.env.QUANTISH_API_KEY
282
+ 'X-API-Key': process.env.QUANTISH_API_KEY
106
283
  },
107
284
  body: JSON.stringify({
108
285
  jsonrpc: '2.0',
286
+ id: 1,
109
287
  method: 'tools/call',
110
- params: { name: 'get_balances', arguments: {} },
111
- id: Date.now()
288
+ params: { name: 'get_positions', arguments: {} }
112
289
  })
113
290
  });
114
291
 
115
- const data = await response.json();
116
- const result = JSON.parse(data.result.content[0].text);
117
- ```
118
-
119
- **Trading Tools:** `get_balances`, `get_positions`, `place_order`, `cancel_order`, `get_orders`, `get_orderbook`, `get_price`, `transfer_usdc`
120
-
121
- ### Discovery API (Free, No Auth)
122
-
123
- ```javascript
124
- const response = await fetch('https://quantish.live/mcp/execute', {
292
+ // Kalshi Trading MCP (JSON-RPC format)
293
+ const response = await fetch('https://kalshi-mcp-production-7c2c.up.railway.app/mcp', {
125
294
  method: 'POST',
126
295
  headers: {
127
296
  'Content-Type': 'application/json',
128
- 'X-API-Key': 'qm_ueQeqrmvZyHtR1zuVbLYkhx0fKyVAuV8' // Public key
297
+ 'X-API-Key': process.env.KALSHI_API_KEY
129
298
  },
130
299
  body: JSON.stringify({
131
- name: 'search_markets', // Simple format for Discovery
132
- arguments: { query: 'bitcoin', limit: 5 }
300
+ jsonrpc: '2.0',
301
+ id: 1,
302
+ method: 'tools/call',
303
+ params: { name: 'kalshi_get_positions', arguments: {} }
133
304
  })
134
305
  });
135
-
136
- const data = await response.json();
137
- const result = JSON.parse(data.result.content[0].text);
138
306
  ```
139
307
 
140
- **Discovery Tools:** `search_markets`, `get_market_details`, `get_trending_markets`, `find_arbitrage`
308
+ ## Self-Hosting
309
+
310
+ You can self-host your own Trading MCP servers for full control over your wallet keys.
141
311
 
142
- ### Example: Ask the Agent to Build an App
312
+ ### Polymarket Server
143
313
 
144
314
  ```bash
145
- quantish
146
- > Create a Node.js script that monitors Bitcoin markets and sends a Discord notification when prices move more than 10%
315
+ npm install @quantish/server
147
316
  ```
148
317
 
149
- The agent will create all necessary files:
150
- - Main application code with MCP helper functions
151
- - `package.json` with dependencies
152
- - `.env.example` with required environment variables
153
- - `README.md` with setup instructions
318
+ ```bash
319
+ # Configure CLI to use your server
320
+ export MCP_SERVER_URL=https://your-server.com/mcp
321
+ ```
322
+
323
+ Resources:
324
+ - **NPM**: [@quantish/server](https://www.npmjs.com/package/@quantish/server)
325
+ - **GitHub**: [joinQuantish/quantish-server](https://github.com/joinQuantish/quantish-server)
326
+ - **Polymarket API**: [docs.polymarket.com](https://docs.polymarket.com)
154
327
 
155
- ## Architecture
328
+ ### Kalshi Server
156
329
 
330
+ ```bash
331
+ npm install @quantish/kalshi-server
157
332
  ```
158
- quantish (CLI)
159
-
160
- ├── Local Tools (filesystem, shell, git)
161
- │ └── Runs directly on your machine
162
-
163
- └── MCP Tools (trading + discovery)
164
- ├── Trading MCP (your wallet, orders)
165
- │ └── https://quantish-sdk-production.up.railway.app/mcp
166
-
167
- └── Discovery MCP (public market data)
168
- └── https://quantish.live/mcp
333
+
334
+ ```bash
335
+ # Configure CLI to use your server
336
+ export KALSHI_MCP_URL=https://your-kalshi-server.com/mcp
169
337
  ```
170
338
 
171
- ## Self-Hosting
339
+ Required environment variables for Kalshi server:
340
+ - `DATABASE_URL` - PostgreSQL connection string
341
+ - `ENCRYPTION_KEY` - 64-char hex string for wallet encryption
342
+ - `DFLOW_API_KEY` - DFlow API key
343
+ - `SOLANA_RPC_URL` - Solana RPC endpoint
172
344
 
173
- You can run your own Trading MCP server for full control over your wallet keys.
345
+ Resources:
346
+ - **NPM**: [@quantish/kalshi-server](https://www.npmjs.com/package/@quantish/kalshi-server)
347
+ - **GitHub**: [joinQuantish/kalshi-mcp](https://github.com/joinQuantish/kalshi-mcp)
348
+ - **DFlow Docs**: [docs.dflow.net](https://docs.dflow.net)
174
349
 
175
- ### Configure Custom Server
350
+ See the [Self-Hosting Guide](https://docs.quantish.live/self-hosting.html) for full deployment instructions.
176
351
 
177
- ```bash
178
- # Set via CLI
179
- quantish config --server https://your-server.com/mcp
352
+ ## Platform Support
180
353
 
181
- # Or via environment variable
182
- export MCP_SERVER_URL=https://your-server.com/mcp
183
- ```
354
+ | Platform | Support |
355
+ |----------|---------|
356
+ | macOS | ✅ Full support |
357
+ | Linux | ✅ Full support |
358
+ | Windows | ⚠️ Requires WSL |
184
359
 
185
- ### What You Need
360
+ ## Examples
186
361
 
187
- 1. **Server**: Deploy the `quantish-server` to Railway, Render, or your own VPS
188
- 2. **Database**: PostgreSQL for user data and encrypted keys
189
- 3. **Polymarket Builder Credentials**: Apply at https://polymarket.com/builder
362
+ ```bash
363
+ # Search for markets (both Polymarket and Kalshi)
364
+ quantish -p "find markets about bitcoin"
190
365
 
191
- See [Self-Hosting Guide](https://quantish.live/docs/self-hosting.html) for full instructions.
366
+ # Check Polymarket positions
367
+ quantish -p "show my Polymarket positions with P&L"
192
368
 
193
- ## Configuration
369
+ # Check Kalshi positions
370
+ quantish -p "show my Kalshi positions"
371
+
372
+ # Create a Kalshi account
373
+ quantish
374
+ > Create a Kalshi account for me
375
+
376
+ # Trade on Kalshi
377
+ quantish
378
+ > Buy $10 of YES on the next Fed rate decision market on Kalshi
194
379
 
195
- Configuration is stored in `~/.quantish/config.json`:
380
+ # Build a trading bot
381
+ quantish
382
+ > Create a bot that monitors Trump markets and alerts me when prices change more than 5%
196
383
 
197
- ```json
198
- {
199
- "anthropicApiKey": "sk-ant-...",
200
- "quantishApiKey": "qtsh_...",
201
- "mcpServerUrl": "https://quantish-sdk-production.up.railway.app/mcp",
202
- "model": "claude-sonnet-4-5-20250929"
203
- }
384
+ # Code review
385
+ quantish
386
+ > Review my trading bot code and suggest improvements
204
387
  ```
205
388
 
206
- Environment variables take precedence:
207
- - `ANTHROPIC_API_KEY`
208
- - `QUANTISH_API_KEY`
209
- - `MCP_SERVER_URL`
389
+ ## Troubleshooting
210
390
 
211
- ## Available Tools
391
+ ### Tool calls failing with malformed arguments
212
392
 
213
- ### Local Tools (Coding)
393
+ Some OpenRouter models (like GLM-4.7) occasionally emit malformed tool calls. The CLI includes robust parsing to handle these, but if issues persist:
214
394
 
215
- | Tool | Description |
216
- |------|-------------|
217
- | `read_file` | Read file contents |
218
- | `write_file` | Write/create files |
219
- | `edit_file` | Search and replace in files |
220
- | `list_dir` | List directory contents |
221
- | `delete_file` | Delete files |
222
- | `setup_env` | Create/update .env files |
223
- | `run_command` | Execute shell commands |
224
- | `grep` | Search file contents |
225
- | `find_files` | Find files by pattern |
226
- | `git_status` | Get git status |
227
- | `git_diff` | Show git diff |
228
- | `git_add` | Stage files |
229
- | `git_commit` | Create commits |
395
+ ```bash
396
+ /model sonnet # Switch to Claude Sonnet
397
+ ```
230
398
 
231
- ### MCP Tools (Trading)
399
+ ### Session not resuming
232
400
 
233
- | Tool | Description |
234
- |------|-------------|
235
- | `get_balances` | Check wallet balances |
236
- | `get_positions` | View current positions |
237
- | `place_order` | Place buy/sell orders |
238
- | `cancel_order` | Cancel open orders |
239
- | `get_orders` | List orders |
240
- | `get_orderbook` | Get market orderbook |
241
- | `get_price` | Get current price |
242
- | `transfer_usdc` | Transfer USDC |
401
+ Sessions are stored in `~/.quantish/sessions/`. To reset:
243
402
 
244
- ### MCP Tools (Discovery)
403
+ ```bash
404
+ rm -rf ~/.quantish/sessions
405
+ ```
245
406
 
246
- | Tool | Description |
247
- |------|-------------|
248
- | `search_markets` | Search markets by keyword |
249
- | `get_market_details` | Get full market info |
250
- | `get_trending_markets` | Popular markets |
251
- | `find_arbitrage` | Find price discrepancies |
407
+ ### High token usage
252
408
 
253
- ## Platform Support
409
+ ```bash
410
+ /compact # Summarize conversation
411
+ /model haiku # Switch to cheaper model
412
+ /clear # Start fresh
413
+ ```
254
414
 
255
- | Platform | Support |
256
- |----------|---------|
257
- | macOS | ✅ Full support |
258
- | Linux | ✅ Full support |
259
- | Windows | ⚠️ Requires WSL |
415
+ ## Development
260
416
 
261
- **Windows users:** Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) and run Quantish from within WSL.
417
+ ```bash
418
+ git clone https://github.com/joinQuantish/quantish-agent
419
+ cd quantish-agent
420
+ npm install
421
+ npm run build
422
+ npm link # Install locally
423
+ ```
262
424
 
263
- ## How It Works
425
+ ## License
264
426
 
265
- Quantish CLI connects to the **Quantish Signing Server** to execute trades on Polymarket:
427
+ This project is licensed under the [PolyForm Noncommercial License 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0/).
266
428
 
267
- - **Your funds are secure** - Only you can authorize transactions via your API key
268
- - **Wallets are non-custodial** - Export your private key anytime with `export_private_key`
269
- - **Trading is free** - No gas fees (Polymarket covers them)
270
- - **Self-hosting available** - Run your own server for full control
429
+ **Free for personal use, research, and non-commercial purposes.** Commercial use requires explicit permission from Quantish Inc. Contact hello@quantish.live for commercial licensing.
271
430
 
272
- ## License
431
+ ## Links
273
432
 
274
- MIT
433
+ - [Agent Website](https://agent.quantish.live)
434
+ - [GitHub](https://github.com/joinQuantish/quantish-agent)
435
+ - [NPM](https://www.npmjs.com/package/@quantish/agent)
436
+ - [Documentation](https://docs.quantish.live)
437
+ - [Quantish Platform](https://quantish.live)
package/dist/index.js CHANGED
@@ -846,9 +846,13 @@ async function runSetup() {
846
846
  if (result.success && typeof result.data === "object" && result.data !== null) {
847
847
  const data = result.data;
848
848
  console.log(chalk.green("\u2713 Polymarket MCP connected"));
849
- console.log(chalk.dim(` Safe Address: ${data.safeAddress || "Not yet deployed"}`));
850
- console.log(chalk.dim(` Status: ${data.status}`));
851
- console.log(chalk.dim(` Ready to trade: ${data.isReady ? "Yes" : "Run setup_wallet first"}`));
849
+ if (data.safeAddress) {
850
+ console.log(chalk.dim(` Safe Address: ${data.safeAddress}`));
851
+ console.log(chalk.dim(` Status: READY`));
852
+ } else {
853
+ console.log(chalk.dim(` Safe Address: Will deploy on first trade`));
854
+ console.log(chalk.dim(` Status: CREATED (wallet ready, Safe deploys on first trade)`));
855
+ }
852
856
  } else {
853
857
  console.log(chalk.yellow("\u26A0 Polymarket MCP: " + (result.error || "Unknown error")));
854
858
  }
@@ -865,8 +869,13 @@ async function runSetup() {
865
869
  const result = await kalshiClient.callTool("kalshi_get_wallet_info", {});
866
870
  if (result.success && typeof result.data === "object" && result.data !== null) {
867
871
  const data = result.data;
872
+ const wallet = data.wallet;
873
+ const publicKey = wallet?.publicKey;
868
874
  console.log(chalk.green("\u2713 Kalshi MCP connected"));
869
- console.log(chalk.dim(` Solana Address: ${data.publicKey || "Unknown"}`));
875
+ console.log(chalk.dim(` Solana Address: ${publicKey || "No wallet yet"}`));
876
+ if (wallet) {
877
+ console.log(chalk.dim(` Status: READY`));
878
+ }
870
879
  } else {
871
880
  console.log(chalk.yellow("\u26A0 Kalshi MCP: " + (result.error || "Unknown error")));
872
881
  }
@@ -5443,7 +5452,7 @@ Stopped ${count} background process${count > 1 ? "es" : ""}.`);
5443
5452
  }
5444
5453
 
5445
5454
  // src/index.ts
5446
- var VERSION = "0.1.28";
5455
+ var VERSION = "0.1.29";
5447
5456
  function cleanup() {
5448
5457
  if (processManager.hasRunning()) {
5449
5458
  const count = processManager.runningCount();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantish/agent",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "AI-powered agent for trading on Polymarket and Kalshi",
5
5
  "type": "module",
6
6
  "bin": {