Polymarket Agents is a free and open-source Python framework for building AI agents that autonomously complete trades in the Polymarket predictive trading market. The framework integrates Polymarket API to extract information from news and trading betting data, uses retrieval-augmented generation (RAG) technology to achieve intelligent information retrieval, and provides large language model (LLM) tools to implement various trading strategies – for example, when the average cost of YES/NO type trading objects falls below $1, identify such low-priced targets with room for steady profit and complete trades.
The core advantages of using this framework are: enabling automated trading without emotional interference, instantly capturing arbitrage opportunities when market pricing fails, and increasing investment returns without the need for continuous manual monitoring.
While most AI applications are still stuck in the “answering questions” and “generating content” stages, Polymarket Agents has pushed AI into a more realistic and brutal scenario – betting on the future with real money.
This is an experimental project open-sourced by the Polymarket team with the goal of not building a commercial product, but rather exploring a problem:
What would happen if AI became a player in the prediction market?
What is a prediction market?
Before you understand agents, you need to know what Polymarket is doing.
Polymarket is a prediction market platform.
Users can place bets around real-world questions such as:
- Whether a candidate will be elected
- Whether a policy will be passed before a certain time
- Whether an event will occur
The price in the market represents the collective probability judgment of the future.
For example:
- The price of YES is $0.63
- ≈ The market believes that the probability of an event is 63%
Polymarket Agents?
Polymarket Agents is an AI Agent framework example project that shows how to build:
AI agents that can autonomously acquire information, analyze events, judge probabilities, and automatically trade in prediction markets
It is not part of the Polymarket main site, but rather an independent, open-source, experimental code repository.
In other words:
- Polymarket = Market
- agents = “AI players” who automatically participate in the market
What are you doing?
The basic workflow of an agent can be simplified into four steps:
1. 关注某个市场问题
2. 获取外部信息(新闻、数据、推理)
3. 使用 LLM 分析事件走向
4. 根据判断结果买入 / 卖出
The key here is not “whether the prediction is correct”, but:
Whether AI can continuously update its judgment on probability and express it in market behavior
Agent design ideas
This project uses a typical agent architecture rather than a one-time prompt.
Each agent typically contains:
State / Memory
- Current position
- Observed information
- Past judgments
Tools
- Query market data
- Get external information
- Execute trades
LLM Reasoning
- Analyze whether new information changes the probability of an event
- Determine whether it is worth adjusting the position
This design allows the agent to be a long-running, evolving decision-making body.
Interesting about this project?
AI is no longer just “output text”
Here, the AI’s output is not a one-piece answer, but:
- Buy or sell
- long or short
- Whether the action is validated by the market
This is a decision with costs, feedback, and consequences.
The market is a natural “evaluation system”
Unlike traditional benchmarks:
- No human scoring is required
- No need to design test sets
The market price itself is the evaluation criterion.
If the AI makes a mistake:
- It will be directly reflected in profit and loss
A testing ground for swarm intelligence
When multiple agents are running at the same time, problems naturally arise:
- Will AI form a consensus?
- Will they affect each other?
- Who is more rational, human or AI?
These questions can be observed in the prediction market.
Experimental nature of the project?
It should be emphasized:
Polymarket Agents is not a full-fledged product
Its features include:
- Partial research/demo nature
- The code structure is for discovery services
- Do not pursue the maximization of trading strategies
This is a project where “asking questions is more important than giving answers”.
Github:https://github.com/Polymarket/agents
Tubing: