Releases: agenticmail/enterprise
v0.5.546
Fix: Delete Shows Agent Name + Full Duplicate Rewrite
Delete Agent Fix
The 5-step delete confirmation was showing the raw UUID instead of the agent name. Now resolves name from: agent.name → engineAgent.name → config.name → ID (fallback). Fixed in both Overview and Deployment tabs.
Duplicate Agent (Complete Rewrite)
Now copies the FULL agent state:
- Admin record (role, metadata)
- Engine config (model, skills, knowledge bases, deployment settings)
- Identity (personality, traits, avatar, culture, language)
- Budget config (limits preserved, usage counters reset to 0)
- Security overrides
- Permission profile
- Agent memory
- Work schedules
- Task queue (reset to pending)
- Conversations
- Followups
- Budget alerts
- Onboarding record (deployment marked incomplete)
Does NOT copy (intentionally): sessions, activity logs, tool calls, channels (Telegram/WhatsApp/Email)
After duplication the success screen tells the user which tabs need setup: Deployment, Channels, and Manager.
Progress bar shows animated horizontal fill during the DB operation.
v0.5.545
Enhanced Kelly Criterion — Built for Prediction Markets
The old Kelly was a basic formula that ignored everything that matters in Polymarket. Now it accounts for real-world factors:
New Adjustment Factors
| Factor | What it does | Example |
|---|---|---|
| Confidence | Shrinks size based on uncertainty in your probability estimate | 70% confident → 30% smaller position |
| Spread cost | Penalizes wide-spread markets where entry cost eats your edge | 10¢ spread on 5% edge → halved position |
| Time decay | Markets closing in < 6 hours get smaller positions | 2 hours left → 50% size |
| Drawdown protection | Reduces sizing when account is losing | 20% drawdown → 40% size |
| Exposure limit | Prevents over-concentration in correlated markets | >25% in one market → 40% size |
| Liquidity constraint | Caps at 50% of orderbook depth | Only 20 shares on ask → max 10 shares |
New Outputs
recommended_shares: Exact share counts (full, half, quarter, capped, adjusted)sizing_reasoning: Human-readable explanation of every adjustmentmarket_context: Live spread, depth, max fillable sharesadjusted: The recommended size — USE THIS, not raw Kelly
Key Parameters
confidence(0.1-1.0): Most important input. How sure are you?bankroll: Your available capital. Always provide this.token_id: For live spread + liquidity datatime_to_close_hours: Reduces sizing for imminent closesdrawdown_pct: Current account drawdowncurrent_exposure: Existing $ in this/similar markets
v0.5.542
Feature: Duplicate Agent
Create exact replicas of any agent with a single click. Everything is copied: config, personality, identity, model, skills, permissions, and memory. Only the name, email, and agent ID differ.
How to use
- Go to the Agents list page
- Click the copy icon on any agent row
- Enter name and email for the duplicate
- Click "Add Another Duplicate" for batch creation
- Click Duplicate
What gets copied
- Admin record (role, metadata)
- Engine config (model, skills, knowledge bases, deployment)
- Identity (personality, traits, avatar, cultural background)
- Permission profile
- Agent memory (observations + memory index)
New files
src/admin/agent-duplicate.ts— Backend endpointsrc/dashboard/components/duplicate-agent.js— Modal component
v0.5.541
Fix: Register poly_estimate_price + CLOB Pricing Education
Tool Registration
poly_estimate_price was defined but not registered in:
tool-resolver.ts— maps tool name to skill packagent-routes.ts— allowed tools list for agentsskills/polymarket.ts— skill definition with metadata
Now properly registered so agents can actually call it.
What poly_estimate_price does
- Shows midpoint, best bid/ask, spread, and book depth
- Walks the order book to estimate average fill price for given order size
- Uses SDK's
calculateMarketPricewhen available - Recommends GTC vs FOK based on spread width
System Prompt (v0.5.540)
Agents now know:
- There is NO Gamma AMM — only CLOB with minting mechanism
- Must call
poly_estimate_pricebefore every trade - Wide spread → GTC limit at midpoint. Tight spread → FOK ok.
v0.5.539
Feature: FOK/Market Orders for Immediate Fills
The Problem
The agent reported that sports/event markets have 98-99% CLOB spreads — limit orders (GTC) sit on the book unfilled while the website shows fair prices at 50¢. This is because the website uses both CLOB and AMM liquidity, but our tools only placed CLOB limit orders.
The Fix
Added Fill-or-Kill (FOK) and Fill-and-Kill (FAK) market order support using the Polymarket SDK's createAndPostMarketOrder():
order_type="FOK"— Fill or Kill. Fills immediately at best available price or fails entirely. No partial fills.order_type="FAK"— Fill and Kill. Fills what's available, cancels the rest.order_type="MARKET"— Alias for FOK.- Default remains
GTC(limit order on the book).
How It Works
- FOK/FAK orders use
createAndPostMarketOrder()which accesses full exchange liquidity - BUY amount = dollars to spend (calculated from price × size)
- SELL amount = shares to sell
- FOK orders log as
filledimmediately (notplaced) since they're atomic - If FOK is rejected (not enough liquidity), returns clear error with suggestion to use GTC
Agent Guidance
The tool description now explains:
For sports/event markets with wide CLOB spreads, FOK at market price may work better than limit orders.
v0.5.538
Fix: Hide zero-share positions from Live Positions
Positions with 0.00 shares (fully sold or redeemed) no longer show in the Live Positions table in the wallet tab.
v0.5.536
Fix: Trade History No Longer Empty
The /trades endpoint was only querying poly_trade_log, but the archive process had already moved all filled trades to poly_trade_log_archive. Result: empty trade history with all data only visible in the archive toggle.
Fix
/tradesnow queries BOTHpoly_trade_logANDpoly_trade_log_archive- Merges results, deduplicates by ID, sorts by date (newest first)
- Trade History tab now shows all trades regardless of whether they've been archived
- Archive toggle still works as a dedicated archive view with its own filters
v0.5.535
Fix: Individual Order Cancel Now Works
poly_cancel_order was failing with "Invalid order payload" because it passed the order ID as a raw string to the CLOB API. The Polymarket SDK's cancelOrder expects { id: orderID }.
Fix
- Tries
cancelOrder({ id: orderId })first (correct format) - Falls back to
cancelOrder(orderId)(raw string for older SDK versions) - Falls back to
cancelOrders([orderId])(batch cancel with single item) - Same fix applied for the internal ID → CLOB ID lookup path
poly_cancel_all already worked because it uses cancelAll() which doesn't need an order ID.
v0.5.534
Fix: Order Status Sync + Market Lookup
Root Cause Found
All 19 orders in the database had status='placed' forever — the system never updated them to filled when the exchange executed them. The CLOB API only shows 2 actually live orders, meaning 17 were filled but the DB didn't know.
poly_get_open_orders — Auto-Sync
- Compares DB
placedorders against CLOB live orders - Orders in DB as
placedbut no longer on exchange → automatically updated tofilled - This makes them appear in Trade History (which excludes
placed) - Reports: "17 stale orders synced to filled"
- Only truly live CLOB orders shown as open
poly_get_market — Better Lookups
- Added
clob_token_idsparameter lookup (agents often pass token IDs) - Added CLOB API fallback to resolve condition_id from token
- Error message now shows the failed input for debugging
v0.5.533
Fix: Archive Only Closed Positions + Filters & Detail Modal
Archive Logic Fixed
The archive was incorrectly moving ALL filled trades out of Trade History, leaving it empty. Now it only archives:
- Failed, rejected, cancelled orders (never executed)
- Filled trades for closed positions (sold or market resolved) — checked via on-chain position data
Filled trades for positions you still hold stay in Trade History where they belong.
Archive Display
- Now uses
renderFilteredTablewith search, filters (Side, Outcome, Status), and sort by date - Clicking a row opens the detail modal — same as live trading tab
- Shows P&L and Cost columns
- Proper empty state: "Only trades for closed positions (sold or resolved markets) are archived"
Archive GET Endpoint
- Added pagination (
page,pageSizeparams) withtotalPagesin response - Added filters (
side,status,searchquery params)