Sotopia

An open-ended social learning environment for evaluating and fostering social intelligence in language agents.

Stars
★ 342
Last updated
10mo ago
License
MIT
Primary language
Python

At a glance

How it runs
Library / SDKFrameworkSelf-hosted service
Works with
Portable with changesOpenAI API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
PythonuvOpenAI API keyRedis (for default backend)Docker (recommended for Redis)Shell / CLINetwork accessLocal filesystem
Typical use
Social-intelligence researchers comparing how different LLMs behave as agents in the same scenarios.
Not a fit if
  • Users wanting zero-config, no-key setup
  • Teams seeking a production social product, not an eval environment

What does this agent do, and when should you use it?

Sotopia is the open-source environment behind an ICLR 2024 spotlight paper on interactive evaluation of social intelligence in language agents. It runs asynchronous social episodes in which an environment model and two agent models interact, configured per role through the run_async_server call. Episodes and data persist either to Redis (the default backend) or to local JSON under ~/.sotopia/data/, and the project ships a Hugging Face dataset and an online demo. It is distributed as an installable Python package with a minimal example script, under the MIT license. Running it requires your own OpenAI API key and paying for model usage.

The sotopia Python package exposes sotopia.server.run_async_server, which drives an asynchronous social episode; model_dict assigns models to env, agent1 and agent2 (for example gpt-4 for the environment and gpt-4o-mini for agents), while a sampler such as sotopia.samplers.UniformSampler picks scenarios. Output is persisted according to SOTOPIA_STORAGE_BACKEND — Redis via REDIS_OM_URL by default, or local JSON files when set to local. Setup is completed with uv run sotopia install, and examples/minimalist_demo.py gives a minimal runnable invocation. The accompanying paper defines evaluation metrics for social intelligence in language agents.

  1. Social-intelligence researchers comparing how different LLMs behave as agents in the same scenarios.
  2. RL and multi-agent experimenters treating open-ended social settings as an extensible environment for policies.
  3. Model developers pairing a strong environment model with cheaper role agents to inspect dialogue quality.
  4. Educators and demo builders showing multi-agent conversations using the hosted demo and example scripts.
  5. Engineers prototyping custom scenarios and characters against the quick local JSON backend.

How do you install or deploy this agent?

Create a virtual environment and install with uv:

pip install uv
uv sync --all-extras
uv run sotopia install

If you keep the default Redis backend, start Redis with Docker:

docker run -d -p 6379:6379 redis/redis-stack-server:latest

Create a .env file in the project root with your key and backend:

cat > .env << EOF
OPENAI_API_KEY=your_openai_key_here
SOTOPIA_STORAGE_BACKEND=local
# REDIS_OM_URL=redis://localhost:6379
EOF

How do you use this agent?

uv does not load .env automatically, so pass the file or export the variables. Run the minimal demo:

uv run --env-file .env python examples/minimalist_demo.py

Or call the async server directly with per-role models:

import asyncio
from sotopia.samplers import UniformSampler
from sotopia.server import run_async_server

asyncio.run(
    run_async_server(
        model_dict={
            "env": "gpt-4",
            "agent1": "gpt-4o-mini",
            "agent2": "gpt-4o-mini",
        },
        sampler=UniformSampler(),
    )
)

The README warns that the server will not run locally without any datasets installed.

What are this agent's strengths and limitations?

Pros
  • Backed by an ICLR 2024 spotlight paper and arXiv preprint, giving the evaluation a published methodology.
  • Per-role model configuration (env, agent1, agent2) makes side-by-side LLM comparisons straightforward.
  • Swappable storage backend: default Redis for production-style use, or dependency-free local JSON for quick testing.
  • Usable as a Python library — run_async_server and samplers can be embedded in existing experiment code.
Limitations
  • Requires your own OPENAI_API_KEY and per-token model spending; no bundled model access.
  • The default Redis backend needs a Redis server, and the README warns non-Docker installs are error-prone.
  • Experimental framework features are unavailable with the local JSON backend, narrowing that path.
  • README cautions that the documentation may be outdated relative to the code.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Sotopia This agent 46 · Major gaps Library / SDKFree + model costs ★ 342 10mo ago Python OpenAI API
Concordia: A Library for Generative Social Simulation 62 · Some gaps Library / SDKFree + model costs ★ 1.9k 4d ago Python —
MobileGym 67 · Some gaps CLIFree + model costs ★ 856 1mo ago Python —
MiroFish Offline 40 · Major gaps Self-hosted serviceFree ★ 2.7k 7mo ago Python OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
46/ 100 5-point scale 2.3 / 5
Trust 11/29
Reliability 6/14
Adaptability 9/18
Convention 9/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

Trust is weak overall. Least privilege: code and UI default to a remote Modal endpoint and read OPENAI_API_KEY/REDIS_OM_URL with no scope or minimization guidance, deducted. User confirmation: install tests use destructive flags like --overwrite-existing-data and no product-side confirmation flow is documented, deducted. Data-flow transparency: README documents env vars and storage backends but not which third-party LLM services receive conversation/evaluation data, deducted. Sensitive data: social simulation involves personas and dialogues with no redaction or retention policy, deducted. Dependency security: a git-branch dependency (aact) and wide version ranges with no audit or lock guidance, deducted. External effects: writes to Redis/local data and calls external APIs with no rollback or isolation notes, deducted. Source attribution: README cites the paper, dataset and project page clearly, scored 2.

