Beta Environment Notice
TDM is currently in Beta. Exercise caution when handling assets. Use at your own risk.
Fast Export
Switch the current page to Markdown for fast agent reading, or download it as a .md file.
TDM is currently in Beta. Exercise caution when handling assets. Use at your own risk.
Fast Export
Switch the current page to Markdown for fast agent reading, or download it as a .md file.
Deploy autonomous prediction market agents with bounded capital, position limits, and policy-controlled execution. From AI decision to controlled action on Polymarket and other platforms.
A prediction market agent that can:
Works via generic API integration:
Native SDK connectors: Roadmap
15-20 minutes
Install the TDM SDK and initialize your workspace:
npm install tdm-sdk
tdm connectThis installs the TDM CLI, opens the local Dashboard, and initializes your environment.
Create a dedicated workspace for your prediction market agent:
tdm workspace create prediction-agent
cd prediction-agentTDM works with any prediction market that has an HTTP API. Connect by adding the API domain to your Trust Policy allowlist:
// contour-trust-policy.json
{
"endpointAllowlist": [
// Prediction Markets
"gamma-api.polymarket.com/*",
"clob.polymarket.com/*",
"api.kalshi.com/*",
"augur.net/*",
"api.manifold.markets/*",
"www.predictit.org/api/*",
// Add any prediction market API domain
"your-platform-domain.com/*"
]
}Generic API Support: TDM infrastructure (budget enforcement, position limits, bounded execution) works with any HTTP API. Use standard HTTP clients (fetch, axios) and TDM enforces your constraints.
Polymarket CLOB API: Documented integration available. Refer to Polymarket docs for API structure.
Native Connectors (Roadmap): Platform-specific plugins with typed interfaces, optimized SDKs, and automatic settlement for Kalshi, Augur, and others are planned.
Define constraints for prediction market operations using a Rule Pack:
// prediction-markets-rules.json
{
"budgetPolicy": {
"defaultLimitUsd": 5.00, // $5 max per trading session
"requiresApprovalAboveUsd": 0.00 // Approve every transaction
},
"runtimeConstraints": {
"subContourRequired": true, // Run in isolated sub-contour
"promptInjectionReviewRequired": true, // Review for prompt injection
"maxSessionBudgetUsd": 5.00 // Hard cap: $5 per session
},
"rules": [
"Research before betting",
"Set position limits",
"Track market resolution",
"Log all market interactions"
],
"allowlist": {
"domains": [
"gamma-api.polymarket.com",
"clob.polymarket.com"
]
}
}Marketplace Skills Protection: All marketplace skills (third-party plugins) are capped at $5 per session by default. This is an infrastructure-enforced limit that plugins cannot override.
Configure bounded capital constraints for market positions:
// position-limits.json
{
"maxPositionSize": 50.00, // $50 max per market
"maxTotalExposure": 200.00, // $200 total across all markets
"maxMarketsActive": 5, // Max 5 concurrent positions
"requireApprovalFor": [
"positions > $25",
"new market entry",
"doubling down"
]
}Bounded Execution: These limits are checked before every market action. If a position would exceed limits, the request is rejected with an error.
Agent scans available opportunities
Signal detected in specific market
Is market allowed? Category OK?
Available capital? Position limit OK?
Liquidity sufficient? Oracle trusted?
Place order on Polymarket CLOB
Confirm execution, update position
Settlement proof, audit trail
Infrastructure-Level Control: Policy, budget, and authorization checks happen before execution. The agent cannot bypass these constraints.
Agent monitors news feeds, identifies relevant prediction markets, executes positions within budget constraints.
Cross-market arbitrage between Polymarket and other platforms, with per-market capital allocation and slippage limits.
Automated position sizing across multiple markets with category-based allocation rules and correlation constraints.
Test prediction strategies with simulated capital before deploying to live markets with real funds.