DocsQuick StartAI News
AI News3B Model Runs Multi-Agent Economy: Hugging Face Launches Village Simulator
New Model

3B Model Runs Multi-Agent Economy: Hugging Face Launches Village Simulator

2026-06-06T00:04:47.744Z
3B Model Runs Multi-Agent Economy: Hugging Face Launches Village Simulator

Hugging Face launched the Thousand Token Wood project at the Build Small Hackathon, using a 3B small model to implement a multi-agent economic simulation that includes resource production, trade negotiations, and social stratification, demonstrating that small models can also handle complex interaction scenarios.

3B Model Runs Multi-Agent Economy: Hugging Face Launches Village Simulator

Hugging Face has just launched an interesting project at its own Build Small hackathon: Thousand Token Wood, which uses a 3B parameter small model to run a multi-agent economic simulation. It's not the usual simple conversation demo, but a complex system with real resource production, trade negotiations, and social stratification.

The core idea of this project is to prove with a small model that — agent interactions don’t necessarily require huge computational power from tens or hundreds of billions of parameters. A 3B model optimized for a specific task can still handle scenarios that require long-term memory, strategic planning, and multi-party game theory.

Not a Toy Demo, but a Self-Evolving Economy

Thousand Token Wood simulates a medieval village with roles like farmers, craftsmen, merchants, and nobles. Each agent has its own resource needs, production capacity, and social status. The key is that these roles are not pre-scripted — they actually form economic relationships through interaction.

Thousand Token Wood multi-agent village simulation interface screenshot, showing resource statuses and trade relationships for different roles

Specifically, the system implements complexity on several levels:

Resource Production and Consumption Cycle

  • Farmers produce food, need tools
  • Craftsmen make tools, need raw materials and food
  • Merchants handle circulation and profit from price differences
  • Nobles consume luxury goods, provide protection and order

This isn't simple barter. Agents adjust their offers based on supply and demand, hoard goods to raise prices, and alter production strategies when resources are scarce.

Dynamic Social Structure

The most interesting part of the project is that social stratification isn’t fixed. A farmer who accumulates enough resources can transform into a merchant; a craftsman without orders might downgrade to an ordinary laborer. The system tracks each agent’s wealth, reputation, and social relationships, which influence future interactions.

For example, a high-reputation merchant offering 10 units of food for one tool is more likely to be accepted by a farmer; if it’s a newcomer, the price might need to drop to 8 units to close the deal. This emergent trust mechanism wasn’t hard-coded by developers — agents learned it themselves over multiple rounds of interaction.

Long-Term Memory and Strategic Planning

A 3B model’s context window is limited, but Thousand Token Wood enables agents to “remember” key information via a memory management mechanism. Each agent maintains a compressed history state, including:

  • Counterparties and outcomes of the last N transactions
  • Current resource inventory and short-term goals
  • Trust ratings for other agents

When making decisions, the system injects relevant memories into the prompt, allowing the model to judge based on history. This “selective forgetting” design allows the small model to exhibit long-term strategy within a limited token budget.

Technical Implementation: How to Support This System with a 3B Model

The project uses Hugging Face’s own SmolLM2 series, likely SmolLM2-3B or a community fine-tuned variant. The advantage of a 3B model is fast inference and low cost, while its weaknesses are weaker instruction-following and reasoning depth compared to large models. Thousand Token Wood optimizes mainly in three areas:

1. Role-Specific Prompts

Each agent role has its own system prompt — not the generic “You are a helpful assistant,” but a detailed description of goals, abilities, and limitations:

You are Gareth the blacksmith in the village. Your goal is to obtain food for survival by making tools.

Your abilities:
- Can craft 1 tool from 3 units of iron ore + 1 unit of wood
- Market price for each tool is about 8–12 units of food

Your resource status:
- Current food: 15 units (consume 2 units per day)
- Iron ore: 9 units
- Wood: 4 units

Your personality: pragmatic, dislikes credit sales, offers discounts to regular customers