Reliability6 / 14 · 2.1/5

Self-consistency: server.py validates actions and retries once; tests use mocked LLMs and local backend, fairly consistent, scored 2. Dependency availability: aact pinned to git main, litellm unbounded, Redis required externally, weak reproducibility, deducted. Failure messages: some exceptions are swallowed via pass or print (ui/app.py update_database_callback, test cleanup), deducted.

Adaptability9 / 18 · 2.5/5

Audience and scenarios: README covers install, sample server, UI and dev guide for researchers and developers, scored 2. Capability boundaries: no explicit statement of model limits, cost, or suitable/unsuitable use, deducted. Trigger precision: as a framework there is no clear invocation contract, deducted. Environment fit: supports Redis and local JSON backends and multi-OS CI, scored 2.

Convention9 / 18 · 2.5/5

Information architecture: README is well structured with install, env vars, examples, scored 2. Install notes: uv install, Docker Redis, .env sample provided, fairly complete, scored 2. Naming stability: version 0.1.5 with git-branch dependency and no API stability promise, deducted. Examples and FAQ: minimal example and Colab present but no FAQ, deducted. Known limitations: only scattered warnings (datasets needed, docs may be outdated), no systematic list, deducted. License: full MIT text, scored 3. Versioning/changelog: version present but no CHANGELOG, deducted. Maintenance responsibility: no governance or maintainer responsibility statement and publisher unverified, deducted.

Effectiveness7 / 13 · 2.7/5

Output usability: runnable examples, UI and evaluation dimensions produce readable output, scored 2. Marginal value: clear research value as a social-intelligence evaluation environment, scored 2. Cost-benefit: requires LLM APIs and Redis with high setup and runtime cost not documented, deducted.

Verifiability4 / 8 · 2.5/5

Claim traceability: README cites the ICLR paper and dataset, traceable, scored 2. Cross-source corroboration: only README and a few tests, little independent documentation, deducted. Fact/inference separation: docs do not clearly separate verified results from design intent, deducted.

Risks and how to mitigate them
  • The UI defaults to a remote Modal endpoint; confirm data destination and API-key exposure before use.
  • The install flow includes destructive options like --overwrite-existing-data; back up data first.
  • The aact dependency points to git main, making builds non-reproducible; pin a commit.
  • Social simulation data may contain personas and dialogues; assess privacy and retention yourself.
  • Publisher identity is unverified; do not infer safety or quality from the brand.
Evidence confidence: Low Reviewed Nov 07, 2026 Reviewed revision a0aaafb440e5
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/sotopia.svg)](https://followagents.com/en/agents/sotopia)
<a href="https://followagents.com/en/agents/sotopia"><img src="https://followagents.com/badge/sotopia.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.1.5 v0.1.5 Make redis optional
    Release notes excerpt
    * Feature/multi agent framework by @Keyu-He in https://github.com/sotopia-lab/sotopia/pull/329 * Fix custom/local model support bugs by @Keyu-He in https://github.com/sotopia-lab/sotopia/pull/338 * sotopia redis optional by @XuhuiZhou in https://github.com/sotopia-lab/sotopia/pull/341
    View on GitHub ↗
  2. v0.1.4
    Release notes excerpt
    What's Changed * Update langchain requirement from <0.3.0,>=0.2.5 to >=0.2.5,<0.4.0 by @dependabot in https://github.com/sotopia-lab/sotopia/pull/236 * [Automated] Merge release into main by @ProKil in https://github.com/sotopia-lab/sotopia/pull/235 * update macos test runner as macos-latest by @ProKil in https://github.com/sotopia-lab/sotopia/pull/238 * feat(exp_eval): support tag for combo iteration by @lwaekfjlk in https://github.com/sotopia-lab/sotopia/pull/245 …
    View on GitHub ↗
  3. v0.1.3
    Release notes excerpt
    What's Changed * UI update by @XuhuiZhou in https://github.com/sotopia-lab/sotopia/pull/273 Full Changelog: https://github.com/sotopia-lab/sotopia/compare/v0.1.2...v0.1.3
    View on GitHub ↗

FAQ

What credentials and services do I need for one episode?
An OPENAI_API_KEY, plus a running Redis server if you keep the default backend (Docker is recommended; default URL redis://localhost:6379).
Can it run offline or with local models?
The source only shows OpenAI models such as gpt-4 and gpt-4o-mini passed via model_dict; no local-model or offline path is documented.
How do I avoid installing Redis during development?
Set SOTOPIA_STORAGE_BACKEND=local so data goes to ~/.sotopia/data/ with no external dependency, though experimental framework features still require Redis.
Why won't the local server start?
The README states the server cannot run locally if no datasets are installed.
Was this page helpful?
View on GitHub ↗ Install ↓