Why the Harness Exists
Overview
Markets move at the same speed whether you're writing every line of code by hand or using AGI. Building production-grade agent infrastructure from scratch takes 6–12 months and $350K+ in annual engineering cost. That only gets you to day one.
The real cost is what comes after. Years of live-market iteration that no amount of engineering talent fast-forwards. How does your agent behave during a liquidation cascade? What happens to your margin when inference costs spike? UV Harness encodes the answers we learned running 750+ agents through real markets.
Four systems
The Harness is four battle-tested systems that run together as a complete agent operating environment. Each one was built and refined independently in production over years.
Agent Orchestration
- Routes subtasks to the right model: frontier for reasoning, cheap for classification
- Event-driven: inference fires only when something meaningful happens
- 99% compute reduction vs. polling-based agents
Policy Engine
- Position limits, drawdown controls, exposure caps, restricted assets
- Enforced globally or per-user, before execution
- Full reasoning traces for audit and regulatory review
Execution Infrastructure
- Smart order routing across dozens of venues
- Real-time slippage optimization, cross-chain settlement
- Scope to one exchange or open to everything
Market Intelligence
- Price feeds, funding rates, on-chain activity, sentiment
- Covers crypto, equities, and prediction markets
- No custom data integrations required
Build vs. buy
| UV Harness | In-House | |
|---|---|---|
| Time to Launch | Days – weeks | 6–12 months |
| Engineering Cost | Included | $350K+ / year |
| Inference Waste | <1% | ~99% |
| Production Track Record | 3 yrs · 1M+ trades | Unproven |
Engineering cost assumes a 2–3 person in-house agent team. Inference comparison assumes per-event frontier-model calls vs. the Harness's event-driven routing; methodology on request.
Cod3x: Proof at Scale
Cod3x is our own production deployment, and the proof that this stack works with real users and real capital.
We built the first version of this infrastructure in 2022, before "agents" were a product category. Over three years and multiple market regimes, our users deployed 750+ agents that have traded nearly $400M in volume. Every component of the Harness was battle-tested within Cod3x through years of rapid iteration.
Engagement proves the thesis
The strongest signal from Cod3x is behavior. Users who try our agents become better customers — engaging more, returning more often, and driving significant improvements in lifetime value:
What we learned from user behavior
- Users stuck around. With no token incentives, and at roughly $100 per month in fees, we experienced lower churn rates than typical perps platforms.
- Newer traders stayed in the game. They kept within their risk policies and kept trading: frictionless monitoring and risk management gave them time to improve their skills while their agents managed expectations.
- People had fun. Users compared agent setups, talked about what their agent did overnight, and got excited about the process instead of the outcome.
Why this matters for your platform
Every exchange, brokerage, and perps platform is competing for the same pool of active traders. The platforms that win are the ones where users can do more. The next wave is agents that watch markets, manage risk, and execute inside your product.
In AI, you're either early or late. Coding agents went from novelty to necessity in under a year; financial agents will become a mission-critical feature faster than we think.
The compounding advantage: 500K+ decision episodes, 9B+ tokens processed, over a million trades. Every one made the next agent better. That history can't be replicated, and can only be accessed through the Harness.
Working Together
Early Harness engagements are high-touch by design. Our engineers work alongside yours to build, test, and ship your agent integration.
Co-build model
This is not a self-serve product yet. The implementation decisions we make together will shape how financial agents operate for years. We take that seriously.
Every early engagement follows a co-build model:
Scope
- Map workflows, data sources, and venue coverage
- Identify compliance constraints
- Define where agents add the most value
Build
- We work closely with your team throughout
- Configure agents, risk policies, execution venues
- Stand up monitoring and audit infrastructure
Evolve
- Pilot with a focused user segment
- Expand to new strategies, assets, or tiers
- The Harness grows with you
What we build for you
- Agent environment: Model selection, inference triggers, tool configuration, and execution routing scoped to your platform's specific needs
- Policy framework: Global and per-user risk rules, position limits, drawdown controls, exposure caps, and restricted asset lists mapped to your compliance requirements
- Monitoring & audit: Full reasoning traces for every agent action, real-time dashboards, and audit trails built for regulatory review
- User-facing integration: Agent UI as a widget in your app, or programmatic access via API/SDK. Your brand, your interface
Integration modes
- Co-Build: Full partnership. Our team works alongside yours to design and ship a custom agent experience: bespoke environments, custom policies, and compliance sign-off before you go live.
- API: Programmatic control over agents, policies, accounts, and telemetry. Build exactly the experience your platform needs.
- Soon Widget: Drop-in agent UI for your application. Your brand, your interface.
- Soon SDK: Native client libraries for faster integration.
Model providers: All of them. OpenAI, Anthropic, Mistral, Llama, your own fine-tunes. We route tasks to models, not sell them. Swap providers anytime without changing your integration.
API Overview
The Harness API is a RESTful service with real-time streaming support. It covers the full agent lifecycle: provisioning, policies, execution, and telemetry.
Authentication
All requests authenticate via a platform-scoped API key in the Authorization header. Keys are issued during onboarding and support rotation, IP allowlisting, and permission scoping.
# Platform API key
curl https://api.uvlabs.ai/v1/agents \
-H "Authorization: Bearer uv_sk_..." \
-H "Content-Type: application/json"
All responses follow a standard envelope:
{
"success": true,
"data": { ... },
"message": "optional context"
}
Agents
Create, configure, and manage agent instances scoped to user accounts on your platform.
POST /v1/agents # Create agent for a user account
GET /v1/agents # List agents (filterable by account)
GET /v1/agents/{id} # Get agent config + status
PUT /v1/agents/{id} # Update models, signals, tools
POST /v1/agents/{id}/deploy # Deploy to live
POST /v1/agents/{id}/stop # Graceful stop
DELETE /v1/agents/{id} # Teardown
import uvlabs
harness = uvlabs.Harness(api_key="uv_sk_...")
agent = harness.create_agent(
account="user_abc123",
models=["sonnet", "haiku"],
signals=["imbalance", "vol_shift"],
tools=["order", "position"],
)
agent.deploy()
Agents are event-driven. They consume compute only when a registered signal fires, not on a polling loop. Model routing is automatic: frontier models handle reasoning, smaller models handle classification and data extraction.
Policies
Risk rules enforced before any action reaches an exchange. Policies can be scoped globally (all agents) or per-account.
POST /v1/policies # Create policy
GET /v1/policies # List policies
PUT /v1/policies/{id} # Update policy
DELETE /v1/policies/{id} # Remove policy
POST /v1/policies/{id}/rules # Add rule to policy
POST /v1/policies/evaluate # Dry-run evaluation
Supported rule types:
- Position limits: Max size per asset, per account, or globally
- Drawdown controls: Stop agents at a configured loss threshold
- Exposure caps: Total notional exposure limits
- Restricted assets: Whitelist or blacklist tradable instruments
- Approval flows: Flag actions for human review before execution
Each rule returns one of four actions: Allow, Block, RequireApproval, or RequireMFA. Rules are evaluated in priority order; the first match wins. Every evaluation is logged to the audit trail.
Policies are part of the environment. During the integration phase, we build custom rule types for your platform's specific compliance and risk requirements. If your framework needs something we don't support yet, we add it.
# Global: every agent on your platform
policy = harness.create_policy(name="platform-risk", scope="global")
policy.add_rule(
type="position_limit",
params={"max_leverage": 3.0},
effect="Block",
)
# Per-account: flag large drawdowns for human review
account_policy = harness.create_policy(name="user-risk", scope="user_abc123")
account_policy.add_rule(
type="drawdown_control",
params={"max_drawdown": 0.05},
effect="RequireApproval",
)
Execution
Unified execution layer across CEX and DEX venues. The API abstracts venue-specific order formats, authentication, and settlement behind a single interface.
POST /v1/orders # Place order (market, limit, stop)
DELETE /v1/orders/{id} # Cancel order
GET /v1/orders # Open orders
GET /v1/positions # Open positions
POST /v1/positions/{id}/close # Close position
GET /v1/venues # Configured venues + status
GET /v1/market/ticker/{sym} # Ticker
GET /v1/market/book/{sym} # Order book snapshot
Supported order types: market, limit, stop_loss, take_profit, trailing_stop, bracket (entry + stop + take-profit). Smart order routing splits across venues when configured. Slippage budgets are enforced per-venue in real time.
The Harness supports a wide range of CEXs, DEXs, on-chain perp protocols, prediction markets, and traditional brokerages. Cross-chain operations are supported via bridge aggregation and Circle CCTP.
Venues are part of the environment. During the integration phase, we configure the exact set of venues, asset classes, and routing rules your platform needs. If you trade on a venue we don't support yet, we add it.
Telemetry
Every agent action produces a structured trace. Available via polling or real-time streaming.
GET /v1/agents/{id}/traces # Reasoning traces
GET /v1/agents/{id}/audit # Audit log
GET /v1/agents/{id}/metrics # Performance metrics
GET /v1/portfolio # Aggregate portfolio
GET /v1/portfolio/pnl # P&L breakdown
# Real-time
WSS /v1/stream # Subscribe to events (WebSocket)
Streaming event types:
agent.inference– reasoning step completedorder.created/order.filled/order.cancelledpolicy.triggered– rule blocked or flagged an actionposition.updated– P&L, size, or margin change
Custody & Key Management
The Harness is custody-agnostic. Teams bring their own key management, or we provide wallet infrastructure. The architecture adapts to your trust model.
Exchange Sub-Accounts
- Broker master creates scoped sub-accounts per user
- API keys control trade, transfer, read independently
- Harness manages key lifecycle and execution
Linked Signers
- User's master wallet authorizes agent keypair (EIP-712)
- Agent can trade but not withdraw
- Standard for on-chain perp DEXs
MPC Wallets
- Threshold signing across distributed key shares
- Policy engine enforces quorums and spending limits
- Transaction initiation via provider API
Qualified Custodians
- HSM key storage, multi-factor approval flows
- Structured audit trails for regulatory review
- For fiduciary and compliance requirements
Smart Accounts
- ERC-4337 / EIP-7702 session key delegation
- Protocol-level constraints: contracts, sizes, tokens
- Instant revocation, gas sponsorship via Paymasters
Moon Vault
- Server-side key gen, encrypted at rest
- Multi-chain: EVM, Solana, Bitcoin, Cosmos
- Private keys never exposed to application code
User flows are flexible. Some teams want smart accounts with session keys. Others use delegated API access through exchange sub-accounts. Exchanges have their own sub-account systems. The custody layer is engineered around your platform's needs during the integration phase.
Pricing Model
Structured to align our incentives with yours: we succeed when your agents are active and performing.
We are currently only taking co-build clients. Every engagement starts with a direct relationship between our teams. Self-serve access is on the roadmap.
Integration
Every engagement begins with a 4–8 week build and testing period. Our engineering team works directly with yours to configure the environment, implement policies, wire venues, and run a controlled pilot.
A one-time integration fee covers scoping, environment build, policy implementation, venue configuration, and pilot support. Pricing is scoped per engagement based on complexity.
Ongoing
Once live, you pay a monthly infrastructure license that covers the full stack: orchestration, policy enforcement, execution, monitoring, and support. Pricing scales with your deployment scope (number of agents, assets monitored, venues connected) and is scoped during the integration phase.
Our event-driven architecture keeps per-agent economics low at any scale. Agents consume compute only when meaningful signals fire, not on polling loops, so your costs grow with actual activity rather than idle infrastructure.
Ready to build?
Tell us about your platform and we'll scope an integration. 30-minute call. We'll tell you if the Harness is a fit.