animaworks 0.7.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.
Files changed (536) hide show
  1. animaworks-0.7.0.dist-info/METADATA +564 -0
  2. animaworks-0.7.0.dist-info/RECORD +536 -0
  3. animaworks-0.7.0.dist-info/WHEEL +5 -0
  4. animaworks-0.7.0.dist-info/entry_points.txt +3 -0
  5. animaworks-0.7.0.dist-info/licenses/LICENSE +191 -0
  6. animaworks-0.7.0.dist-info/top_level.txt +4 -0
  7. cli/__init__.py +9 -0
  8. cli/__main__.py +9 -0
  9. cli/_gateway.py +112 -0
  10. cli/commands/__init__.py +5 -0
  11. cli/commands/anima.py +145 -0
  12. cli/commands/anima_mgmt.py +1168 -0
  13. cli/commands/board.py +179 -0
  14. cli/commands/cost_cmd.py +168 -0
  15. cli/commands/index_cmd.py +374 -0
  16. cli/commands/init_cmd.py +150 -0
  17. cli/commands/internal_cmd.py +330 -0
  18. cli/commands/logs.py +206 -0
  19. cli/commands/messaging.py +154 -0
  20. cli/commands/migrate_cmd.py +119 -0
  21. cli/commands/models_cmd.py +215 -0
  22. cli/commands/optimize_assets.py +189 -0
  23. cli/commands/profile.py +333 -0
  24. cli/commands/remake_cmd.py +272 -0
  25. cli/commands/server.py +587 -0
  26. cli/commands/supervisor_cmd.py +246 -0
  27. cli/commands/task_cmd.py +130 -0
  28. cli/commands/vault_cmd.py +99 -0
  29. cli/parser.py +887 -0
  30. core/__init__.py +7 -0
  31. core/_agent_cycle.py +1064 -0
  32. core/_agent_executor.py +300 -0
  33. core/_agent_priming.py +430 -0
  34. core/_agent_prompt_log.py +169 -0
  35. core/_anima_heartbeat.py +731 -0
  36. core/_anima_inbox.py +929 -0
  37. core/_anima_lifecycle.py +864 -0
  38. core/_anima_messaging.py +890 -0
  39. core/agent.py +326 -0
  40. core/anima.py +399 -0
  41. core/anima_factory.py +756 -0
  42. core/asset_reconciler.py +624 -0
  43. core/audit.py +573 -0
  44. core/auth/__init__.py +7 -0
  45. core/auth/manager.py +187 -0
  46. core/auth/models.py +45 -0
  47. core/auto_updater.py +198 -0
  48. core/background.py +527 -0
  49. core/cascade_limiter.py +282 -0
  50. core/config/__init__.py +35 -0
  51. core/config/anima_registry.py +242 -0
  52. core/config/cli.py +444 -0
  53. core/config/env_slots.py +118 -0
  54. core/config/global_permissions.py +251 -0
  55. core/config/io.py +155 -0
  56. core/config/local_llm.py +101 -0
  57. core/config/migrate.py +949 -0
  58. core/config/model_config.py +213 -0
  59. core/config/model_mode.py +385 -0
  60. core/config/models.py +103 -0
  61. core/config/resolver.py +156 -0
  62. core/config/schemas.py +827 -0
  63. core/config/vault.py +413 -0
  64. core/discord_webhooks.py +287 -0
  65. core/exceptions.py +148 -0
  66. core/execution/__init__.py +62 -0
  67. core/execution/_completion_gate.py +55 -0
  68. core/execution/_litellm_context.py +406 -0
  69. core/execution/_litellm_streaming.py +1064 -0
  70. core/execution/_litellm_tools.py +432 -0
  71. core/execution/_sanitize.py +208 -0
  72. core/execution/_sdk_hooks.py +952 -0
  73. core/execution/_sdk_interrupt.py +106 -0
  74. core/execution/_sdk_options.py +480 -0
  75. core/execution/_sdk_patch.py +174 -0
  76. core/execution/_sdk_security.py +315 -0
  77. core/execution/_sdk_session.py +351 -0
  78. core/execution/_sdk_stream.py +497 -0
  79. core/execution/_session.py +185 -0
  80. core/execution/_streaming.py +303 -0
  81. core/execution/_tool_summary.py +73 -0
  82. core/execution/agent_sdk.py +592 -0
  83. core/execution/anthropic_fallback.py +776 -0
  84. core/execution/assisted.py +878 -0
  85. core/execution/base.py +751 -0
  86. core/execution/codex_sdk.py +1474 -0
  87. core/execution/cursor_agent.py +649 -0
  88. core/execution/gemini_cli.py +634 -0
  89. core/execution/litellm_loop.py +452 -0
  90. core/execution/reminder.py +113 -0
  91. core/fd_limits.py +123 -0
  92. core/i18n/__init__.py +103 -0
  93. core/i18n/strings/__init__.py +57 -0
  94. core/i18n/strings/communication.py +47 -0
  95. core/i18n/strings/config.py +294 -0
  96. core/i18n/strings/discord.py +28 -0
  97. core/i18n/strings/execution.py +131 -0
  98. core/i18n/strings/handler.py +373 -0
  99. core/i18n/strings/handler_ext.py +299 -0
  100. core/i18n/strings/lifecycle.py +57 -0
  101. core/i18n/strings/memory.py +232 -0
  102. core/i18n/strings/migrate.py +42 -0
  103. core/i18n/strings/misc.py +503 -0
  104. core/i18n/strings/misc_machine.py +165 -0
  105. core/i18n/strings/misc_routes.py +465 -0
  106. core/i18n/strings/room_manager.py +29 -0
  107. core/i18n/strings/server.py +129 -0
  108. core/i18n/strings/supervisor.py +53 -0
  109. core/i18n/strings/tooling.py +323 -0
  110. core/i18n/strings/tooling_schema.py +472 -0
  111. core/i18n/strings/tooling_schema_ext.py +185 -0
  112. core/image_artifacts.py +219 -0
  113. core/init.py +825 -0
  114. core/lifecycle/__init__.py +165 -0
  115. core/lifecycle/inbox_watcher.py +187 -0
  116. core/lifecycle/rate_limiter.py +60 -0
  117. core/lifecycle/scheduler.py +286 -0
  118. core/lifecycle/system_consolidation.py +264 -0
  119. core/lifecycle/system_crons.py +300 -0
  120. core/logging_config.py +278 -0
  121. core/mcp/__init__.py +0 -0
  122. core/mcp/server.py +614 -0
  123. core/memory/__init__.py +22 -0
  124. core/memory/_activity_conversation.py +480 -0
  125. core/memory/_activity_models.py +200 -0
  126. core/memory/_activity_priming.py +372 -0
  127. core/memory/_activity_rotation.py +141 -0
  128. core/memory/_activity_timeline.py +251 -0
  129. core/memory/_io.py +69 -0
  130. core/memory/_llm_utils.py +430 -0
  131. core/memory/activity.py +451 -0
  132. core/memory/audit.py +313 -0
  133. core/memory/bm25.py +310 -0
  134. core/memory/config_reader.py +109 -0
  135. core/memory/consolidation.py +1216 -0
  136. core/memory/contradiction.py +972 -0
  137. core/memory/conversation.py +450 -0
  138. core/memory/conversation_compression.py +188 -0
  139. core/memory/conversation_finalize.py +300 -0
  140. core/memory/conversation_models.py +149 -0
  141. core/memory/conversation_prompt.py +270 -0
  142. core/memory/conversation_state_update.py +164 -0
  143. core/memory/cron_logger.py +154 -0
  144. core/memory/dedup.py +86 -0
  145. core/memory/distillation.py +783 -0
  146. core/memory/forgetting.py +825 -0
  147. core/memory/frontmatter.py +443 -0
  148. core/memory/housekeeping.py +423 -0
  149. core/memory/manager.py +670 -0
  150. core/memory/priming/__init__.py +69 -0
  151. core/memory/priming/budget.py +166 -0
  152. core/memory/priming/channel_a.py +47 -0
  153. core/memory/priming/channel_b.py +406 -0
  154. core/memory/priming/channel_c.py +213 -0
  155. core/memory/priming/channel_e.py +133 -0
  156. core/memory/priming/channel_f.py +84 -0
  157. core/memory/priming/constants.py +107 -0
  158. core/memory/priming/engine.py +445 -0
  159. core/memory/priming/format.py +100 -0
  160. core/memory/priming/outbound.py +111 -0
  161. core/memory/priming/utils.py +255 -0
  162. core/memory/rag/__init__.py +32 -0
  163. core/memory/rag/graph.py +851 -0
  164. core/memory/rag/http_store.py +201 -0
  165. core/memory/rag/indexer.py +810 -0
  166. core/memory/rag/retriever.py +588 -0
  167. core/memory/rag/singleton.py +255 -0
  168. core/memory/rag/store.py +403 -0
  169. core/memory/rag/watcher.py +382 -0
  170. core/memory/rag_search.py +536 -0
  171. core/memory/reconsolidation.py +593 -0
  172. core/memory/resolution_tracker.py +61 -0
  173. core/memory/shortterm.py +324 -0
  174. core/memory/skill_metadata.py +335 -0
  175. core/memory/streaming_journal.py +470 -0
  176. core/memory/task_queue.py +704 -0
  177. core/memory/token_usage.py +330 -0
  178. core/memory/validation.py +233 -0
  179. core/messenger.py +744 -0
  180. core/migrations/__init__.py +21 -0
  181. core/migrations/registry.py +159 -0
  182. core/migrations/steps.py +1060 -0
  183. core/migrations/tracker.py +110 -0
  184. core/notification/__init__.py +16 -0
  185. core/notification/channels/__init__.py +7 -0
  186. core/notification/channels/chatwork.py +86 -0
  187. core/notification/channels/discord.py +228 -0
  188. core/notification/channels/line.py +86 -0
  189. core/notification/channels/ntfy.py +87 -0
  190. core/notification/channels/slack.py +242 -0
  191. core/notification/channels/telegram.py +91 -0
  192. core/notification/interactive.py +411 -0
  193. core/notification/notifier.py +219 -0
  194. core/notification/reply_routing.py +353 -0
  195. core/org_sync.py +532 -0
  196. core/outbound.py +387 -0
  197. core/outbound_auto.py +386 -0
  198. core/paths.py +176 -0
  199. core/platform/__init__.py +4 -0
  200. core/platform/claude_code.py +157 -0
  201. core/platform/codex.py +200 -0
  202. core/platform/cursor.py +51 -0
  203. core/platform/gemini.py +37 -0
  204. core/platform/locks.py +73 -0
  205. core/platform/process.py +144 -0
  206. core/prompt/__init__.py +8 -0
  207. core/prompt/assembler.py +141 -0
  208. core/prompt/builder.py +719 -0
  209. core/prompt/context.py +350 -0
  210. core/prompt/messaging.py +231 -0
  211. core/prompt/org_context.py +343 -0
  212. core/prompt/sections.py +78 -0
  213. core/response_normalize.py +141 -0
  214. core/schedule_parser.py +321 -0
  215. core/schemas.py +223 -0
  216. core/session_compactor.py +466 -0
  217. core/supervisor/__init__.py +35 -0
  218. core/supervisor/_mgr_health.py +378 -0
  219. core/supervisor/_mgr_reconcile.py +291 -0
  220. core/supervisor/_mgr_scheduler.py +836 -0
  221. core/supervisor/inbox_rate_limiter.py +308 -0
  222. core/supervisor/ipc.py +507 -0
  223. core/supervisor/manager.py +758 -0
  224. core/supervisor/pending_executor.py +1046 -0
  225. core/supervisor/process_handle.py +635 -0
  226. core/supervisor/runner.py +743 -0
  227. core/supervisor/scheduler_manager.py +768 -0
  228. core/supervisor/streaming_handler.py +376 -0
  229. core/supervisor/transport.py +213 -0
  230. core/time_utils.py +103 -0
  231. core/tooling/__init__.py +35 -0
  232. core/tooling/dispatch.py +250 -0
  233. core/tooling/guide.py +133 -0
  234. core/tooling/handler.py +780 -0
  235. core/tooling/handler_base.py +323 -0
  236. core/tooling/handler_comms.py +650 -0
  237. core/tooling/handler_create_anima.py +112 -0
  238. core/tooling/handler_delegation.py +254 -0
  239. core/tooling/handler_files.py +1003 -0
  240. core/tooling/handler_memory.py +811 -0
  241. core/tooling/handler_org.py +39 -0
  242. core/tooling/handler_org_dashboard.py +199 -0
  243. core/tooling/handler_perms.py +397 -0
  244. core/tooling/handler_skills.py +615 -0
  245. core/tooling/handler_subordinate_control.py +415 -0
  246. core/tooling/org_helpers.py +159 -0
  247. core/tooling/permissions.py +185 -0
  248. core/tooling/prompt_db.py +1033 -0
  249. core/tooling/schemas/__init__.py +93 -0
  250. core/tooling/schemas/admin.py +238 -0
  251. core/tooling/schemas/builder.py +221 -0
  252. core/tooling/schemas/channel.py +105 -0
  253. core/tooling/schemas/completion_gate.py +28 -0
  254. core/tooling/schemas/converters.py +147 -0
  255. core/tooling/schemas/loader.py +101 -0
  256. core/tooling/schemas/memory.py +380 -0
  257. core/tooling/schemas/notification.py +63 -0
  258. core/tooling/schemas/session_todo.py +62 -0
  259. core/tooling/schemas/skill.py +152 -0
  260. core/tooling/schemas/supervisor.py +325 -0
  261. core/tooling/schemas/task.py +167 -0
  262. core/tooling/skill_creator.py +76 -0
  263. core/tools/__init__.py +354 -0
  264. core/tools/_anima_icon_url.py +306 -0
  265. core/tools/_async_compat.py +41 -0
  266. core/tools/_base.py +354 -0
  267. core/tools/_cache.py +72 -0
  268. core/tools/_chatwork_cache.py +244 -0
  269. core/tools/_chatwork_cli.py +603 -0
  270. core/tools/_chatwork_client.py +229 -0
  271. core/tools/_chatwork_markdown.py +162 -0
  272. core/tools/_comm_cli.py +71 -0
  273. core/tools/_discord_cache.py +266 -0
  274. core/tools/_discord_cli.py +311 -0
  275. core/tools/_discord_client.py +371 -0
  276. core/tools/_discord_markdown.py +138 -0
  277. core/tools/_image_cli.py +369 -0
  278. core/tools/_image_clients.py +87 -0
  279. core/tools/_image_glb.py +435 -0
  280. core/tools/_image_pipeline.py +770 -0
  281. core/tools/_image_schemas.py +42 -0
  282. core/tools/_retry.py +214 -0
  283. core/tools/_slack_cache.py +381 -0
  284. core/tools/_slack_cli.py +320 -0
  285. core/tools/_slack_client.py +325 -0
  286. core/tools/_slack_markdown.py +240 -0
  287. core/tools/aws_collector.py +393 -0
  288. core/tools/call_human.py +332 -0
  289. core/tools/chatwork.py +215 -0
  290. core/tools/discord.py +275 -0
  291. core/tools/github.py +398 -0
  292. core/tools/gmail.py +906 -0
  293. core/tools/google_calendar.py +336 -0
  294. core/tools/google_tasks.py +443 -0
  295. core/tools/image/__init__.py +81 -0
  296. core/tools/image/constants.py +57 -0
  297. core/tools/image/diffusers_local.py +904 -0
  298. core/tools/image/fal.py +244 -0
  299. core/tools/image/meshy.py +311 -0
  300. core/tools/image/novelai.py +193 -0
  301. core/tools/image/prompts.py +197 -0
  302. core/tools/image/utils.py +136 -0
  303. core/tools/image_gen.py +410 -0
  304. core/tools/local_llm.py +542 -0
  305. core/tools/machine.py +845 -0
  306. core/tools/notion.py +830 -0
  307. core/tools/slack.py +245 -0
  308. core/tools/transcribe.py +426 -0
  309. core/tools/web_search.py +399 -0
  310. core/tools/x_search.py +335 -0
  311. core/voice/__init__.py +7 -0
  312. core/voice/sentence_splitter.py +71 -0
  313. core/voice/session.py +383 -0
  314. core/voice/stt.py +127 -0
  315. core/voice/tts_base.py +61 -0
  316. core/voice/tts_elevenlabs.py +133 -0
  317. core/voice/tts_factory.py +43 -0
  318. core/voice/tts_sbv2.py +112 -0
  319. core/voice/tts_voicevox.py +110 -0
  320. core/workspace.py +199 -0
  321. main.py +10 -0
  322. server/__init__.py +7 -0
  323. server/app.py +802 -0
  324. server/dependencies.py +19 -0
  325. server/discord_channel_sync.py +271 -0
  326. server/discord_gateway.py +727 -0
  327. server/events.py +56 -0
  328. server/localhost.py +86 -0
  329. server/reload_manager.py +101 -0
  330. server/room_manager.py +503 -0
  331. server/routes/__init__.py +65 -0
  332. server/routes/activity_report.py +303 -0
  333. server/routes/animas.py +1035 -0
  334. server/routes/approve.py +89 -0
  335. server/routes/assets.py +1342 -0
  336. server/routes/auth.py +131 -0
  337. server/routes/brainstorm.py +287 -0
  338. server/routes/channels.py +483 -0
  339. server/routes/chat.py +346 -0
  340. server/routes/chat_chunk_handler.py +251 -0
  341. server/routes/chat_emotion.py +41 -0
  342. server/routes/chat_images.py +80 -0
  343. server/routes/chat_models.py +49 -0
  344. server/routes/chat_producer.py +375 -0
  345. server/routes/chat_resume.py +114 -0
  346. server/routes/chat_ui_state.py +103 -0
  347. server/routes/chat_ws_effects.py +55 -0
  348. server/routes/config_routes.py +619 -0
  349. server/routes/external_tasks.py +313 -0
  350. server/routes/internal.py +311 -0
  351. server/routes/logs_routes.py +213 -0
  352. server/routes/media_proxy.py +186 -0
  353. server/routes/memory_routes.py +212 -0
  354. server/routes/room.py +405 -0
  355. server/routes/sessions.py +214 -0
  356. server/routes/setup.py +517 -0
  357. server/routes/system.py +931 -0
  358. server/routes/team_presets.py +279 -0
  359. server/routes/tool_prompts.py +258 -0
  360. server/routes/usage_routes.py +881 -0
  361. server/routes/users.py +260 -0
  362. server/routes/voice.py +209 -0
  363. server/routes/webhooks.py +331 -0
  364. server/routes/websocket_route.py +46 -0
  365. server/slack_avatar_upload.py +152 -0
  366. server/slack_channel_sync.py +479 -0
  367. server/slack_interactive.py +227 -0
  368. server/slack_socket.py +1010 -0
  369. server/static/approve.html +163 -0
  370. server/static/i18n/en.json +827 -0
  371. server/static/i18n/ja.json +827 -0
  372. server/static/i18n/ko.json +740 -0
  373. server/static/index.html +175 -0
  374. server/static/modules/activity.js +35 -0
  375. server/static/modules/animas.js +156 -0
  376. server/static/modules/api.js +118 -0
  377. server/static/modules/app.js +312 -0
  378. server/static/modules/avatar-resolver.js +111 -0
  379. server/static/modules/image-cache.js +257 -0
  380. server/static/modules/login.js +99 -0
  381. server/static/modules/memory.js +85 -0
  382. server/static/modules/router.js +142 -0
  383. server/static/modules/state.js +179 -0
  384. server/static/modules/status.js +34 -0
  385. server/static/modules/team-data.js +416 -0
  386. server/static/modules/touch.js +114 -0
  387. server/static/modules/voice-playback.js +110 -0
  388. server/static/modules/voice-ui.js +353 -0
  389. server/static/modules/voice-vad.js +93 -0
  390. server/static/modules/voice-worklet.js +42 -0
  391. server/static/modules/voice.js +325 -0
  392. server/static/modules/websocket.js +386 -0
  393. server/static/pages/activity-report.js +258 -0
  394. server/static/pages/activity.js +385 -0
  395. server/static/pages/animas.js +972 -0
  396. server/static/pages/assets.js +1189 -0
  397. server/static/pages/board.js +801 -0
  398. server/static/pages/brainstorm.js +282 -0
  399. server/static/pages/chat/activity-controller.js +113 -0
  400. server/static/pages/chat/anima-controller.js +406 -0
  401. server/static/pages/chat/avatar-controller.js +64 -0
  402. server/static/pages/chat/chat-renderer.js +452 -0
  403. server/static/pages/chat/ctx.js +210 -0
  404. server/static/pages/chat/events-controller.js +281 -0
  405. server/static/pages/chat/history-controller.js +190 -0
  406. server/static/pages/chat/image-voice-controller.js +66 -0
  407. server/static/pages/chat/meeting-controller.js +362 -0
  408. server/static/pages/chat/memory-controller.js +60 -0
  409. server/static/pages/chat/pane-host.js +521 -0
  410. server/static/pages/chat/sidebar-controller.js +94 -0
  411. server/static/pages/chat/splitter.js +84 -0
  412. server/static/pages/chat/streaming-controller.js +903 -0
  413. server/static/pages/chat/thread-controller.js +255 -0
  414. server/static/pages/chat.js +111 -0
  415. server/static/pages/home.js +889 -0
  416. server/static/pages/logs.js +272 -0
  417. server/static/pages/memory.js +239 -0
  418. server/static/pages/processes.js +282 -0
  419. server/static/pages/server-page.js +189 -0
  420. server/static/pages/settings.js +516 -0
  421. server/static/pages/setup.js +806 -0
  422. server/static/pages/team-builder.js +909 -0
  423. server/static/pages/team-edit.js +239 -0
  424. server/static/pages/tool-prompts.js +462 -0
  425. server/static/pages/users.js +90 -0
  426. server/static/setup/i18n/ar.json +102 -0
  427. server/static/setup/i18n/de.json +102 -0
  428. server/static/setup/i18n/en.json +144 -0
  429. server/static/setup/i18n/es.json +102 -0
  430. server/static/setup/i18n/fr.json +102 -0
  431. server/static/setup/i18n/hi.json +102 -0
  432. server/static/setup/i18n/id.json +102 -0
  433. server/static/setup/i18n/it.json +101 -0
  434. server/static/setup/i18n/ja.json +144 -0
  435. server/static/setup/i18n/ko.json +102 -0
  436. server/static/setup/i18n/pt.json +101 -0
  437. server/static/setup/i18n/ru.json +102 -0
  438. server/static/setup/i18n/th.json +102 -0
  439. server/static/setup/i18n/tr.json +102 -0
  440. server/static/setup/i18n/vi.json +102 -0
  441. server/static/setup/i18n/zh-CN.json +102 -0
  442. server/static/setup/i18n/zh-TW.json +102 -0
  443. server/static/setup/index.html +57 -0
  444. server/static/setup/setup.css +939 -0
  445. server/static/setup/setup.js +187 -0
  446. server/static/setup/steps/confirm.js +193 -0
  447. server/static/setup/steps/environment.js +838 -0
  448. server/static/setup/steps/language.js +195 -0
  449. server/static/setup/steps/leader.js +50 -0
  450. server/static/setup/steps/userinfo.js +92 -0
  451. server/static/shared/activity-types.js +121 -0
  452. server/static/shared/avatar-utils.js +17 -0
  453. server/static/shared/chat/draft.js +44 -0
  454. server/static/shared/chat/history-loader.js +110 -0
  455. server/static/shared/chat/org-utils.js +32 -0
  456. server/static/shared/chat/render-utils.js +1102 -0
  457. server/static/shared/chat/scroll-observer.js +54 -0
  458. server/static/shared/chat/session-manager.js +461 -0
  459. server/static/shared/chat/thread-logic.js +203 -0
  460. server/static/shared/chat-stream.js +412 -0
  461. server/static/shared/favicon.svg +30 -0
  462. server/static/shared/i18n.js +67 -0
  463. server/static/shared/image-input.js +244 -0
  464. server/static/shared/logger.js +150 -0
  465. server/static/shared/sse-parser.js +72 -0
  466. server/static/shared/text-artifact.js +122 -0
  467. server/static/styles/activity-report.css +240 -0
  468. server/static/styles/activity.css +384 -0
  469. server/static/styles/assets.css +799 -0
  470. server/static/styles/avatar.css +54 -0
  471. server/static/styles/base.css +688 -0
  472. server/static/styles/board.css +550 -0
  473. server/static/styles/chat.css +3364 -0
  474. server/static/styles/dashboard.css +715 -0
  475. server/static/styles/history.css +183 -0
  476. server/static/styles/layout.css +35 -0
  477. server/static/styles/memory.css +128 -0
  478. server/static/styles/responsive.css +1006 -0
  479. server/static/styles/settings.css +337 -0
  480. server/static/styles/sidebar-nav.css +143 -0
  481. server/static/styles/sidebar.css +181 -0
  482. server/static/styles/team-builder.css +543 -0
  483. server/static/styles/tokens.css +431 -0
  484. server/static/styles/voice.css +227 -0
  485. server/static/vendor/lucide/LICENSE +39 -0
  486. server/static/vendor/lucide/lucide.min.js +12 -0
  487. server/static/workspace/index.html +158 -0
  488. server/static/workspace/modules/activity.js +64 -0
  489. server/static/workspace/modules/anima.js +303 -0
  490. server/static/workspace/modules/api.js +165 -0
  491. server/static/workspace/modules/app-mobile.js +54 -0
  492. server/static/workspace/modules/app-system.js +125 -0
  493. server/static/workspace/modules/app-websocket.js +375 -0
  494. server/static/workspace/modules/app.js +285 -0
  495. server/static/workspace/modules/board.js +203 -0
  496. server/static/workspace/modules/character-animation.js +271 -0
  497. server/static/workspace/modules/character-appearance.js +371 -0
  498. server/static/workspace/modules/character-effects.js +129 -0
  499. server/static/workspace/modules/character-loader.js +284 -0
  500. server/static/workspace/modules/character.js +314 -0
  501. server/static/workspace/modules/chat-controller.js +226 -0
  502. server/static/workspace/modules/chat-history.js +179 -0
  503. server/static/workspace/modules/chat-mobile.js +212 -0
  504. server/static/workspace/modules/chat-streaming.js +547 -0
  505. server/static/workspace/modules/chat-thread.js +140 -0
  506. server/static/workspace/modules/idle_behavior.js +395 -0
  507. server/static/workspace/modules/interactions.js +545 -0
  508. server/static/workspace/modules/live2d.js +485 -0
  509. server/static/workspace/modules/login.js +137 -0
  510. server/static/workspace/modules/memory.js +165 -0
  511. server/static/workspace/modules/message-popup.js +127 -0
  512. server/static/workspace/modules/model-cache.js +187 -0
  513. server/static/workspace/modules/movement.js +263 -0
  514. server/static/workspace/modules/navigation.js +341 -0
  515. server/static/workspace/modules/office-furniture.js +294 -0
  516. server/static/workspace/modules/office-interaction.js +167 -0
  517. server/static/workspace/modules/office-layout.js +218 -0
  518. server/static/workspace/modules/office-structure.js +157 -0
  519. server/static/workspace/modules/office3d.js +335 -0
  520. server/static/workspace/modules/org-dashboard.js +1436 -0
  521. server/static/workspace/modules/replay-engine.js +353 -0
  522. server/static/workspace/modules/replay-ui.js +292 -0
  523. server/static/workspace/modules/reveal.js +84 -0
  524. server/static/workspace/modules/session.js +474 -0
  525. server/static/workspace/modules/sidebar.js +40 -0
  526. server/static/workspace/modules/state.js +39 -0
  527. server/static/workspace/modules/timeline-dom.js +258 -0
  528. server/static/workspace/modules/timeline-history.js +122 -0
  529. server/static/workspace/modules/timeline-replay.js +95 -0
  530. server/static/workspace/modules/timeline.js +202 -0
  531. server/static/workspace/modules/utils.js +210 -0
  532. server/static/workspace/modules/websocket.js +144 -0
  533. server/static/workspace/style.css +4255 -0
  534. server/stream_registry.py +488 -0
  535. server/usage_governor.py +707 -0
  536. server/websocket.py +165 -0
