Observed since 20 Oct, 23:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A tool for benchmark your agent design in different scenarios.
The AgentSociety Benchmark Toolkit is a comprehensive evaluation tool designed for multi-agent systems. This tool aims to help researchers and developers:
The BehaviorModeling benchmark focuses on evaluating agents' behavior modeling capabilities in complex social scenarios. This benchmark tests how agents:
The DailyMobility benchmark evaluates agents' mobility behavior modeling capabilities in daily life. This benchmark tests how agents:
The HarricaneMobility benchmark focuses on evaluating agents' behavior modeling capabilities in emergency situations. This benchmark tests how agents:
# Install from source
git clone <repository-url>
cd packages/agentsociety-benchmark
pip install -e .
# Or install via pip (if published)
pip install agentsociety-benchmark
# List all available benchmark tasks
asbench list-tasks
# Clone datasets for specific benchmarks, this will clone the datasets and install dependancies at the same time
asbench clone BehaviorModeling
asbench clone DailyMobility
asbench clone HarricaneMobility
# View installed benchmarks
asbench list-installed
# Force clone datasets for specific benchmarks
asbench clone BehaviorModeling --force
# Only install dependancies for specific benchmarks
asbench clone BehaviorModeling --only-install-deps
# Run evaluation for specific benchmark
asbench run <TASK-NAME> --config your_config.yaml --agent your_agent.py --mode test/inference
# Independently evaluate generated result files
asbench evaluate <TASK-NAME> results.json --config your_config.yaml
# Update all benchmarks to latest versions
asbench update-benchmarks
The AgentSociety Benchmark also supports programmatic usage through Python code, allowing you to integrate benchmark execution into your applications and scripts.
import asyncio
from agentsociety_benchmark import BenchmarkRunner, run_benchmark, evaluate_results
async def run_my_benchmark():
# Create a BenchmarkRunner instance
runner = BenchmarkRunner(home_dir="./benchmark_data")
# Run a benchmark
result = await runner.run_benchmark(
task_name="BehaviorModeling",
benchmark_config="config.yaml",
agent_config="agent_config.yaml",
mode="test", # Run with evaluation
tenant_id="my_tenant",
exp_id="my_experiment_001"
)
print(f"Benchmark completed! Experiment ID: {result['exp_id']}")
print(f"Results: {result['results']}")
print(f"Evaluation: {result['evaluation']}")
# Run the benchmark
asyncio.run(run_my_benchmark())
import asyncio
from agentsociety_benchmark import run_benchmark, evaluate_results, list_available_tasks
async def simple_benchmark():
# List available tasks
tasks = list_available_tasks()
print(f"Available tasks: {tasks}")
# Run benchmark using convenience function
result = await run_benchmark(
task_name="BehaviorModeling",
benchmark_config="config.yaml",
agent_config="agent_config.yaml",
mode="inference" # Run without evaluation
)
# Evaluate results separately if needed
if result['results']:
evaluation = await evaluate_results(
task_name="BehaviorModeling",
results_file="results.pkl",
benchmark_config="config.yaml"
)
print(f"Evaluation result: {evaluation['evaluation_result']}")
asyncio.run(simple_benchmark())
import asyncio
from agentsociety_benchmark import BenchmarkRunner
async def advanced_benchmark():
# Create runner with custom settings
runner = BenchmarkRunner(home_dir="./custom_data")
# Run with advanced configuration
result = await runner.run_benchmark(
task_name="BehaviorModeling",
benchmark_config="my_config.yaml",
agent_config="my_agent.py",
datasets_path="./my_datasets",
mode="test",
tenant_id="advanced_example",
exp_id="advanced_001",
official=True, # Mark as official validation
callback_url="https://my-callback-url.com/webhook"
)
print(f"Advanced benchmark completed: {result}")
asyncio.run(advanced_benchmark())
You'll need to create configuration files for your benchmarks:
Benchmark Configuration (config.yaml):
llm:
- api_key: YOUR-API-KEY
model: gpt-4
provider: openai
semaphore: 200
env:
db:
enabled: true
home_dir: .agentsociety-benchmark/agentsociety_data
Agent Configuration (agent_config.yaml):
agent_class: my_agent.py
number: 1
config:
name: MyAgent
description: A custom agent for testing
See examples/programmatic_usage.py for a complete working example that demonstrates all the features of the programmatic API.
.agentsociety-benchmark/ directory# config.yaml
llm:
- api_key: YOUR-API-KEY # LLM API key
model: YOUR-MODEL # LLM model
provider: PROVIDER # LLM provider
semaphore: 200 # Semaphore for LLM requests, control the max number of concurrent requests
env:
db:
enabled: true # Whether to enable database
home_dir: .agentsociety-benchmark/agentsociety_data
pyproject.tomlThis project is licensed under the MIT License. See the LICENSE file for details.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.4 | 24 Jul 2025 | 9 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b8d2d570c2bfbb10d5efdd5c5c1c946d74760ef83f5f710bae7664264e317663