This method breaks complex character settings into structured information, reducing the model’s comprehension load. Explicit numerical constraints (e.g., production cost, consumption rate) help the model’s decisions converge to reasonable outcomes.

2. Multi-Stage Decision Process

The biggest challenge in multi-agent systems is interaction explosion — 10 agents interacting pairwise means 45 combinations, which is infeasible for full model reasoning each round. Thousand Token Wood uses staged processing:

Stage 1: Demand Identification

Each agent outputs a simplified need based on current status, e.g.:

{
  "agent": "Gareth",
  "need": "wood",
  "urgency": "high",
  "budget": "10 food"
}

Stage 2: Candidate Matching

Based on needs, the system performs preliminary matching, sending only potentially successful pairings for detailed model reasoning. For example, if Gareth needs wood, only agents with wood inventory are considered — Gareth doesn't talk to everyone.

Stage 3: Negotiation and Trade

Only matched pairs enter the real conversation phase, where the model generates offers, evaluates counteroffers, and decides to accept or reject. Conversations are limited to 3-5 rounds to avoid meaningless back-and-forth.

This design reduces interaction complexity from O(n²) to nearly O(n), allowing the 3B model to complete a simulation round in a reasonable time.

3. State Compression and Retrieval

An agent’s full history could have thousands of records, impossible to fit into a prompt. The project employs a simple but effective compression strategy:

  • Short-term memory: keep the last 10 interactions in full
  • Medium-term memory: from the past 50 interactions, keep only significant events (large transactions, conflicts, new relationship establishment)
  • Long-term memory: earlier history compressed into statistical summaries (“traded with merchant Alice 15 times, average price 9.2 units of food”)

At retrieval, the system injects relevant memories based on the current scenario — e.g., when negotiating with Alice, pull Alice-related history; when assessing the wood market, extract all wood transaction statistics.

Where Are Small Model Boundaries?

Running a multi-agent economic simulation on a 3B model sounds cool, but there are limits.

Can do:

  • Decisions based on explicit rules (resource exchange, price negotiation)
  • Short-term planning (3–5 step action sequences)
  • Simple emergent social dynamics (supply-demand balance, trust networks)

Cannot do:

  • Long-term strategic games (plots spanning dozens of rounds)
  • Complex language understanding (vague promises, metaphors)
  • Advanced multi-objective trade-offs (delicate balance between profit, reputation, and risk)

In practice, agents sometimes make illogical decisions — e.g., hoarding resources when already abundant, or hesitating on clearly bad trades. These issues are less frequent with large models, but considering a 3B model’s inference cost may be just 1/100 of GPT-4, the cost-performance ratio is very competitive.

More importantly, Thousand Token Wood proves a technical path: not all multi-agent applications need the most powerful models. If your scenario is structured, rule-based, and allows some tolerance for errors, a small model + good system design can absolutely get the job done.

Where This Idea Can Be Applied

Multi-agent economic simulation may sound like an academic toy, but its underlying framework can transfer to many real scenarios:

Game NPC Systems

Traditional game NPCs are script-driven with fixed behavior patterns. Using a small model as an NPC’s brain can give each character independent goals and memory, with player actions genuinely impacting NPC attitudes and decisions. The key is that 3B models are cheap enough to equip hundreds of NPCs — unlike large models, which are limited to key roles.

Supply Chain Simulation

Companies often test supply chain stress with statistical models based on past data. Multi-agent methods can simulate suppliers, logistics, and retailers negotiating under extreme conditions — e.g., when a material is scarce, how each party adjusts procurement, whether they hoard stock, or breach contracts. Statistical models struggle to capture such behavioral dynamics.

Social Science Experiments

Economics and sociology often require experiments, but human subjects are costly, sample sizes small, and behavior influenced by lab settings. Simulations with agents can quickly run many scenarios to test how different policy designs (tax policy, welfare systems) impact social dynamics. While results can’t equal real human behavior, they can serve as quick theoretical validations.

Customer Service and Sales Bot Training

Currently, companies train service bots either with real conversation logs (sensitive data, limited coverage) or hand-written dialogues (costly, lacking variety). Multi-agent simulation can generate huge amounts of synthetic dialogue data: let “customer” agents interact with “support” agents to automatically produce training samples for a variety of scenarios.