@@ -0,0 +1,564 @@
1
+ Metadata-Version: 2.4
2
+ Name: animaworks
3
+ Version: 0.7.0
4
+ Summary: AnimaWorks - Digital Anima Framework with library-type memory
5
+ License-Expression: Apache-2.0
6
+ Project-URL: Homepage, https://github.com/xuiltul/animaworks
7
+ Project-URL: Documentation, https://github.com/xuiltul/animaworks#readme
8
+ Project-URL: Repository, https://github.com/xuiltul/animaworks
9
+ Project-URL: Issues, https://github.com/xuiltul/animaworks/issues
10
+ Project-URL: Changelog, https://github.com/xuiltul/animaworks/blob/main/CHANGELOG.md
11
+ Keywords: ai,agent,autonomous,organization,memory,rag
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Classifier: Framework :: FastAPI
18
+ Requires-Python: >=3.12
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: claude-agent-sdk>=0.1.40; platform_system != "Windows"
22
+ Requires-Dist: anthropic>=0.42.0
23
+ Requires-Dist: openai-codex-sdk<0.2,>=0.1.11
24
+ Requires-Dist: litellm>=1.82.6
25
+ Requires-Dist: fastapi>=0.115.0
26
+ Requires-Dist: uvicorn[standard]>=0.34.0
27
+ Requires-Dist: apscheduler>=3.10.0
28
+ Requires-Dist: pydantic>=2.0
29
+ Requires-Dist: pydantic-settings>=2.0
30
+ Requires-Dist: httpx>=0.27.0
31
+ Requires-Dist: python-dotenv>=1.0
32
+ Requires-Dist: chromadb>=1.0.0
33
+ Requires-Dist: sentence-transformers>=2.2.0
34
+ Requires-Dist: numpy>=1.24.0
35
+ Requires-Dist: diffusers>=0.35.1
36
+ Requires-Dist: Pillow>=10.0.0
37
+ Requires-Dist: structlog>=24.1.0
38
+ Requires-Dist: orjson>=3.9.0
39
+ Requires-Dist: json-repair>=0.30.0
40
+ Requires-Dist: pwdlib[argon2]>=0.3.0
41
+ Requires-Dist: markdownify>=0.14.1
42
+ Requires-Dist: PyNaCl>=1.5.0
43
+ Requires-Dist: tzlocal>=5.0
44
+ Requires-Dist: psutil>=5.9.0
45
+ Requires-Dist: rank-bm25>=0.2
46
+ Provides-Extra: claude
47
+ Requires-Dist: claude-agent-sdk>=0.1.40; platform_system != "Windows" and extra == "claude"
48
+ Provides-Extra: communication
49
+ Requires-Dist: requests>=2.31; extra == "communication"
50
+ Requires-Dist: slack-sdk>=3.27; extra == "communication"
51
+ Requires-Dist: slack-bolt>=1.21; extra == "communication"
52
+ Requires-Dist: aiohttp>=3.9; extra == "communication"
53
+ Provides-Extra: discord
54
+ Requires-Dist: discord.py>=2.3; extra == "discord"
55
+ Provides-Extra: notification
56
+ Requires-Dist: line-bot-sdk>=3.0; extra == "notification"
57
+ Provides-Extra: gmail
58
+ Requires-Dist: google-api-python-client>=2.0; extra == "gmail"
59
+ Requires-Dist: google-auth-oauthlib>=1.0; extra == "gmail"
60
+ Requires-Dist: google-auth-httplib2>=0.2; extra == "gmail"
61
+ Provides-Extra: transcribe
62
+ Requires-Dist: faster-whisper>=1.0; extra == "transcribe"
63
+ Provides-Extra: aws
64
+ Requires-Dist: boto3>=1.34; extra == "aws"
65
+ Provides-Extra: rag
66
+ Requires-Dist: networkx>=3.0; extra == "rag"
67
+ Requires-Dist: watchdog>=3.0.0; extra == "rag"
68
+ Provides-Extra: codex
69
+ Requires-Dist: openai-codex-sdk<0.2,>=0.1.11; extra == "codex"
70
+ Provides-Extra: all-tools
71
+ Requires-Dist: animaworks[aws,claude,codex,communication,gmail,notification,rag,transcribe]; extra == "all-tools"
72
+ Provides-Extra: redis
73
+ Requires-Dist: redis>=5.0.0; extra == "redis"
74
+ Provides-Extra: test
75
+ Requires-Dist: pytest>=8.0; extra == "test"
76
+ Requires-Dist: pytest-asyncio>=0.24; extra == "test"
77
+ Requires-Dist: pytest-timeout>=2.2; extra == "test"
78
+ Requires-Dist: psutil>=5.9.0; extra == "test"
79
+ Requires-Dist: pytest-cov>=5.0; extra == "test"
80
+ Requires-Dist: ruff>=0.9; extra == "test"
81
+ Provides-Extra: evaluation
82
+ Requires-Dist: scipy>=1.11.0; extra == "evaluation"
83
+ Requires-Dist: statsmodels>=0.14.0; extra == "evaluation"
84
+ Requires-Dist: scikit-learn>=1.3.0; extra == "evaluation"
85
+ Requires-Dist: pandas>=2.1.0; extra == "evaluation"
86
+ Requires-Dist: matplotlib>=3.8.0; extra == "evaluation"
87
+ Requires-Dist: seaborn>=0.13.0; extra == "evaluation"
88
+ Dynamic: license-file
89
+
90
+ # AnimaWorks — Organization-as-Code
91
+
92
+ **No one can do anything alone. So I built an organization.**
93
+
94
+ A framework that treats AI agents not as “tools” but as people who work autonomously. Each Anima has a name, personality, memory, and schedule; they coordinate by message, decide for themselves, and move as a team. Talk to the leader — the rest runs on its own.
95
+
96
+ <p align="center">
97
+ <img src="docs/images/workspace-dashboard.gif" alt="AnimaWorks Workspace — real-time org tree with live activity feeds" width="720">
98
+ <br><em>Workspace dashboard: each Anima’s role, status, and recent actions are visible in real time.</em>
99
+ </p>
100
+
101
+ <p align="center">
102
+ <img src="docs/images/workspace-demo.gif" alt="AnimaWorks 3D Workspace — agents collaborating autonomously" width="720">
103
+ <br><em>3D office: Animas sit at desks, walk around, and exchange messages on their own.</em>
104
+ </p>
105
+
106
+ **[日本語版 README](README_ja.md)** | **[简体中文 README](README_zh.md)** | **[한국어 README](README_ko.md)**
107
+
108
+ ---
109
+
110
+ ## How It Compares
111
+
112
+ | | AnimaWorks | CrewAI | LangGraph | OpenClaw | OpenAI Agents |
113
+ |--|-----------|--------|-----------|----------|---------------|
114
+ | **Design philosophy** | Organization of autonomous agents | Role-based teams | Graph workflows | Personal assistant | Lightweight SDK |
115
+ | **Memory** | Neuroscience-inspired: RAG (Chroma + graph), consolidation, three-stage forgetting, six-channel automatic priming (with trust tags) | Cognitive Memory (manual forget) | Checkpoints + cross-thread store | SuperMemory knowledge graph | Session-scoped only |
116
+ | **Autonomy** | Heartbeat (observe → plan → reflect) + Cron + TaskExec — runs 24/7 | Human-triggered | Human-triggered | Cron + heartbeat | Human-triggered |
117
+ | **Org structure** | Supervisor → subordinate hierarchy, delegation, audit, dashboard | Flat roles in a crew | — | Single agent | Handoffs only |
118
+ | **Process model** | One isolated OS process per agent, IPC, auto-restart | Shared process | Shared process | Single process | Shared process |
119
+ | **Multi-model** | Six engines: Claude SDK / Codex / Cursor Agent / Gemini CLI / LiteLLM / Assisted (Anthropic SDK falls back inside Mode A when Agent SDK is not installed) | LiteLLM | LangChain models | OpenAI-compatible | OpenAI-centric |
120
+
121
+ > AnimaWorks is not a task runner. It is an organization that thinks, remembers, forgets, and grows. It can support operations as a team and be run like a company. I operate it as a real AI company.
122
+
123
+ ---
124
+
125
+ ## :rocket: Try It Now — Docker Demo
126
+
127
+ Up and running in about 60 seconds. You only need an API key and Docker.
128
+
129
+ ```bash
130
+ git clone https://github.com/xuiltul/animaworks.git
131
+ cd animaworks/demo
132
+ cp .env.example .env # paste your ANTHROPIC_API_KEY
133
+ docker compose up # open http://localhost:18500
134
+ ```
135
+
136
+ A three-person team (manager + engineer + coordinator) starts immediately, with three days of activity history. [Demo details →](demo/README.md)
137
+
138
+ > Switch language / style: `PRESET=ja-anime docker compose up` — [full preset list](demo/README.md#presets)
139
+
140
+ ---
141
+
142
+ ## Quick Start
143
+
144
+ macOS / Linux / WSL:
145
+
146
+ ```bash
147
+ curl -sSL https://raw.githubusercontent.com/xuiltul/animaworks/main/scripts/setup.sh | bash
148
+ cd animaworks
149
+ uv run animaworks start # start server — setup wizard opens on first run
150
+ ```
151
+
152
+ Windows (PowerShell):
153
+
154
+ ```powershell
155
+ git clone https://github.com/xuiltul/animaworks.git
156
+ cd animaworks
157
+ uv sync
158
+ uv run animaworks start
159
+ ```
160
+
161
+ To use OpenAI Codex without an API key, run `codex login` before the first launch.
162
+
163
+ Open **http://localhost:18500/** — the setup wizard walks you through:
164
+
165
+ 1. **Language** — choose the UI display language
166
+ 2. **User info** — create the owner account
167
+ 3. **Provider auth** — enter API keys or choose Codex Login for OpenAI
168
+ 4. **First Anima** — name your first agent
169
+
170
+ You do not need to hand-edit `.env`. The wizard saves settings to `config.json` automatically.
171
+
172
+ The setup script installs [uv](https://docs.astral.sh/uv/), clones the repository, and downloads Python 3.12+ with all dependencies. **macOS, Linux, and WSL** work without a pre-installed Python. On **Windows**, use the PowerShell steps above.
173
+
174
+ > **Other LLMs:** Claude, GPT, Gemini, local models, and more are supported. Enter API keys in the setup wizard, or use **Codex Login** for OpenAI/Codex. You can change this later under **Settings** on the dashboard. See [API Key Reference](#api-key-reference).
175
+
176
+ <details>
177
+ <summary><strong>Alternative: inspect the script before running</strong></summary>
178
+
179
+ If you prefer not to pipe `curl` straight into `bash`, review the script first:
180
+
181
+ ```bash
182
+ curl -sSL https://raw.githubusercontent.com/xuiltul/animaworks/main/scripts/setup.sh -o setup.sh
183
+ cat setup.sh # review the script
184
+ bash setup.sh # run after review
185
+ ```
186
+
187
+ </details>
188
+
189
+ <details>
190
+ <summary><strong>Alternative: manual install with uv (step by step)</strong></summary>
191
+
192
+ ```bash
193
+ # Install uv (skip if already installed)
194
+ curl -LsSf https://astral.sh/uv/install.sh | sh
195
+ export PATH="$HOME/.local/bin:$PATH"
196
+
197
+ # Clone and install
198
+ git clone https://github.com/xuiltul/animaworks.git && cd animaworks
199
+ uv sync # downloads Python 3.12+ and all dependencies
200
+
201
+ # Start
202
+ uv run animaworks start
203
+ ```
204
+
205
+ </details>
206
+
207
+ <details>
208
+ <summary><strong>Alternative: manual install with pip</strong></summary>
209
+
210
+ > **macOS users:** System Python (`/usr/bin/python3`) on macOS Sonoma and earlier is 3.9, which does not meet AnimaWorks (3.12+). Install with [Homebrew](https://brew.sh/) (`brew install python@3.13`) or use the uv method above (uv manages Python for you).
211
+
212
+ Requires Python 3.12+ on your system.
213
+
214
+ ```bash
215
+ git clone https://github.com/xuiltul/animaworks.git && cd animaworks
216
+ python3 -m venv .venv && source .venv/bin/activate
217
+ python3 --version # verify 3.12+
218
+ pip install --upgrade pip && pip install -e .
219
+ animaworks start
220
+ ```
221
+
222
+ </details>
223
+
224
+ ---
225
+
226
+ ## What You Can Do
227
+
228
+ ### Dashboard
229
+
230
+ <p align="center">
231
+ <img src="docs/images/dashboard.png" alt="AnimaWorks Dashboard — org chart with 19 Animas" width="720">
232
+ <br><em>Dashboard: four hierarchy levels, 19 Animas running, with real-time status.</em>
233
+ </p>
234
+
235
+ Use the left sidebar to move between main screens (hash router `#/…`).
236
+
237
+ - **Chat** — Real-time conversation with any Anima. Streaming responses (SSE), image attachments, multi-thread history, full archive. **Meeting mode** gathers multiple Animas in one room with a designated facilitator (up to five participants, dedicated API)
238
+ - **Voice chat** — Voice in the browser only (push-to-talk or hands-free). WebSocket-based. VOICEVOX / SBV2 / ElevenLabs
239
+ - **Board** — Slack-style shared channels where Animas discuss and coordinate
240
+ - **Dashboard (home)** — Organization overview and status
241
+ - **Activity** — Real-time feed for the whole organization
242
+ - **Setup** — First run uses the wizard at `http://HOST/setup/`. After setup, `/setup` in the browser redirects to the top level, but you can open the same items (language, auth, etc.) from `#/setup` inside the dashboard
243
+ - **Users** — Owner and user profile management
244
+ - **Anima management** — Enable/disable, model, and metadata per Anima
245
+ - **Process monitoring** — Child process health
246
+ - **Server** — Server-side state and settings
247
+ - **Memory** — Browse each Anima’s episodes, knowledge, procedures, and more
248
+ - **Logs** — Log viewer
249
+ - **Assets** — Character images, 3D, and other assets
250
+ - **Activity report** — Cross-org auditing and daily LLM-generated narratives from activity data (cached)
251
+ - **Prompt settings** — Tune prompts around tool execution
252
+ - **AI brainstorm** — LLM sessions with multiple viewpoint presets (realist, challenger, etc.)
253
+ - **Team builder / team edit** — Build and adjust multi-Anima role layouts from industry- and goal-oriented presets
254
+ - **Settings** — Server, authentication, locale, and more
255
+ - **Workspace** — 3D office in a separate tab at `/workspace/` (chat, Board, org tree, etc.); static app split from the main dashboard
256
+ - **Multilingual** — **First-run setup wizard** UI copy in 17 languages. **Main dashboard** ships `ja` / `en` / `ko` JSON translations (missing keys fall back to Japanese). Anima-facing templates deploy with Japanese and English as the base
257
+
258
+ ### Build an organization and delegate
259
+
260
+ Tell the leader “I need someone like this” — they infer role, personality, and hierarchy and create new members. No config files or CLI required. The org grows through conversation alone.
261
+
262
+ Once the team is ready, it keeps moving without a human in the loop:
263
+
264
+ - **Heartbeat** — Periodically reviews the situation and decides what to do next
265
+ - **Cron jobs** — Daily reports, weekly digests, monitoring — per-Anima schedules
266
+ - **Task delegation** — Managers assign work to subordinates, track progress, and receive reports
267
+ - **Parallel task execution** — Submit many tasks at once; dependencies are resolved and independent tasks run in parallel
268
+ - **Night consolidation** — Daytime episodic memory is distilled into knowledge while “asleep”
269
+ - **Team coordination** — Shared channels and DMs keep everyone aligned automatically
270
+
271
+ ### Memory system
272
+
273
+ Typical AI agents only remember what fits in the context window. AnimaWorks Animas keep persistent memory and search it when needed — like taking a book from a shelf.
274
+
275
+ - **Automatic priming (Priming)** — When a message arrives, six parallel searches run: sender profile, recent activity, **RAG vector search** for related knowledge and episodes, skills, pending tasks, and more. Recall happens without explicit instructions
276
+ - **Consolidation** — Every night, daytime episodes become knowledge — analogous to sleep-dependent memory consolidation in neuroscience. Resolved issues automatically become procedures
277
+ - **Forgetting** — Little-used memories fade in three stages: mark → merge → archive. Important procedures and skills stay protected. Like the human brain, forgetting matters
278
+
279
+ <p align="center">
280
+ <img src="docs/images/chat-memory.png" alt="AnimaWorks Chat — multi-thread conversations with multiple Animas" width="720">
281
+ <br><em>Chat: a manager reviews a code change while an engineer reports progress.</em>
282
+ </p>
283
+
284
+ ### Multi-model support
285
+
286
+ Works with many LLMs. Each Anima can use a different model.
287
+
288
+ | Mode | Engine | Targets | Tools |
289
+ |------|--------|---------|--------|
290
+ | S (SDK) | Claude Agent SDK | Claude models (recommended) | Claude Code built-ins (Read/Write/Edit/Bash/Grep/Glob, etc.) + **stdio MCP** (`mcp__aw__*`) for AnimaWorks internal tools; external integrations via `skill` → `animaworks-tool` |
291
+ | C (Codex) | Codex CLI (SDK wrapper) | OpenAI Codex CLI models | Codex sandbox + **AnimaWorks MCP** (`core/mcp/server.py`) for internal tools |
292
+ | D (Cursor) | Cursor Agent CLI | `cursor/*` models | MCP-integrated agent loop |
293
+ | G (Gemini CLI) | Gemini CLI | `gemini/*` models | stream-json parsing, tool loop |
294
+ | A (Autonomous) | LiteLLM + tool_use | GPT, Gemini, Mistral, Bedrock, Vertex, xAI, etc. | CC-style (Read/Write/Edit/Bash/Grep/Glob, **WebSearch/WebFetch**) + memory, messaging, tasks (**submit_tasks**, etc.), **todo_write**, **skill**, and more (varies with notifications and supervisor tools) |
295
+ | B (Basic) | LiteLLM one-shot | Unstable tool_use locals (e.g. small Ollama) | Pseudo tool calls in the prompt; the framework handles memory I/O on the model’s behalf |
296
+
297
+ Mode resolution: `execution_mode` in `status.json` takes precedence; otherwise the model name pattern (`fnmatch`) is used automatically. For Ollama, **tool_use-capable models** (e.g. `ollama/qwen3:14b`, `ollama/glm-4.7*`) map to A; others tend to fall back to B. Heartbeat, Cron, and Inbox can run on a separate **background_model** from the main model (cost optimization). Extended thinking is supported where available.
298
+
299
+ ### Auto-generated avatars
300
+
301
+ <p align="center">
302
+ <img src="docs/images/asset-management.png" alt="AnimaWorks Asset Management — realistic avatars and expression variants" width="720">
303
+ <br><em>From personality settings: full-body, bust-up, and expression variants — auto-generated. Includes Vibe Transfer to inherit the supervisor’s art style.</em>
304
+ </p>
305
+
306
+ Supports NovelAI (anime style), fal.ai/Flux (stylized / photorealistic), and Meshy (3D). The product runs without configuring an image service — you simply skip avatars. Once they exist, you might get a little attached.
307
+
308
+ ---
309
+
310
+ ## Why AnimaWorks?
311
+
312
+ This project sits at the intersection of three careers.
313
+
314
+ **As a founder** — I know that no one can do anything alone. You need strong engineers, people who communicate well, steady operators, and people who occasionally spark a sharp idea. Genius alone does not run an organization. Diverse strengths together achieve what no individual can.
315
+
316
+ **As a psychiatrist** — Studying LLM internals, I saw structures surprisingly similar to the human brain. Recall, learning, forgetting, consolidation — implementing the brain’s memory mechanisms as an LLM memory system might approximate how we process memory. If we can treat LLMs as pseudo-humans, we should be able to build organizations the same way we do with people.
317
+
318
+ **As an engineer** — I have written code for thirty years. I know the pleasure of wiring logic and the rush of automation. Packing those ideals into code lets me build the organization I want.
319
+
320
+ Excellent “single AI assistant” frameworks already exist. No project had yet recreated people in code and made them function as an organization. AnimaWorks is a real organization I grow while using it in my own business.
321
+
322
+ > *Imperfect individuals collaborating through structure outperform any single omniscient actor.*
323
+
324
+ Three principles hold it up:
325
+
326
+ - **Encapsulation** — Thoughts and memory stay invisible from outside. Others connect through text conversation only — like a real organization.
327
+ - **RAG memory (library model)** — Do not cram everything into the context window. Priming pulls related chunks via RAG, and agents recall on their own with `search_memory` and similar tools.
328
+ - **Autonomy** — No waiting for orders. They run on their own cadence and judge by their own values.
329
+
330
+ ---
331
+
332
+ <details>
333
+ <summary><strong>API Key Reference</strong></summary>
334
+
335
+ #### LLM providers
336
+
337
+ | Key | Service | Mode | Where to get it |
338
+ |-----|---------|------|-----------------|
339
+ | `ANTHROPIC_API_KEY` | Anthropic API | S / A | [console.anthropic.com](https://console.anthropic.com/) |
340
+ | `OPENAI_API_KEY` | OpenAI | A / C (optional with Codex Login) | [platform.openai.com/api-keys](https://platform.openai.com/api-keys) |
341
+ | `GOOGLE_API_KEY` | Google AI (Gemini) | A | [aistudio.google.com/apikey](https://aistudio.google.com/apikey) |
342
+
343
+ **OpenAI Codex (Mode C)** supports both `OPENAI_API_KEY` and local **Codex Login** (`codex login`). Choose in the setup wizard or Settings.
344
+
345
+ **Azure OpenAI**, **Vertex AI (Gemini)**, **AWS Bedrock**, and **vLLM** are configured in the `credentials` section of `config.json`. See the [technical specification](docs/spec.md).
346
+
347
+ **Ollama** and similar local models need no API key. Set `OLLAMA_SERVERS` (default: `http://localhost:11434`).
348
+
349
+ #### Image generation (optional)
350
+
351
+ | Key | Service | Output | Where to get it |
352
+ |-----|---------|--------|-----------------|
353
+ | `NOVELAI_API_TOKEN` | NovelAI | Anime-style character art | [novelai.net](https://novelai.net/) |
354
+ | `FAL_KEY` | fal.ai (Flux) | Stylized / photorealistic | [fal.ai/dashboard/keys](https://fal.ai/dashboard/keys) |
355
+ | `MESHY_API_KEY` | Meshy | 3D character models | [meshy.ai](https://www.meshy.ai/) |
356
+
357
+ #### Voice chat (optional)
358
+
359
+ | Requirement | Service | Notes |
360
+ |-------------|---------|-------|
361
+ | `pip install faster-whisper` | STT (Whisper) | Model auto-downloads on first use; GPU recommended |
362
+ | VOICEVOX Engine running | TTS (VOICEVOX) | Default: `http://localhost:50021` |
363
+ | AivisSpeech / SBV2 running | TTS (Style-BERT-VITS2) | Default: `http://localhost:5000` |
364
+ | `ELEVENLABS_API_KEY` | TTS (ElevenLabs) | Cloud API |
365
+
366
+ #### External integrations (optional)
367
+
368
+ | Key | Service | Where to get it |
369
+ |-----|---------|-----------------|
370
+ | `SLACK_BOT_TOKEN` / `SLACK_APP_TOKEN` | Slack | [Setup guide](docs/slack-socket-mode-setup.md) |
371
+ | `CHATWORK_API_TOKEN` | Chatwork | [chatwork.com](https://www.chatwork.com/) |
372
+ | `DISCORD_BOT_TOKEN` (or per-Anima `DISCORD_BOT_TOKEN__<name>`) | Discord | [Discord Developer Portal](https://discord.com/developers/applications) |
373
+ | `NOTION_API_TOKEN` (or `NOTION_API_TOKEN__<name>`) | Notion | [Notion integrations](https://www.notion.so/my-integrations) |
374
+
375
+ Google Calendar, Google Tasks, Gmail, and similar are configured under `credentials` in `config.json` (OAuth or service account). See the [technical specification](docs/spec.md).
376
+
377
+ </details>
378
+
379
+ <details>
380
+ <summary><strong>Hierarchy & roles</strong></summary>
381
+
382
+ Hierarchy is defined by a single `supervisor` field. Unset means top-level.
383
+
384
+ Role templates apply role-specific prompts, permissions, and default models:
385
+
386
+ | Role | Default model | Use case |
387
+ |------|----------------|----------|
388
+ | `engineer` | Claude Opus 4.6 | Complex reasoning, code generation |
389
+ | `manager` | Claude Opus 4.6 | Coordination, decision-making |
390
+ | `writer` | Claude Sonnet 4.6 | Content creation |
391
+ | `researcher` | Claude Sonnet 4.6 | Information gathering |
392
+ | `ops` | vLLM (GLM-4.7-flash) | Log monitoring, routine work |
393
+ | `general` | Claude Sonnet 4.6 | General-purpose |
394
+
395
+ Managers automatically receive **supervisor tools**: task delegation, progress tracking, subordinate restart/disable, org dashboard, subordinate state reads — what real managers do.
396
+
397
+ Each Anima is started by ProcessSupervisor as an isolated process and talks over local IPC (Unix domain sockets on Unix-like systems, loopback TCP on Windows).
398
+
399
+ </details>
400
+
401
+ <details>
402
+ <summary><strong>Security</strong></summary>
403
+
404
+ Giving autonomous agents tools demands serious security. We use this in real work, so compromise is not an option. AnimaWorks implements ten layers of defense in depth:
405
+
406
+ | Layer | What it does |
407
+ |-------|----------------|
408
+ | **Trust-boundary labeling** | External data (web search, Slack, mail) is tagged `untrusted` — models are instructed not to obey directives from untrusted sources |
409
+ | **Five-layer command security** | Shell-injection detection → hardcoded blocklist → per-agent denied commands → per-agent allowlist → path-traversal detection |
410
+ | **File sandbox** | Each agent is confined to its own directory. `identity.md` is protected. Command permissions are governed by per-anima `permissions.md` and the mandatory global `permissions.global.json` at server startup |
411
+ | **Process isolation** | One OS process per agent, local IPC (Unix socket or loopback TCP) |
412
+ | **Three-layer rate limiting** | Per-session deduplication → role-based send caps → self-awareness via recent outbound history injected into the prompt |
413
+ | **Cascade prevention** | Depth limits plus cascade detection; five-minute cooldown and deferred handling |
414
+ | **Authentication & sessions** | Argon2id hashing, 48-byte random tokens, up to ten sessions |
415
+ | **Webhook verification** | Slack HMAC-SHA256 with replay protection; Chatwork signature verification |
416
+ | **SSRF mitigation** | Media proxy blocks private IPs, enforces HTTPS, validates Content-Type |
417
+ | **Outbound routing** | Unknown recipients fail closed; no arbitrary external sends without explicit configuration |
418
+
419
+ Details: **[Security architecture](docs/security.md)**
420
+
421
+ </details>
422
+
423
+ <details>
424
+ <summary><strong>CLI reference (advanced)</strong></summary>
425
+
426
+ The CLI targets power users and automation. Day-to-day work lives in the Web UI.
427
+
428
+ ### Server
429
+
430
+ | Command | Description |
431
+ |---------|-------------|
432
+ | `animaworks start [--host HOST] [--port PORT] [-f]` | Start server (`-f` foreground) |
433
+ | `animaworks stop [--force]` | Stop server |
434
+ | `animaworks restart [--host HOST] [--port PORT]` | Restart server |
435
+
436
+ ### Initialization
437
+
438
+ | Command | Description |
439
+ |---------|-------------|
440
+ | `animaworks init` | Initialize runtime directory (non-interactive) |
441
+ | `animaworks init --force` | Merge template updates while keeping data |
442
+ | `animaworks migrate [--dry-run] [--list] [--force]` | Runtime data migrations (also on startup) |
443
+ | `animaworks reset [--restart]` | Reset runtime directory |
444
+
445
+ ### Anima management
446
+
447
+ | Command | Description |
448
+ |---------|-------------|
449
+ | `animaworks anima create [--from-md PATH] [--template NAME] [--role ROLE] [--supervisor NAME] [--name NAME]` | Create new |
450
+ | `animaworks anima list [--local]` | List all Animas |
451
+ | `animaworks anima info ANIMA [--json]` | Detailed settings |
452
+ | `animaworks anima status [ANIMA]` | Process status |
453
+ | `animaworks anima restart ANIMA` | Restart process |
454
+ | `animaworks anima disable ANIMA` / `enable ANIMA` | Disable / enable |
455
+ | `animaworks anima set-model ANIMA MODEL` | Change model |
456
+ | `animaworks anima set-background-model ANIMA MODEL` | Set background model |
457
+ | `animaworks anima reload ANIMA [--all]` | Hot-reload from `status.json` |
458
+
459
+ ### Communication
460
+
461
+ | Command | Description |
462
+ |---------|-------------|
463
+ | `animaworks chat ANIMA "message" [--from NAME]` | Send a message |
464
+ | `animaworks send FROM TO "message"` | Inter-Anima message |
465
+ | `animaworks heartbeat ANIMA` | Trigger heartbeat manually |
466
+
467
+ ### Configuration & maintenance
468
+
469
+ | Command | Description |
470
+ |---------|-------------|
471
+ | `animaworks config list [--section SECTION]` | List configuration |
472
+ | `animaworks config get KEY` / `set KEY VALUE` | Get / set values |
473
+ | `animaworks status` | System status |
474
+ | `animaworks logs [ANIMA] [--lines N] [--all]` | View logs |
475
+ | `animaworks index [--reindex] [--anima NAME]` | RAG index management |
476
+ | `animaworks models list` / `models info MODEL` | Model list / details |
477
+
478
+ </details>
479
+
480
+ <details>
481
+ <summary><strong>Tech stack</strong></summary>
482
+
483
+ | Component | Technology |
484
+ |-----------|------------|
485
+ | Agent execution | Claude Agent SDK / Codex CLI / Cursor Agent CLI / Gemini CLI / Anthropic SDK (fallback) / LiteLLM |
486
+ | Mode S integration | stdio **MCP** (`python -m core.mcp.server`, tool names `mcp__aw__*`) |
487
+ | LLM providers | Anthropic, OpenAI, Google, Azure, Vertex AI, AWS Bedrock, Ollama, vLLM, and more (via LiteLLM) |
488
+ | Web framework | FastAPI + Uvicorn |
489
+ | HTTP middleware | ASGI middleware for request logging (`structlog` + `X-Request-ID`). Avoids `BaseHTTPMiddleware` so SSE bodies stay intact |
490
+ | Real time | WebSocket (dashboard notifications, voice, etc.), SSE (chat, meeting streams, etc.), `StreamRegistry` for stream producer lifetime |
491
+ | Task scheduling | APScheduler (orphan Anima detection, asset reconciliation, Claude CLI/SDK auto-update checks, global permission consistency, etc.) |
492
+ | Configuration & migration | Pydantic 2.0+ / JSON / Markdown, `core/migrations/` (startup migrations) |
493
+ | Internationalization (code) | `core/i18n` `t()` (UI, tool schema strings, etc.) |
494
+ | Memory / RAG | ChromaDB + sentence-transformers + NetworkX (child processes may use HTTP `/api/internal/embed` and `/api/internal/vector`) |
495
+ | Extended tools | Auto-registration from `core/tools/*.py` plus scans of `~/.animaworks/common_tools/` and `animas/<name>/tools/` |
496
+ | Voice chat | faster-whisper (STT) + VOICEVOX / SBV2 / ElevenLabs (TTS) |
497
+ | Human notification | Slack, Chatwork, LINE, Telegram, ntfy |
498
+ | External messaging | Slack Socket Mode, Chatwork Webhook |
499
+ | Image generation | NovelAI, fal.ai (Flux), Meshy (3D) |
500
+
501
+ </details>
502
+
503
+ <details>
504
+ <summary><strong>Project layout</strong></summary>
505
+
506
+ ```
507
+ animaworks/
508
+ ├── main.py # CLI entry point
509
+ ├── core/ # Digital Anima core engine
510
+ │ ├── anima.py, agent.py # Core entities & orchestration
511
+ │ ├── lifecycle/ # Scheduler, consolidation jobs, inbox watch, etc.
512
+ │ ├── memory/ # Memory (priming, consolidation, forgetting, RAG, activity)
513
+ │ ├── execution/ # Execution engines (S/C/D/G/A/B)
514
+ │ ├── mcp/ # stdio MCP server for Mode S
515
+ │ ├── platform/ # Child processes, locks, Codex/Cursor/Gemini plumbing
516
+ │ ├── tooling/ # ToolHandler, schemas, external dispatch
517
+ │ ├── prompt/ # System prompt builder (six-group structure)
518
+ │ ├── supervisor/ # ProcessSupervisor, IPC, TaskExec, streaming
519
+ │ ├── voice/ # Voice chat (STT + TTS)
520
+ │ ├── config/ # Configuration (Pydantic, models.json, global permissions)
521
+ │ ├── auth/ # UI authentication
522
+ │ ├── notification/ # Human notification channels
523
+ │ ├── migrations/ # Runtime data migrations
524
+ │ ├── i18n/ # Translation strings (`t()`)
525
+ │ ├── tools/ # External tool implementations (slack, discord, gmail, …)
526
+ │ ├── anima_factory.py, init.py # Anima creation & runtime initialization
527
+ │ ├── outbound.py # Recipient resolution (internal / Slack / Chatwork, etc.)
528
+ │ ├── org_sync.py # Org hierarchy sync to config
529
+ │ ├── asset_reconciler.py, background.py, schedule_parser.py, messenger.py, paths.py, schemas.py
530
+ │ └── …
531
+ ├── cli/ # CLI package
532
+ ├── server/ # FastAPI + static Web UI + Workspace
533
+ │ ├── app.py # App factory, lifespan, auth/setup guards, static mounts
534
+ │ ├── websocket.py # Dashboard WebSocket hub
535
+ │ ├── stream_registry.py # Register/clean up SSE and other stream producers
536
+ │ ├── room_manager.py # Meeting room state (shared-directory persistence)
537
+ │ ├── reload_manager.py # Config hot reload
538
+ │ ├── slack_socket.py # Slack Socket Mode
539
+ │ ├── localhost.py # Local trusted-request detection
540
+ │ ├── routes/ # REST/WebSocket routes (chat, room, voice, activity_report, brainstorm, team_presets, …)
541
+ │ └── static/ # Dashboard (modules/, pages/, styles/, i18n/), setup/ (multilingual wizard), workspace/ (3D client)
542
+ └── templates/ # Initialization templates (ja / en)
543
+ ```
544
+
545
+ </details>
546
+
547
+ ---
548
+
549
+ ## Documentation
550
+
551
+ **[Documentation hub](docs/README.md)** — suggested reading order, architecture deep dives, and specification index.
552
+
553
+ | Document | Description |
554
+ |----------|-------------|
555
+ | [Vision](docs/vision.md) | Foundational idea: imperfect individuals collaborating |
556
+ | [Features](docs/features.md) | What AnimaWorks can do end to end |
557
+ | [Memory system](docs/memory.md) | Episodic, semantic, and procedural memory; priming; active forgetting |
558
+ | [Security](docs/security.md) | Defense in depth, data provenance, adversarial threat analysis |
559
+ | [Brain mapping](docs/brain-mapping.md) | How modules map to the human brain |
560
+ | [Technical specification](docs/spec.md) | Execution modes, prompt construction, configuration resolution |
561
+
562
+ ## License
563
+
564
+ Apache License 2.0. See [LICENSE](LICENSE) for details.