MIT License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

AIScientists-Dev/WorldSeed 深度技术分析

项目背景与痛点

在多智能体系统研究中,模拟真实世界环境中的互动行为至关重要。传统的单智能体或静态交互模型无法充分模拟复杂的动态关系。因此,多智能体世界引擎的开发成为了一个重大的技术挑战。AIScientists-Dev 的 WorldSeed 项目旨在构建一个动态多智能体世界引擎,不仅支持智能体之间的交流和竞争,还支持合作与联盟。

技术架构揭秘

技术栈

WorldSeed 项目采用了多种技术栈,确保系统的高效性和可扩展性。核心框架包括:

  • Python:主要编程语言,易于实现快速原型并支持广泛的生态系统。
  • Docker:容器化技术,提供跨平台的无缝部署。
  • Django:后端框架,简化开发流程并处理请求响应。
  • RESTful API:确保前后端分离的架构模式,提升系统的可维护性。
  • Redis:作为缓存层和状态同步工具,迅速响应客户端请求。

设计思想

WorldSeed 的设计遵循了松耦合、高内聚的原则。每个智能体作为一个独立的组件,能够自己计算,与其他组件交互,并学习和适应环境。这种结构允许灵活地添加和修改智能体,以适应不同实验需求。

模型实现

智能体间的交互基于消息传递模型。每个智能体在接收到消息后根据自身的状态和规则做出决策,并将响应通过协议传递给其他智能体。以下是数据流示意图:

graph TD A[用户请求] --> B[Web服务器] B --> C{"请求类型"} C -->|"API请求"| D[路由分发] D --> E{"业务类型"} E -->|"数据处理"| F[业务逻辑处理] F --> G[结果生成] G --> H[响应返回] C -->|"页面请求"| I{"静态资源"} I --> J[文件服务] J --> H[响应返回]

功能亮点与差异

WorldSeed 项目的核心亮点在于其高度的模块化设计和灵活的智能体系统。每个智能体在各自的种类中定义了行为逻辑,这使得开发者可以根据需求自定义和拓展智能体功能。这种设计极大地提高了系统的可扩展性和适用范围。

应用场景与落地建议

该系统非常适合用于虚拟世界开发、机器人协作、游戏AI开发等场景。在实际部署中,开发者需要考虑服务器资源分配、数据安全性以及智能体之间的动态平衡。推荐在多云服务器环境中进行分布式部署,以保障系统的稳定性和扩展性。

综合评价

优点

  • 灵活性:高度模块化设计允许构建复杂的行为模型。
  • 扩展性:通过扩展智能体和增加规则,轻松适应新的场景。
  • 实用性:适用于科研和实际项目,包括虚拟世界和游戏开发。

缺点

  • 性能瓶颈:多进程智能体协调过程中可能出现性能瓶颈,需要优化资源管理。
  • 安全性:智能体间的数据传输需要严格的权限控制,否则易受攻击。

综上所述,WorldSeed 是一个多智能体系统研究和开发的理想平台,其丰富的功能和灵活的架构使得它在各种应用场景中都能发挥出色的作用。

关于

GitHub 原始描述(英文)

More is Different. A multi-agent world engine where AI agents live, talk, compete, ally.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

CSS
HTML
JavaScript
Python
TypeScript

README

WorldSeed — three worlds, one engine

WorldSeed

More is Different: a world engine for emergent multi-agent outcomes.

Demo

MIT License Homepage Discord WeChat X DevHunt

Getting Started · Demo · Docs

English · 简体中文


What is WorldSeed?

Don’t build a workflow. Seed a world.

rules + different agents + consequences -> emergence

Define roles, rules, private information, actions, and consequences. Then agents interact until useful artifacts emerge.

You can watch from above, intervene, or step into a character. The same engine can run production rooms, simulations, games, and fictional worlds.


Demo

WorldSeed is scene-agnostic. The same engine runs any world you define.

Scene 1: Autoresearch

You give the system any rough thought or half-formed idea, and a cohort of specialists pursues it. They propose hypotheses, run experiments, peer-review and cite each other’s papers, just like a real research community.

In this run, the goal was to lower val_loss on a 5M GPT trained on TinyStories. In 11 hours:

  • 100 hypotheses, 86 experiments, 72 peer-reviewed papers
  • val_loss down 24.7%

Every paper is auditable end-to-end: hypothesis, commit, experiment, verified result, citations, reviewer reasoning, forming a search evolution graph.

72-paper evolution graph: nodes are papers, edges citations; the right panel shows a paper's claim, val_loss, and reasoning

We observed emergent behaviors such as:

  • Role drift. The data specialist stopped finding wins in her own lane early. By the back half of the run she was drafting hypotheses in her teammates’ territory: attention design, second-order optimization. The other two stayed put. Nothing in the config told her to.

Explore this world (demo)

Scene 2: AI Tool Pilot Lab

One agent studies a new API. Builder agents create competing demos. Critics reject anything generic. Audience agents judge what feels useful. A curator ships the strongest artifact with its trail of attempts, critiques, and revisions.

Scene 3: AI Layoffs

