agentsociety2 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of agentsociety2 might be problematic. Click here for more details.
- agentsociety2/__init__.py +40 -0
- agentsociety2/agent/__init__.py +4 -0
- agentsociety2/agent/base.py +790 -0
- agentsociety2/agent/donothing.py +167 -0
- agentsociety2/agent/person.py +3145 -0
- agentsociety2/backend/API_REFERENCE.md +348 -0
- agentsociety2/backend/README.md +355 -0
- agentsociety2/backend/__init__.py +2 -0
- agentsociety2/backend/analysis/README.md +225 -0
- agentsociety2/backend/analysis/__init__.py +95 -0
- agentsociety2/backend/analysis/agents.py +977 -0
- agentsociety2/backend/analysis/eda.py +147 -0
- agentsociety2/backend/analysis/models.py +334 -0
- agentsociety2/backend/analysis/prompts.py +78 -0
- agentsociety2/backend/analysis/report_generator.py +802 -0
- agentsociety2/backend/analysis/service.py +1081 -0
- agentsociety2/backend/analysis/skills/00_xml_contract.md +9 -0
- agentsociety2/backend/analysis/skills/10_visualization_reliability.md +15 -0
- agentsociety2/backend/analysis/skills/20_core_skills.md +76 -0
- agentsociety2/backend/analysis/skills/30_advanced_analysis.md +51 -0
- agentsociety2/backend/analysis/tool_executor.py +620 -0
- agentsociety2/backend/analysis/utils.py +334 -0
- agentsociety2/backend/app.py +184 -0
- agentsociety2/backend/models.py +68 -0
- agentsociety2/backend/routers/__init__.py +5 -0
- agentsociety2/backend/routers/chat.py +179 -0
- agentsociety2/backend/routers/custom.py +331 -0
- agentsociety2/backend/routers/experiments.py +485 -0
- agentsociety2/backend/routers/literature.py +281 -0
- agentsociety2/backend/routers/mineru.py +274 -0
- agentsociety2/backend/routers/modules.py +71 -0
- agentsociety2/backend/routers/prefill_params.py +176 -0
- agentsociety2/backend/routers/replay.py +844 -0
- agentsociety2/backend/routers/workspace.py +192 -0
- agentsociety2/backend/run.py +47 -0
- agentsociety2/backend/services/__init__.py +2 -0
- agentsociety2/backend/services/completion_service.py +673 -0
- agentsociety2/backend/services/custom/__init__.py +9 -0
- agentsociety2/backend/services/custom/generator.py +168 -0
- agentsociety2/backend/services/custom/scanner.py +274 -0
- agentsociety2/backend/services/custom/script_generator.py +302 -0
- agentsociety2/backend/sse/__init__.py +21 -0
- agentsociety2/backend/sse/models.py +65 -0
- agentsociety2/backend/tasks/__init__.py +5 -0
- agentsociety2/backend/tasks/manager.py +327 -0
- agentsociety2/backend/tools/__init__.py +2 -0
- agentsociety2/backend/tools/analysis_workspace.py +310 -0
- agentsociety2/backend/tools/base.py +95 -0
- agentsociety2/backend/tools/data_analysis.py +155 -0
- agentsociety2/backend/tools/experiment_analysis.py +596 -0
- agentsociety2/backend/tools/experiment_config.py +1630 -0
- agentsociety2/backend/tools/file_system.py +916 -0
- agentsociety2/backend/tools/generate_paper.py +787 -0
- agentsociety2/backend/tools/hypothesis.py +691 -0
- agentsociety2/backend/tools/literature_models.py +173 -0
- agentsociety2/backend/tools/literature_search.py +430 -0
- agentsociety2/backend/tools/load_literature.py +362 -0
- agentsociety2/backend/tools/miro_web_research.py +190 -0
- agentsociety2/backend/tools/registry.py +161 -0
- agentsociety2/backend/tools/run_experiment.py +755 -0
- agentsociety2/backend/tools/run_shell_command.py +320 -0
- agentsociety2/backend/tools/write_todo.py +180 -0
- agentsociety2/code_executor/__init__.py +23 -0
- agentsociety2/code_executor/api.py +191 -0
- agentsociety2/code_executor/code_executor.py +96 -0
- agentsociety2/code_executor/code_generator.py +284 -0
- agentsociety2/code_executor/code_saver.py +88 -0
- agentsociety2/code_executor/dependency_detector.py +203 -0
- agentsociety2/code_executor/docker_runner.py +295 -0
- agentsociety2/code_executor/local_executor.py +145 -0
- agentsociety2/code_executor/models.py +130 -0
- agentsociety2/code_executor/path_config.py +167 -0
- agentsociety2/code_executor/runtime_config.py +118 -0
- agentsociety2/config/__init__.py +17 -0
- agentsociety2/config/config.py +673 -0
- agentsociety2/config/list_models.py +92 -0
- agentsociety2/contrib/__init__.py +0 -0
- agentsociety2/contrib/agent/__init__.py +19 -0
- agentsociety2/contrib/agent/commons_tragedy_agent.py +415 -0
- agentsociety2/contrib/agent/llm_donor_agent.py +610 -0
- agentsociety2/contrib/agent/prisoners_dilemma_agent.py +330 -0
- agentsociety2/contrib/agent/public_goods_agent.py +354 -0
- agentsociety2/contrib/agent/trust_game_agent.py +577 -0
- agentsociety2/contrib/agent/volunteer_dilemma_agent.py +372 -0
- agentsociety2/contrib/env/__init__.py +35 -0
- agentsociety2/contrib/env/commons_tragedy.py +355 -0
- agentsociety2/contrib/env/economy_space.py +359 -0
- agentsociety2/contrib/env/endowment_effect.py +273 -0
- agentsociety2/contrib/env/event_space.py +483 -0
- agentsociety2/contrib/env/global_information.py +100 -0
- agentsociety2/contrib/env/mobility_space/__init__.py +11 -0
- agentsociety2/contrib/env/mobility_space/download_sim.py +56 -0
- agentsociety2/contrib/env/mobility_space/environment.py +934 -0
- agentsociety2/contrib/env/mobility_space/map.py +933 -0
- agentsociety2/contrib/env/mobility_space/replay_tables.py +38 -0
- agentsociety2/contrib/env/mobility_space/utils/__init__.py +13 -0
- agentsociety2/contrib/env/mobility_space/utils/const.py +244 -0
- agentsociety2/contrib/env/mobility_space/utils/map_utils.py +154 -0
- agentsociety2/contrib/env/mobility_space/utils/port.py +54 -0
- agentsociety2/contrib/env/prisoners_dilemma.py +288 -0
- agentsociety2/contrib/env/public_goods.py +272 -0
- agentsociety2/contrib/env/reputation_game.py +823 -0
- agentsociety2/contrib/env/self_enhancement.py +290 -0
- agentsociety2/contrib/env/self_reference_effect.py +570 -0
- agentsociety2/contrib/env/simple_social_space.py +408 -0
- agentsociety2/contrib/env/social_media/__init__.py +18 -0
- agentsociety2/contrib/env/social_media/models.py +397 -0
- agentsociety2/contrib/env/social_media/recommend.py +301 -0
- agentsociety2/contrib/env/social_media/recommendation/README.md +719 -0
- agentsociety2/contrib/env/social_media/recommendation/__init__.py +36 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/__init__.py +38 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/core.py +248 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/deepfm/__init__.py +12 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/deepfm/config.py +49 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/deepfm/model.py +431 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/din/__init__.py +12 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/din/config.py +53 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/din/model.py +689 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/lightgcn/__init__.py +12 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/lightgcn/config.py +43 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/lightgcn/model.py +435 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/mf/__init__.py +15 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/mf/config.py +34 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/mf/enhanced_config.py +93 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/mf/enhanced_model.py +427 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/mf/model.py +335 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/ncf/__init__.py +12 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/ncf/config.py +45 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/ncf/model.py +408 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/sasrec/__init__.py +14 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/sasrec/sasrec_algorithm.py +438 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/sasrec/sasrec_config.py +119 -0
- agentsociety2/contrib/env/social_media/recommendation/algorithms/sasrec/sasrec_model.py +391 -0
- agentsociety2/contrib/env/social_media/recommendation/metrics.py +266 -0
- agentsociety2/contrib/env/social_media/recommendation/models.py +110 -0
- agentsociety2/contrib/env/social_media/recommendation/service.py +236 -0
- agentsociety2/contrib/env/social_media/recommendation/storage.py +173 -0
- agentsociety2/contrib/env/social_media/recommendation/trainer.py +229 -0
- agentsociety2/contrib/env/social_media/replay_tables.py +105 -0
- agentsociety2/contrib/env/social_media/schemas.py +144 -0
- agentsociety2/contrib/env/social_media/social_media_space.py +1974 -0
- agentsociety2/contrib/env/trust_game.py +471 -0
- agentsociety2/contrib/env/volunteer_dilemma.py +247 -0
- agentsociety2/custom/README.md +247 -0
- agentsociety2/custom/__init__.py +16 -0
- agentsociety2/custom/agents/__init__.py +23 -0
- agentsociety2/custom/agents/examples/advanced_agent.py +137 -0
- agentsociety2/custom/agents/examples/simple_agent.py +132 -0
- agentsociety2/custom/envs/__init__.py +23 -0
- agentsociety2/custom/envs/examples/advanced_env.py +164 -0
- agentsociety2/custom/envs/examples/simple_env.py +157 -0
- agentsociety2/designer/README_LITERATURE_SEARCH.md +139 -0
- agentsociety2/designer/__init__.py +46 -0
- agentsociety2/designer/agent_processing/__init__.py +28 -0
- agentsociety2/designer/agent_processing/agent_file_processor.py +429 -0
- agentsociety2/designer/agent_processing/agent_filter.py +876 -0
- agentsociety2/designer/agent_processing/agent_generator.py +420 -0
- agentsociety2/designer/agent_processing/agent_selector.py +439 -0
- agentsociety2/designer/agent_processing/agent_supplement_checker.py +141 -0
- agentsociety2/designer/agent_processing/field_metadata.py +87 -0
- agentsociety2/designer/agent_processing/utils.py +42 -0
- agentsociety2/designer/config_builder.py +678 -0
- agentsociety2/designer/exp_designer.py +1782 -0
- agentsociety2/designer/exp_executor.py +696 -0
- agentsociety2/designer/exp_pipeline.py +137 -0
- agentsociety2/designer/literature_search.py +739 -0
- agentsociety2/env/__init__.py +22 -0
- agentsociety2/env/base.py +460 -0
- agentsociety2/env/benchmark.py +11 -0
- agentsociety2/env/function_parser.py +339 -0
- agentsociety2/env/pydantic_collector.py +133 -0
- agentsociety2/env/router_base.py +1256 -0
- agentsociety2/env/router_codegen.py +1488 -0
- agentsociety2/env/router_plan_execute.py +602 -0
- agentsociety2/env/router_react.py +418 -0
- agentsociety2/env/router_search_tool.py +532 -0
- agentsociety2/env/router_two_tier_plan_execute.py +466 -0
- agentsociety2/env/router_two_tier_react.py +541 -0
- agentsociety2/logger/__init__.py +366 -0
- agentsociety2/mcp/README.md +513 -0
- agentsociety2/mcp/__init__.py +20 -0
- agentsociety2/mcp/models.py +82 -0
- agentsociety2/mcp/registry.py +75 -0
- agentsociety2/mcp/server.py +703 -0
- agentsociety2/society/__init__.py +27 -0
- agentsociety2/society/cli.py +554 -0
- agentsociety2/society/helper.py +852 -0
- agentsociety2/society/models.py +108 -0
- agentsociety2/society/society.py +253 -0
- agentsociety2/storage/__init__.py +28 -0
- agentsociety2/storage/models.py +46 -0
- agentsociety2/storage/replay_writer.py +285 -0
- agentsociety2/storage/table_schema.py +98 -0
- agentsociety2-2.0.0.dist-info/METADATA +427 -0
- agentsociety2-2.0.0.dist-info/RECORD +197 -0
- agentsociety2-2.0.0.dist-info/WHEEL +4 -0
- agentsociety2-2.0.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AgentSociety 2: A modern, LLM-native agent simulation platform.
|
|
3
|
+
|
|
4
|
+
This package provides tools for building and simulating LLM-driven agents
|
|
5
|
+
in various environments for social science research.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "2.0.0"
|
|
9
|
+
|
|
10
|
+
# Import main components for easy access
|
|
11
|
+
from .agent import AgentBase, PersonAgent
|
|
12
|
+
from .env import (
|
|
13
|
+
EnvBase,
|
|
14
|
+
RouterBase,
|
|
15
|
+
ReActRouter,
|
|
16
|
+
PlanExecuteRouter,
|
|
17
|
+
CodeGenRouter,
|
|
18
|
+
TwoTierReActRouter,
|
|
19
|
+
TwoTierPlanExecuteRouter,
|
|
20
|
+
SearchToolRouter,
|
|
21
|
+
tool,
|
|
22
|
+
)
|
|
23
|
+
from .society import AgentSocietyHelper
|
|
24
|
+
from .storage import ReplayWriter
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"AgentBase",
|
|
28
|
+
"PersonAgent",
|
|
29
|
+
"EnvBase",
|
|
30
|
+
"RouterBase",
|
|
31
|
+
"ReActRouter",
|
|
32
|
+
"PlanExecuteRouter",
|
|
33
|
+
"CodeGenRouter",
|
|
34
|
+
"TwoTierReActRouter",
|
|
35
|
+
"TwoTierPlanExecuteRouter",
|
|
36
|
+
"SearchToolRouter",
|
|
37
|
+
"tool",
|
|
38
|
+
"AgentSocietyHelper",
|
|
39
|
+
"ReplayWriter",
|
|
40
|
+
]
|