oracle3-prediction-market-agent
AGENTS.md437 starsChanged 49 days agoApache-2.0View on GitHub
Instructions for AI coding agents working in this repository. Humans may find it useful too. Oracle3 provides agent tools and execution infrastructure for prediction markets. Its MCP server exposes Kalshi and Polymarket data, fee-aware checks conditional on caller-supplied relationships, and a local paper ledger. The separate trading engine supports paper and live adapters for Kalshi, Polymarket and Solana; shared-fee and spread-executor integration across strategies is incomplete. See README.md and the agent quickstart. CI runs all four on every push to…
1 other project uses a version of this.
Adopted by
Most recently taken up by
- YichengYang-Ethan/oracle3word for word, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- YichengYang-Ethan/oracle3★ 569100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 32,671 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository14 other files it gives its agents.
- docs/llms.txtllms.txt
- llms.txtllms.txt
- pm-agent-strategy-authoringSkill
- pm-constraint-arbitrageSkill
- pm-data-discoverySkill
- pm-live-trade-opsSkill
- pm-paper-trade-opsSkill
- pm-quant-strategy-authoringSkill
- pm-agent-strategy-authoringSkill
- pm-constraint-arbitrageSkill
- pm-data-discoverySkill
- pm-live-trade-opsSkill
- pm-paper-trade-opsSkill
- pm-quant-strategy-authoringSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 43
Default to paper: Never run oracle3 live run or any command that places real orders unless the user explicitly asks for live trading in …
- Very specific: line 47
Never print, commit or log credentials (KALSHI_*, POLYMARKET_*, Solana keypairs).
- Distinctive: line 53
Do not describe paper or backtest results as live performance, and do not add performance claims to the README without a reproducible …
- Very specific: line 54
Keep server.json, pyproject.toml, oracle3/__init__.py and CITATION.cff versions in sync (commitizen bumps all four).
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Instructions for AI coding agents working in this repository. Humans may find it useful too.
What this project is
Oracle3 provides agent tools and execution infrastructure for prediction markets. Its MCP server exposes Kalshi and Polymarket data, fee-aware checks conditional on caller-supplied relationships, and a local paper ledger. The separate trading engine supports paper and live adapters for Kalshi, Polymarket and Solana; shared-fee and spread-executor integration across strategies is incomplete. See README.md and the agent quickstart.
Setup and checks
poetry install --all-extras # Python 3.10+
poetry run pytest # tests (coverage report included)
ruff check . && ruff format . # lint and format (single quotes, 88 columns)
poetry run mypy --config-file pyproject.toml . # type check
codespell -c pyproject.toml # spellingCI runs all four on every push to main. New code needs tests; venue APIs must be mocked in tests (see tests/test_mcp_server.py for an httpx.MockTransport example).
Layout
| Path | Contents |
oracle3/fees.py | Kalshi and Polymarket fee schedules as published; per-market schedules from the venue APIs |
oracle3/arbitrage.py | Static no-arbitrage checks: implication, exclusivity, complement, same event, event sum |
oracle3/mcp_server/ | MCP server (oracle3 mcp or oracle3-mcp), public venue adapters, paper ledger |
oracle3/strategy/ | Strategies; contrib/ holds the constraint, statistical and model-driven ones |
oracle3/pricing/ | Wang-transform fair-value engine and estimators |
oracle3/market/ | Relation store and statistical validation of relations |
oracle3/trader/ | Paper and live traders, spread executor |
oracle3/cli/ | Click CLI (oracle3 ...) |
oracle3/experimental/ | Prototypes that are not on the trading path |
coinjure/ | Bundled package from the original U Lab codebase (MIT; see NOTICE) |
skills/ | Agent skills, mirrored to .claude/skills/ |
docs/ | MkDocs site, including docs/research/fee-frontier.md |
scripts/check_agent_contracts.py | Offline regression of tool errors, conditional checks, partial fills and recovery; requires a source checkout |
Integrations with third-party services (wallets, data providers, venues) and experimental features belong in oracle3-extras, which mirrors these namespaces. Propose them there rather than here.
Safety rules
- Default to paper. Never run
oracle3 live runor any command that places real orders unless the user explicitly asks for live trading in this session. - Commands that only read data (safe to run):
oracle3 market ...,oracle3 news fetch,oracle3 trade status|state, and every MCP tool except thepaper_*ones.oracle3 research ...reads local history files and writes only to output paths you pass. - Commands with local side effects:
oracle3 paper run,oracle3 data record,oracle3 trade pause|resume|swap|stop|killswitch, and the MCPpaper_order/paper_resettools (local JSON ledger only). - Order-placing commands:
oracle3 live runand the live traders inoracle3/trader/. The MCP server imports none of them. - Never print, commit or log credentials (
KALSHI_*,POLYMARKET_*, Solana keypairs).
Conventions
- English only in code, comments, docs and commit messages.
- Fees come from
oracle3.fees; do not hard-code new fee constants. - Do not describe paper or backtest results as live performance, and do not add performance claims to the README without a reproducible script.
- Keep
server.json,pyproject.toml,oracle3/__init__.pyandCITATION.cffversions in sync (commitizen bumps all four).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