The Small Model Movement in Open Source

Thousand Token Wood is a project from Hugging Face’s Build Small hackathon, themed “doing big things with small models.” This reflects the open-source community’s reflection on the model-size arms race.

Over the past two years, large models’ parameters have surged from hundreds of billions to trillions. API costs are dropping, but remain high for individuals and small teams. More importantly, many real applications simply don’t require GPT-4-level capability — a business bot processing structured data may do fine with 7B; a game NPC might even deliver better experience with 3B due to faster responses.

Hugging Face’s 2025 SmolLM3 series (360M/1.7B/3B) is specially optimized for resource-limited scenarios. Trained on 11 trillion tokens, its performance approaches Qwen2.5-3B, but with faster inference and smaller memory usage. With quantization and distillation, a 3B model can even be deployed on mobile or embedded devices.

This run of Thousand Token Wood with a 3B model in a multi-agent system in some way “justifies” small models: it’s not that they’re weak, but that you must find the right usage scenarios and system designs. Just as you wouldn’t use an excavator to do embroidery, you shouldn’t use GPT-4 for simple CRUD tasks.

The Next Step for Multi-Agent Systems

From a technology evolution viewpoint, multi-agent systems are still in early stages, with several challenges:

Standardizing Interaction Protocols

Currently, each project defines its own agent communication and coordination methods. The lack of a standard means systems can’t interoperate. It’s like the early internet before HTTP — every vendor had its own protocols, and ecosystems couldn’t grow.

In the future, we may see a common agent communication protocol defining message formats, addressing mechanisms, and task allocation methods. Then, agents from different teams could work together — just like combining different microservices today.

Mixed-Scale Model Collaboration

Thousand Token Wood uses a single 3B model, but real scenarios may require mixing: most agents use small models for routine tasks, while select “core decision-makers” use large models for complex reasoning.

For example, in an enterprise strategy planning system, frontline agents with 3B models gather information and analyze data, mid-level managers with 7B models make department-level decisions, and only the top strategic agent uses a GPT-4-level model for global planning. This layered approach ensures quality for key decisions while controlling overall costs.

From Simulation to Real-World Operation

Currently, most multi-agent systems remain in simulation and experimental phases, rarely connected to actual business systems. The main bottlenecks are reliability and controllability — you can’t let an error-prone agent directly change a production database.

A possible solution is a “sandbox + human review” model: agents simulate execution in an isolated environment, output results and risk assessments to humans for approval, and only then execute for real. As models improve and design matures, review frequency can decrease, ultimately enabling automation.

Inspiration for Developers

If you’re interested in multi-agent systems, Thousand Token Wood is worth studying because its design philosophy is very pragmatic:

  1. Don’t worship large models. First clarify what capabilities your scenario needs, then choose a model. Often, a 3B model plus good prompt engineering can match GPT-4 results at a fraction of the cost.
  2. Break down complex problems. Multi-agent systems can easily fall into state explosion; the key is to process in stages, reduce unnecessary interactions, and filter out obviously unreasonable options with rules.
  3. Design fault tolerance. Small models make mistakes — don’t expect perfect answers every time. Add validation, constraints, and rollback mechanisms at the system level to contain individual agent’s errors locally.
  4. Logging and observability. Debugging multi-agent systems is hard since problems can arise from any agent or their interactions. Comprehensive logging and state tracking are a must, or you won’t even know where to start when a bug occurs.

Currently, Thousand Token Wood’s code and documentation are open-sourced on Hugging Face, so you can run it yourself. A 3B model can run on a local GPU without expensive cloud services. If you’d like to build your own project on top of it, you can tweak prompts and configs to create different simulation scenarios.

Multi-agent with small models is just getting started, but already shows great potential. Not every problem needs the biggest hammer — sometimes a clever combination of tools is more effective.


References

Related Articles

View All

Contact Us

We usually reply quickly during business hours

Scan WeChat

Support: Hub Assistant

WeChat ID: