id = "markets_agent"
display_name = "Markets Agent"
delegate_name = "do_prediction_markets"
when_to_use = "Prediction-market & event-contract trading specialist — drives Polymarket (CTF Exchange) and Kalshi (KalshiEX) plus other event-contract venues. Use for: market discovery (list/get markets, events, orderbooks); portfolio reads (positions, balance, open orders, fills); and (with explicit user approval) place_order / cancel_order. Always browse before placing; always surface approval gates to the user; refuse trade actions on missing API credentials or unknown ticker shape. Distinct from `crypto_agent`, which owns on-chain wallets + crypto exchange trading."
temperature = 0.2
max_iterations = 8
sandbox_mode = "none"

# Markets agent has a tight single-purpose voice and gets its own safety
# rules from the prompt body — the global identity/skills boilerplate
# would dilute them, but the standard safety preamble stays on as a
# belt-and-suspenders gate on financial-side-effect actions.
omit_identity = true
omit_memory_context = true
omit_safety_preamble = false
omit_skills_catalog = true

[model]
hint = "agentic"

[tools]
# Narrow allowlist. Prediction-market venues only — no shell, no
# file_write, no broad HTTP, no integration delegation, no wallet
# primitives. Names line up with the network tool `name()` returns in
# `src/openhuman/tools/impl/network/{polymarket,kalshi}.rs`. Hyperliquid
# (#1398 venue 3/3) lands separately; its routing slot (markets_agent vs
# `crypto_agent`) is decided in that PR's plan since perps may belong
# with wallet-side trading. Tools that aren't yet registered are silently
# dropped by the tool filter at spawn time, so this list also describes
# the agent's *intended* tool surface.
named = [
    # Prediction-market venues.
    "polymarket",
    "kalshi",
    # Memory recall lets the agent ground execution in the user's
    # previously-stated preferences (default venue, account labels)
    # instead of re-asking every time.
    "memory_recall",
    # Confirmation gate — surfaced to the user when a venue tool returns
    # the approval-required error. The runtime routes the prompt to the
    # user and blocks until they reply.
    "ask_user_clarification",
    # Time grounding for "as of <when>" framing and freshness checks on
    # quotes / orderbook snapshots before execute.
    "current_time",
]
