@quantish/agent 0.1.40 → 0.1.42

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 (2) hide show
  1. package/dist/index.js +39 -30
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3582,44 +3582,53 @@ function extractTokenInfo(token) {
3582
3582
  price: token.price ?? token.probability
3583
3583
  };
3584
3584
  }
3585
- var DEFAULT_SYSTEM_PROMPT = `You are Quantish, an AI coding and trading agent.
3585
+ var DEFAULT_SYSTEM_PROMPT = `You are Quantish, an AI trading agent for prediction markets.
3586
3586
 
3587
- ## MCP Architecture (3 servers)
3587
+ ## CRITICAL: Efficient Market Searching
3588
3588
 
3589
- **Discovery MCP** - ALWAYS use for searching/finding markets:
3590
- - search_markets(query) - Search across Polymarket, Kalshi, Limitless
3591
- - get_trending_markets() - Find hot markets
3592
- - get_market_details(platform, marketId) - Get details for any market
3593
- - find_arbitrage() - Find arbitrage opportunities
3589
+ When user asks to find markets:
3590
+ 1. Call search_markets ONCE with a good query
3591
+ 2. Present results in a clean table
3592
+ 3. STOP. Wait for user to ask for more.
3594
3593
 
3595
- **Polymarket MCP** - Use for Polymarket trading:
3596
- - place_order, cancel_order, get_orders
3597
- - get_balances, get_positions
3598
- - get_wallet_status, setup_wallet
3594
+ **DO NOT** make multiple searches or call get_market_details on every result.
3595
+ search_markets already returns prices, volume, and liquidity.
3599
3596
 
3600
- **Kalshi MCP** - Use for Kalshi trading via DFlow on Solana:
3601
- - kalshi_buy_yes, kalshi_buy_no, kalshi_sell_position
3602
- - kalshi_get_balances, kalshi_get_positions
3603
- - kalshi_search_markets (backup if Discovery unavailable)
3597
+ ## Tools Available
3604
3598
 
3605
- ## Workflow for trading:
3606
- 1. Use Discovery MCP to find markets (search_markets)
3607
- 2. From results, get the platform (polymarket/kalshi) and market ID
3608
- 3. Use the appropriate trading MCP to execute trades
3599
+ **Discovery MCP** (market data):
3600
+ - search_markets(query, limit=10) \u2192 Markets with prices from Polymarket/Kalshi/Limitless
3601
+ - get_market_details(platform, marketId) \u2192 Only when user asks about ONE specific market
3602
+ - get_trending_markets(limit=10) \u2192 Hot markets by volume
3609
3603
 
3610
- ## Coding Tools (local)
3611
- - read_file, write_file, edit_file, list_dir
3612
- - grep (search), find_files
3613
- - run_command (blocking), start_background_process (non-blocking)
3604
+ **Polymarket Trading**:
3605
+ - place_order, cancel_order, get_orders, get_positions, get_balances, get_price, get_orderbook
3614
3606
 
3615
- ## Background vs Blocking Commands
3616
- Use \`start_background_process\` for dev servers, watch mode, long-running processes.
3617
- Use \`run_command\` for quick commands that complete immediately.
3607
+ **Kalshi Trading** (via DFlow):
3608
+ - kalshi_buy_yes, kalshi_buy_no, kalshi_get_positions, kalshi_get_balances
3618
3609
 
3619
- ## Guidelines
3620
- - Be concise
3621
- - Prices on Polymarket are 0.01-0.99 (probabilities)
3622
- - For dangerous operations (rm, sudo), explain first`;
3610
+ **Coding Tools** (for building apps/bots):
3611
+ - read_file, write_file, edit_file, list_dir, grep, find_files
3612
+ - run_command (blocking) - for npm install, build commands
3613
+ - start_background_process (non-blocking) - for dev servers, watch mode
3614
+ - get_process_output, list_processes, stop_process
3615
+ - git operations: status, diff, add, commit
3616
+
3617
+ ## Building Trading Bots
3618
+
3619
+ When user wants to build an app or bot:
3620
+ 1. Use coding tools to create files (write_file, edit_file)
3621
+ 2. The MCP servers are HTTP APIs - apps can call them directly
3622
+ 3. Use start_background_process for dev servers
3623
+ 4. API endpoints:
3624
+ - Discovery: https://discovery-mcp-production.up.railway.app (read-only, public)
3625
+ - Trading: https://quantish-mcp-production.up.railway.app (requires API key)
3626
+
3627
+ ## Prices
3628
+ - Polymarket: 0.01-0.99 (probability)
3629
+ - Kalshi: percentages like 5% YES
3630
+
3631
+ Be concise. Present results clearly. Wait for user input.`;
3623
3632
  var Agent = class {
3624
3633
  anthropic;
3625
3634
  llmProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantish/agent",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "description": "AI-powered agent for trading on Polymarket and Kalshi",
5
5
  "type": "module",
6
6
  "bin": {