Skip to content

AFindex/world_book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Framework MVP

本项目提供一个最小可用的 Agent 框架:世界书 agent 负责确定性规则与状态,角色 agent 负责叙事与行动提案。用户可通过 CLI 观察并推动故事进展。

运行方式

  1. 安装依赖:
pip install -e .
  1. 配置 LLM(可选,兼容 Anthropic API 风格):

复制 config.example.jsonconfig.json,并修改其中的 api_key 等字段。 其中 base_url 为 API 基础域名或完整路径(如 https://api.anthropic.com)。 第三方兼容接口建议设置 provideranthropic_compatopenai_compat。 如需自定义路径,可设置环境变量 AGENT_CONFIG_PATH 指向配置文件。

  1. 一键准备虚拟环境并启动:
scripts\run_cli.bat

或手动启动 CLI:

agent-cli

API 检测

在配置好 config.json 后,可执行:

agent-llm-check

交互命令

  • /state 查看世界状态
  • /history 查看故事历史
  • /quit 退出

扩展方向

  • src/agents/world_book.py 中添加更丰富规则与裁决逻辑。
  • src/agents/character.py 中改写人物设定与提示词。
  • WorldState 持久化到文件或数据库。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published