AgentPlay¶
AgentPlay is an MIT-licensed Python framework for putting AI agents into worlds, letting them act and talk, and scoring and logging what happens.
- Evaluate models fairly. Same world, rules, seeds and limits for every agent, scored by code outside the agent.
- Observe behavior. Agents can message each other; every move, message and cost lands in one replayable log.
- Extend it easily. A new world in under 50 lines, a new agent in under 30, no framework changes.
Any AI can play: hosted models from any vendor, local models (Ollama, LM Studio, vLLM, llama.cpp), or a program in any language.
pip install agentplaykit
agentplaykit play # a built-in demo game, no API key needed
Start with the Quickstart, then write a world or write an agent.
How it fits together¶
scenario.yaml ──► runner ──► world (Environment) plugins: worlds, agents,
│ ▲ evaluators (entry points,
▼ │ .py files, built-ins)
agents (Agent) ◄─► message bus
│
▼
run log (.jsonl) ──► evaluators ──► .eval.json, summaries
The core knows only two interfaces, one for worlds and one for agents, so any agent works in any world. Only the core writes the log, and evaluators read nothing else.
Project status¶
v0.1 is feature-complete against its specifications. AgentPlay is spec-driven: every requirement has an ID and a test, and the specs on this site are the ones in the repository.