from exa_py import Exa
exa = Exa()
run = exa.agent.runs.create(
query=(
"What are the current market-implied odds of a Fed rate cut at the "
"next FOMC meeting, and how have they moved over the past month?"
),
data_sources=[{"provider": "polymarket"}],
output_schema={
"type": "object",
"required": ["market", "currentProbability", "trend"],
"properties": {
"market": {"type": "string", "description": "the market question"},
"currentProbability": {"type": "number", "description": "between 0 and 1"},
"trend": {"type": "string", "description": "how the implied probability moved over the past month"},
},
},
)
run = exa.agent.runs.poll_until_finished(run.id)