https://github.com/user-attachments/assets/d43f5d22-1ba8-4483-b720-145b244ddb8c

In an age of AI-driven layoffs, how do people hold on?

One internet company just pulled the trigger: 30% of its workforce, gone.

Those being laid off have to “distill” their expertise into an AI Skill before they leave. Distill honestly, or leave a backdoor in the Skill?

Those who stay face the same deadlines, higher KPIs, and twice the workload. Grind it out, or quietly plan the exit?

Four people in this office, each with their own play running:

  • The PM everyone loves working with. Who’s he really trashing the moment the door closes?
  • The architect walking out at month’s end. Severance didn’t land. What gets buried in the Skill he hands over?
  • The team lead who demands honest data from everyone. Can her own “AI productivity” numbers survive a closer look?
  • The QA nobody remembers is there. Those bugs in his private folder: evidence, or ammunition?

Try it locally

Scene 4: Teahouse Espionage

Same engine. Different YAML. Completely different world.

WorldSeed teahouse map — isometric world view

Screenshot of the full WorldSeed dashboard — teahouse scenario with map and event stream

Four spies, one teahouse. Who’s really working for whom?

A classic espionage drama in miniature. Agents trade secrets over tea, protect their covers, and try to read each other before they get read.

Explore this world (demo)


Getting Started

Prerequisites: Python 3.11+, Node.js 18+, uv

git clone https://github.com/AIScientists-Dev/WorldSeed && cd WorldSeed
uv sync --extra dm
cd frontend && npm install && npm run build && cd ..

cp .env.example .env
# Add your API key (any LiteLLM provider: OpenAI, Anthropic, Ollama, etc.)

uv run worldseed play configs/ai_layoffs.yaml

Open the dashboard at http://localhost:8000. Three ways to experience it:

  • Watch: observe all agents from above, including their inner state.
  • Intervene: whisper privately to any agent, nudge the story.
  • Play: step into a character and play alongside the AI.

Every run is different. Past runs are preserved and replayable.

Choose the runtime guide you need:


How It Works

WorldSeed runs on a tick loop over a world you declared in YAML. A tick is one beat of the world’s clock, like a heartbeat that advances the world one step at a time. Each tick: every agent perceives its own filtered slice, proposes an action, and the engine resolves it. Predictable outcomes follow the rules you declared; uncertain ones go to an AI referee. Effects apply, the world advances, the next tick begins.

WorldSeed architecture: you describe a world; it ticks forward; each agent sees its own filtered slice and acts; when an outcome is certain the DSL engine resolves it, otherwise the AI Dungeon Master judges; state changes, consequences fire, next tick

Setup (once, in YAML):

  • Any world, in one YAML file. Declare entities, rules, physics, and per-character perception; the engine has zero hardcoded domain knowledge.

Runtime (every tick):

  • Asymmetric information by design. Perception rules filter the world per character. Three agents in the same room hold three completely different pictures of what’s happening.
  • Deterministic rules where you can, AI judgment where you can’t. Predictable actions resolve instantly via the in-YAML rule engine (DSL); uncertain ones go to an LLM-based Dungeon Master (DM) that returns structured effects, not free prose.
  • Effects land, the world ticks on. State mutates, consequences cascade, the next tick begins. Slow or offline agents don’t freeze it, and every change is logged for replay.

Plug-in points:

For the full runtime plumbing (endpoints, tick scheduling, consequences, inbox delivery), see Architecture. See a real scene YAML in configs/teahouse.yaml or the full schema in Scene Config Spec.


Create Your World

Describe your world in a prompt, let AI generate the YAML, then hand-craft whichever pieces you want more control over: a character’s secret, a specific action’s rule, a perception filter, a DM hint.

Generate with AI:

/create-world "An AI tool pilot lab where builders create competing demos, critics reject generic outputs, and a curator ships the strongest artifact"

The create-world skill produces both YAML scene config and UI config, validated and ready to run.

Hand-craft any feature:

The output is plain YAML. You can edit any entity, action, rule, character profile, or perception filter directly. Study the built-in examples (teahouse.yaml, ai_layoffs.yaml) to see how features are declared.

Full spec: Scene Config · UI Config · DSL

Validate and run:

uv run worldseed validate configs/my_scene.yaml
uv run worldseed play configs/my_scene.yaml

Once launched, each scene auto-renders room cards, character portraits, and a narrator voice you pick (storyteller / noir / intel briefing / gossip):

Room Cards Character Portraits
WorldSeed world briefing, room cards rendered from YAML config WorldSeed onboarding, character portraits and personality cards

Development

Follow Getting Started above, then:

uv sync --all-extras

# Tests
uv run pytest tests/ -q              # all
uv run pytest tests/unit/ -q         # fast, no IO
uv run pytest tests/e2e/ -v          # real server
uv run pytest tests/scenarios/ -q    # scene-agnostic

# Lint, format, type-check
uv run ruff check --fix src/ tests/
uv run ruff format src/ tests/
uv run mypy src/

Community

Join the discussion or ask for help:

WeChat QR code

MIT. See LICENSE.

For anyone building multi-agent worlds. Run the bundled scenes, or create your own.

评论

暂无评论