synth-ai 0.2.0__tar.gz → 0.2.1.dev0__tar.gz

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 (282) hide show
  1. synth_ai-0.2.1.dev0/PKG-INFO +349 -0
  2. synth_ai-0.2.1.dev0/README.md +262 -0
  3. synth_ai-0.2.1.dev0/pyproject.toml +153 -0
  4. synth_ai-0.2.1.dev0/synth_ai/__init__.py +34 -0
  5. synth_ai-0.2.1.dev0/synth_ai/core/system.py +4 -0
  6. synth_ai-0.2.1.dev0/synth_ai/environments/__init__.py +35 -0
  7. synth_ai-0.2.1.dev0/synth_ai/environments/environment/__init__.py +1 -0
  8. synth_ai-0.2.1.dev0/synth_ai/environments/environment/artifacts/__init__.py +1 -0
  9. synth_ai-0.2.1.dev0/synth_ai/environments/environment/artifacts/base.py +50 -0
  10. synth_ai-0.2.1.dev0/synth_ai/environments/environment/core.py +22 -0
  11. synth_ai-0.2.1.dev0/synth_ai/environments/environment/db/__init__.py +1 -0
  12. synth_ai-0.2.1.dev0/synth_ai/environments/environment/db/sqlite.py +45 -0
  13. synth_ai-0.2.1.dev0/synth_ai/environments/environment/registry.py +24 -0
  14. synth_ai-0.2.1.dev0/synth_ai/environments/environment/resources/sqlite.py +46 -0
  15. synth_ai-0.2.1.dev0/synth_ai/environments/environment/results.py +1 -0
  16. synth_ai-0.2.1.dev0/synth_ai/environments/environment/rewards/__init__.py +1 -0
  17. synth_ai-0.2.1.dev0/synth_ai/environments/environment/rewards/core.py +28 -0
  18. synth_ai-0.2.1.dev0/synth_ai/environments/environment/shared_engine.py +26 -0
  19. synth_ai-0.2.1.dev0/synth_ai/environments/environment/tools/__init__.py +34 -0
  20. synth_ai-0.2.1.dev0/synth_ai/environments/examples/__init__.py +1 -0
  21. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/__init__.py +8 -0
  22. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/agent_demos/crafter_comprehensive_evaluation.py +58 -0
  23. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/agent_demos/crafter_evaluation_browser.py +152 -0
  24. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/agent_demos/crafter_evaluation_framework.py +1194 -0
  25. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/agent_demos/crafter_quick_evaluation.py +51 -0
  26. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/agent_demos/crafter_react_agent.py +872 -0
  27. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/agent_demos/crafter_trace_evaluation.py +1412 -0
  28. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/agent_demos/test_crafter_react_agent.py +1110 -0
  29. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/config_logging.py +111 -0
  30. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/engine.py +502 -0
  31. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/engine_deterministic_patch.py +63 -0
  32. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/engine_helpers/action_map.py +5 -0
  33. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/engine_helpers/serialization.py +74 -0
  34. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/environment.py +255 -0
  35. synth_ai-0.2.1.dev0/synth_ai/environments/examples/crafter_classic/taskset.py +228 -0
  36. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/agent_demos/test_synth_react.py +535 -0
  37. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/art_helpers/email_search_tools.py +156 -0
  38. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/art_helpers/local_email_db.py +280 -0
  39. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/art_helpers/types_enron.py +24 -0
  40. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/engine.py +291 -0
  41. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/environment.py +165 -0
  42. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/taskset.py +112 -0
  43. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/units/keyword_stats.py +111 -0
  44. synth_ai-0.2.1.dev0/synth_ai/environments/examples/enron/units/test_email_index.py +8 -0
  45. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/__init__.py +48 -0
  46. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/agent_demos/minigrid_evaluation_framework.py +1188 -0
  47. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/agent_demos/minigrid_quick_evaluation.py +47 -0
  48. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/agent_demos/minigrid_react_agent.py +562 -0
  49. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/agent_demos/minigrid_trace_evaluation.py +220 -0
  50. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/agent_demos/test_minigrid_react_agent.py +393 -0
  51. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/engine.py +589 -0
  52. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/environment.py +274 -0
  53. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/environment_mapping.py +242 -0
  54. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/puzzle_loader.py +416 -0
  55. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/taskset.py +583 -0
  56. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/units/test_action_behavior.py +226 -0
  57. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/units/test_debug_messages.py +83 -0
  58. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/units/test_exploration.py +120 -0
  59. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/units/test_minigrid_engine.py +214 -0
  60. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/units/test_minigrid_environment.py +238 -0
  61. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/units/test_minigrid_environment_mapping.py +301 -0
  62. synth_ai-0.2.1.dev0/synth_ai/environments/examples/minigrid/units/test_minigrid_taskset.py +210 -0
  63. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/__init__.py +7 -0
  64. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/achievements.py +337 -0
  65. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/agent_demos/nethack_evaluation_framework.py +981 -0
  66. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/agent_demos/nethack_quick_evaluation.py +74 -0
  67. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/agent_demos/nethack_react_agent.py +832 -0
  68. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/agent_demos/test_nethack_react_agent.py +1112 -0
  69. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/engine.py +738 -0
  70. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/environment.py +255 -0
  71. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/helpers/__init__.py +42 -0
  72. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/helpers/action_mapping.py +301 -0
  73. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/helpers/nle_wrapper.py +401 -0
  74. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/helpers/observation_utils.py +433 -0
  75. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/helpers/recording_wrapper.py +201 -0
  76. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/helpers/trajectory_recorder.py +268 -0
  77. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/helpers/visualization/replay_viewer.py +308 -0
  78. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/helpers/visualization/visualizer.py +430 -0
  79. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/taskset.py +323 -0
  80. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/units/test_nethack_engine.py +277 -0
  81. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/units/test_nethack_environment.py +281 -0
  82. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/units/test_nethack_taskset.py +213 -0
  83. synth_ai-0.2.1.dev0/synth_ai/environments/examples/nethack/units/test_recording.py +307 -0
  84. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/__init__.py +7 -0
  85. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/agent_demos/__init__.py +1 -0
  86. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/agent_demos/test_synth_react.py +1471 -0
  87. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/config_logging.py +110 -0
  88. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine.py +693 -0
  89. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/__init__.py +1 -0
  90. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/memory_map.py +28 -0
  91. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_components.py +275 -0
  92. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/__init__.py +142 -0
  93. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/adaptive_rewards.py +56 -0
  94. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/battle_rewards.py +283 -0
  95. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/composite_rewards.py +149 -0
  96. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/economy_rewards.py +137 -0
  97. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/efficiency_rewards.py +56 -0
  98. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/exploration_rewards.py +330 -0
  99. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/novelty_rewards.py +120 -0
  100. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/pallet_town_rewards.py +558 -0
  101. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/pokemon_rewards.py +312 -0
  102. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/social_rewards.py +147 -0
  103. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/reward_library/story_rewards.py +246 -0
  104. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/screen_analysis.py +367 -0
  105. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/engine_helpers/state_extraction.py +139 -0
  106. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/environment.py +235 -0
  107. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/taskset.py +77 -0
  108. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/test_fixes.py +125 -0
  109. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/test_fixes_mock.py +148 -0
  110. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/__init__.py +1 -0
  111. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_basic_functionality.py +97 -0
  112. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_button_press_requirements.py +217 -0
  113. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_engine.py +192 -0
  114. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_environment.py +455 -0
  115. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_exploration_strategy.py +227 -0
  116. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_integration.py +217 -0
  117. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_memory_extraction.py +111 -0
  118. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_menu_bug_reproduction.py +1100 -0
  119. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_movement_debug.py +255 -0
  120. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_pokemon_mcts_debug.py +163 -0
  121. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_pokemon_mcts_verbose.py +117 -0
  122. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_red_basic.py +145 -0
  123. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_red_comprehensive.py +323 -0
  124. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_retry_movement.py +195 -0
  125. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_reward_components.py +186 -0
  126. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_rom_integration.py +260 -0
  127. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_taskset.py +116 -0
  128. synth_ai-0.2.1.dev0/synth_ai/environments/examples/red/units/test_tree.py +448 -0
  129. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/__init__.py +1 -0
  130. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/agent_demos/sokoban_full_eval.py +900 -0
  131. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/agent_demos/test_dspy_react.py +1 -0
  132. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/agent_demos/test_sokoban_react_agent.py +498 -0
  133. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/agent_demos/test_synth_lats.py +1 -0
  134. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/agent_demos/test_synth_react_locally.py +748 -0
  135. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/agent_demos/test_synth_react_service.py +296 -0
  136. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine.py +675 -0
  137. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/__init__.py +1 -0
  138. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/room_utils.py +656 -0
  139. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/__init__.py +17 -0
  140. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/__init__.py +3 -0
  141. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/boxoban_env.py +129 -0
  142. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/render_utils.py +370 -0
  143. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/room_utils.py +331 -0
  144. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/sokoban_env.py +305 -0
  145. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/sokoban_env_fixed_targets.py +66 -0
  146. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/sokoban_env_pull.py +114 -0
  147. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/sokoban_env_two_player.py +122 -0
  148. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/engine_helpers/vendored/envs/sokoban_env_variations.py +394 -0
  149. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/environment.py +228 -0
  150. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/generate_verified_puzzles.py +438 -0
  151. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/puzzle_loader.py +311 -0
  152. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/taskset.py +425 -0
  153. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/units/astar_common.py +94 -0
  154. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/units/test_building_task_set.py +49 -0
  155. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/units/test_false_positive.py +120 -0
  156. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/units/test_simple_run_through_environment.py +119 -0
  157. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/units/test_sokoban_environment.py +98 -0
  158. synth_ai-0.2.1.dev0/synth_ai/environments/examples/sokoban/units/test_tree.py +364 -0
  159. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/__init__.py +1 -0
  160. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/agent_demos/test_synth_react.py +266 -0
  161. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/agent_demos/test_tictactoe_react_agent.py +470 -0
  162. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/engine.py +368 -0
  163. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/environment.py +239 -0
  164. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/taskset.py +214 -0
  165. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/units/test_tictactoe_engine.py +393 -0
  166. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/units/test_tictactoe_environment.py +493 -0
  167. synth_ai-0.2.1.dev0/synth_ai/environments/examples/tictactoe/units/test_tictactoe_taskset.py +191 -0
  168. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/__init__.py +10 -0
  169. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/agent_demos/test_synth_react.py +520 -0
  170. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/engine.py +328 -0
  171. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/environment.py +349 -0
  172. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/taskset.py +418 -0
  173. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/units/test_verilog_engine.py +466 -0
  174. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/units/test_verilog_environment.py +585 -0
  175. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/units/test_verilog_integration.py +383 -0
  176. synth_ai-0.2.1.dev0/synth_ai/environments/examples/verilog/units/test_verilog_taskset.py +457 -0
  177. synth_ai-0.2.1.dev0/synth_ai/environments/reproducibility/core.py +42 -0
  178. synth_ai-0.2.1.dev0/synth_ai/environments/reproducibility/tree.py +364 -0
  179. synth_ai-0.2.1.dev0/synth_ai/environments/service/app.py +78 -0
  180. synth_ai-0.2.1.dev0/synth_ai/environments/service/core_routes.py +775 -0
  181. synth_ai-0.2.1.dev0/synth_ai/environments/service/external_registry.py +57 -0
  182. synth_ai-0.2.1.dev0/synth_ai/environments/service/registry.py +9 -0
  183. synth_ai-0.2.1.dev0/synth_ai/environments/stateful/__init__.py +1 -0
  184. synth_ai-0.2.1.dev0/synth_ai/environments/stateful/core.py +28 -0
  185. synth_ai-0.2.1.dev0/synth_ai/environments/stateful/engine.py +21 -0
  186. synth_ai-0.2.1.dev0/synth_ai/environments/stateful/state.py +7 -0
  187. synth_ai-0.2.1.dev0/synth_ai/environments/tasks/api.py +19 -0
  188. synth_ai-0.2.1.dev0/synth_ai/environments/tasks/core.py +78 -0
  189. synth_ai-0.2.1.dev0/synth_ai/environments/tasks/filters.py +39 -0
  190. synth_ai-0.2.1.dev0/synth_ai/environments/tasks/utils.py +89 -0
  191. synth_ai-0.2.1.dev0/synth_ai/environments/v0_observability/history.py +3 -0
  192. synth_ai-0.2.1.dev0/synth_ai/environments/v0_observability/log.py +2 -0
  193. synth_ai-0.2.1.dev0/synth_ai/lm/caching/constants.py +1 -0
  194. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/caching/ephemeral.py +4 -8
  195. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/caching/handler.py +15 -15
  196. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/caching/initialize.py +2 -4
  197. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/caching/persistent.py +4 -10
  198. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/config.py +2 -1
  199. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/constants.py +2 -2
  200. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/core/all.py +10 -10
  201. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/core/main.py +57 -33
  202. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/core/vendor_clients.py +12 -10
  203. synth_ai-0.2.1.dev0/synth_ai/lm/cost/monitor.py +1 -0
  204. synth_ai-0.2.1.dev0/synth_ai/lm/cost/statefulness.py +1 -0
  205. synth_ai-0.2.1.dev0/synth_ai/lm/provider_support/__init__.py +8 -0
  206. synth_ai-0.2.1.dev0/synth_ai/lm/provider_support/anthropic.py +945 -0
  207. synth_ai-0.2.1.dev0/synth_ai/lm/provider_support/openai.py +1115 -0
  208. synth_ai-0.2.1.dev0/synth_ai/lm/provider_support/suppress_logging.py +31 -0
  209. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/structured_outputs/handler.py +58 -80
  210. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/structured_outputs/inject.py +6 -20
  211. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/structured_outputs/rehabilitate.py +6 -12
  212. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/core/anthropic_api.py +21 -30
  213. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/core/gemini_api.py +35 -32
  214. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/core/mistral_api.py +19 -28
  215. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/core/openai_api.py +26 -36
  216. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/openai_standard.py +29 -33
  217. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/retries.py +1 -1
  218. synth_ai-0.2.1.dev0/synth_ai/lm/vendors/supported/__init__.py +0 -0
  219. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/supported/custom_endpoint.py +131 -118
  220. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/supported/deepseek.py +4 -8
  221. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/supported/grok.py +6 -8
  222. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/supported/groq.py +1 -1
  223. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/supported/ollama.py +2 -2
  224. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/supported/openrouter.py +18 -16
  225. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/supported/together.py +1 -1
  226. synth_ai-0.2.1.dev0/synth_ai/tracing/__init__.py +0 -0
  227. synth_ai-0.2.1.dev0/synth_ai/tracing/abstractions.py +224 -0
  228. synth_ai-0.2.1.dev0/synth_ai/tracing/base_client.py +91 -0
  229. synth_ai-0.2.1.dev0/synth_ai/tracing/client_manager.py +131 -0
  230. synth_ai-0.2.1.dev0/synth_ai/tracing/config.py +140 -0
  231. synth_ai-0.2.1.dev0/synth_ai/tracing/context.py +146 -0
  232. synth_ai-0.2.1.dev0/synth_ai/tracing/decorators.py +679 -0
  233. synth_ai-0.2.1.dev0/synth_ai/tracing/events/__init__.py +0 -0
  234. synth_ai-0.2.1.dev0/synth_ai/tracing/events/manage.py +147 -0
  235. synth_ai-0.2.1.dev0/synth_ai/tracing/events/scope.py +86 -0
  236. synth_ai-0.2.1.dev0/synth_ai/tracing/events/store.py +227 -0
  237. synth_ai-0.2.1.dev0/synth_ai/tracing/immediate_client.py +152 -0
  238. synth_ai-0.2.1.dev0/synth_ai/tracing/local.py +18 -0
  239. synth_ai-0.2.1.dev0/synth_ai/tracing/log_client_base.py +74 -0
  240. synth_ai-0.2.1.dev0/synth_ai/tracing/retry_queue.py +187 -0
  241. synth_ai-0.2.1.dev0/synth_ai/tracing/trackers.py +515 -0
  242. synth_ai-0.2.1.dev0/synth_ai/tracing/upload.py +504 -0
  243. synth_ai-0.2.1.dev0/synth_ai/tracing/utils.py +9 -0
  244. synth_ai-0.2.1.dev0/synth_ai/zyk/__init__.py +29 -0
  245. synth_ai-0.2.1.dev0/synth_ai.egg-info/PKG-INFO +349 -0
  246. synth_ai-0.2.1.dev0/synth_ai.egg-info/SOURCES.txt +268 -0
  247. synth_ai-0.2.1.dev0/synth_ai.egg-info/requires.txt +78 -0
  248. {synth_ai-0.2.0 → synth_ai-0.2.1.dev0}/tests/test_agent.py +13 -17
  249. {synth_ai-0.2.0 → synth_ai-0.2.1.dev0}/tests/test_provider_override.py +27 -27
  250. {synth_ai-0.2.0 → synth_ai-0.2.1.dev0}/tests/test_recursive_structured_outputs.py +30 -30
  251. {synth_ai-0.2.0 → synth_ai-0.2.1.dev0}/tests/test_structured_outputs.py +18 -26
  252. synth_ai-0.2.0/PKG-INFO +0 -36
  253. synth_ai-0.2.0/README.md +0 -11
  254. synth_ai-0.2.0/setup.py +0 -24
  255. synth_ai-0.2.0/synth_ai/__init__.py +0 -8
  256. synth_ai-0.2.0/synth_ai/zyk/__init__.py +0 -3
  257. synth_ai-0.2.0/synth_ai/zyk/lms/caching/constants.py +0 -1
  258. synth_ai-0.2.0/synth_ai/zyk/lms/cost/monitor.py +0 -1
  259. synth_ai-0.2.0/synth_ai/zyk/lms/cost/statefulness.py +0 -1
  260. synth_ai-0.2.0/synth_ai.egg-info/PKG-INFO +0 -36
  261. synth_ai-0.2.0/synth_ai.egg-info/SOURCES.txt +0 -58
  262. synth_ai-0.2.0/synth_ai.egg-info/requires.txt +0 -8
  263. synth_ai-0.2.0/tests/test_modal_qwen_hello.py +0 -32
  264. {synth_ai-0.2.0 → synth_ai-0.2.1.dev0}/LICENSE +0 -0
  265. {synth_ai-0.2.0 → synth_ai-0.2.1.dev0}/setup.cfg +0 -0
  266. /synth_ai-0.2.0/synth_ai/zyk/lms/__init__.py → /synth_ai-0.2.1.dev0/synth_ai/environments/reproducibility/helpers.py +0 -0
  267. {synth_ai-0.2.0/synth_ai/zyk/lms/caching → synth_ai-0.2.1.dev0/synth_ai/lm}/__init__.py +0 -0
  268. {synth_ai-0.2.0/synth_ai/zyk/lms/core → synth_ai-0.2.1.dev0/synth_ai/lm/caching}/__init__.py +0 -0
  269. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/caching/dbs.py +0 -0
  270. {synth_ai-0.2.0/synth_ai/zyk/lms/cost → synth_ai-0.2.1.dev0/synth_ai/lm/core}/__init__.py +0 -0
  271. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/core/exceptions.py +0 -0
  272. {synth_ai-0.2.0/synth_ai/zyk/lms/structured_outputs → synth_ai-0.2.1.dev0/synth_ai/lm/cost}/__init__.py +0 -0
  273. {synth_ai-0.2.0/synth_ai/zyk/lms/vendors → synth_ai-0.2.1.dev0/synth_ai/lm/structured_outputs}/__init__.py +0 -0
  274. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/tools/__init__.py +0 -0
  275. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/tools/base.py +0 -0
  276. {synth_ai-0.2.0/synth_ai/zyk/lms/vendors/core → synth_ai-0.2.1.dev0/synth_ai/lm/vendors}/__init__.py +0 -0
  277. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/base.py +0 -0
  278. {synth_ai-0.2.0/synth_ai/zyk/lms/vendors/local → synth_ai-0.2.1.dev0/synth_ai/lm/vendors/core}/__init__.py +0 -0
  279. {synth_ai-0.2.0/synth_ai/zyk/lms/vendors/supported → synth_ai-0.2.1.dev0/synth_ai/lm/vendors/local}/__init__.py +0 -0
  280. {synth_ai-0.2.0/synth_ai/zyk/lms → synth_ai-0.2.1.dev0/synth_ai/lm}/vendors/local/ollama.py +0 -0
  281. {synth_ai-0.2.0 → synth_ai-0.2.1.dev0}/synth_ai.egg-info/dependency_links.txt +0 -0
  282. {synth_ai-0.2.0 → synth_ai-0.2.1.dev0}/synth_ai.egg-info/top_level.txt +0 -0
@@ -0,0 +1,349 @@
1
+ Metadata-Version: 2.4
2
+ Name: synth-ai
3
+ Version: 0.2.1.dev0
4
+ Summary: Software for aiding the best and multiplying the will - Core AI functionality and tracing
5
+ Author-email: Synth AI <josh@usesynth.ai>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/synth-laboratories/synth-ai
8
+ Project-URL: Repository, https://github.com/synth-laboratories/synth-ai
9
+ Project-URL: Issues, https://github.com/synth-laboratories/synth-ai/issues
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: pydantic>=2.0.0
14
+ Requires-Dist: pydantic-openapi-schema>=1.5.1
15
+ Requires-Dist: python-dotenv>=1.0.1
16
+ Requires-Dist: requests>=2.32.3
17
+ Requires-Dist: urllib3>=2.3.0
18
+ Requires-Dist: tqdm>=4.66.4
19
+ Requires-Dist: typing-inspect>=0.9.0
20
+ Requires-Dist: jsonschema>=4.23.0
21
+ Requires-Dist: openai==1.63.0
22
+ Requires-Dist: anthropic>=0.42.0
23
+ Requires-Dist: google-generativeai>=0.8.0
24
+ Requires-Dist: langfuse<3.0.0,>=2.53.9
25
+ Requires-Dist: opentelemetry-api>=1.27.0
26
+ Requires-Dist: opentelemetry-sdk>=1.27.0
27
+ Requires-Dist: boto3>=1.35.71
28
+ Requires-Dist: botocore>=1.35.71
29
+ Requires-Dist: diskcache>=5.6.3
30
+ Requires-Dist: groq>=0.30.0
31
+ Requires-Dist: google-genai>=1.26.0
32
+ Requires-Dist: together>=1.5.21
33
+ Requires-Dist: mistralai>=1.9.2
34
+ Requires-Dist: fastapi>=0.115.12
35
+ Requires-Dist: uvicorn>=0.34.2
36
+ Requires-Dist: numpy>=2.2.3
37
+ Requires-Dist: networkx>=3.4.2
38
+ Requires-Dist: redis>=6.2.0
39
+ Requires-Dist: imageio>=2.31.0
40
+ Requires-Dist: matplotlib>=3.10.3
41
+ Requires-Dist: seaborn>=0.13.2
42
+ Requires-Dist: pillow>=11.2.1
43
+ Requires-Dist: tabulate>=0.9.0
44
+ Requires-Dist: duckdb>=1.0.0
45
+ Requires-Dist: pyarrow>=18.0.0
46
+ Requires-Dist: pandas>=2.2.3
47
+ Requires-Dist: psutil>=7.0.0
48
+ Requires-Dist: setuptools>=80.8.0
49
+ Requires-Dist: gymnasium>=1.1.1
50
+ Requires-Dist: ty>=0.0.1a5
51
+ Requires-Dist: gym>=0.23.0
52
+ Provides-Extra: dev
53
+ Requires-Dist: build>=1.2.2.post1; extra == "dev"
54
+ Requires-Dist: twine>=4.0.0; extra == "dev"
55
+ Requires-Dist: keyring>=24.0.0; extra == "dev"
56
+ Requires-Dist: pytest>=8.3.3; extra == "dev"
57
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
58
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
59
+ Requires-Dist: pyright>=1.1.350; extra == "dev"
60
+ Requires-Dist: coverage[toml]>=7.3.0; extra == "dev"
61
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
62
+ Provides-Extra: google
63
+ Requires-Dist: google-api-core>=2.0.0; extra == "google"
64
+ Requires-Dist: google-generativeai>=0.8.0; extra == "google"
65
+ Requires-Dist: google-genai>=1.0.0; extra == "google"
66
+ Provides-Extra: mistral
67
+ Requires-Dist: mistralai>=1.0.0; extra == "mistral"
68
+ Provides-Extra: research
69
+ Requires-Dist: crafter>=1.8.3; extra == "research"
70
+ Requires-Dist: gym-sokoban>=0.0.6; extra == "research"
71
+ Requires-Dist: pyboy>=2.6.0; extra == "research"
72
+ Requires-Dist: nle>=0.9.1; extra == "research"
73
+ Requires-Dist: minigrid>=3.0.0; extra == "research"
74
+ Requires-Dist: datasets>=4.0.0; extra == "research"
75
+ Provides-Extra: all
76
+ Requires-Dist: google-api-core>=2.0.0; extra == "all"
77
+ Requires-Dist: google-generativeai>=0.8.0; extra == "all"
78
+ Requires-Dist: google-genai>=1.0.0; extra == "all"
79
+ Requires-Dist: mistralai>=1.0.0; extra == "all"
80
+ Requires-Dist: crafter>=1.8.3; extra == "all"
81
+ Requires-Dist: gym-sokoban>=0.0.6; extra == "all"
82
+ Requires-Dist: pyboy>=2.6.0; extra == "all"
83
+ Requires-Dist: nle>=0.9.1; extra == "all"
84
+ Requires-Dist: minigrid>=3.0.0; extra == "all"
85
+ Requires-Dist: datasets>=4.0.0; extra == "all"
86
+ Dynamic: license-file
87
+
88
+ # Synth AI
89
+
90
+ **Comprehensive AI Framework for Language Models, Environments, and Observability**
91
+
92
+ [![Python](https://img.shields.io/badge/python-3.11+-blue)](https://www.python.org/)
93
+ [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
94
+ [![PyPI](https://img.shields.io/badge/PyPI-0.1.9-orange)](https://pypi.org/project/synth-ai/)
95
+ ![Coverage](https://img.shields.io/badge/coverage-11.3%25-red)
96
+ ![Tests](https://img.shields.io/badge/tests-17/17 passing-brightgreen)
97
+ A unified framework combining language model capabilities, synthetic environments, and comprehensive tracing for building and evaluating AI agents.
98
+
99
+ ## 🎯 Key Features
100
+
101
+ - **🤖 Language Models** - Unified LM interface for OpenAI, Anthropic, Gemini, Groq, and more
102
+ - **🏗️ Synthetic Environments** - Comprehensive framework for agent training and evaluation
103
+ - **📊 Observability & Tracing** - Built-in monitoring, logging, and performance tracking
104
+ - **🔌 Provider Support** - Enhanced client wrappers with automatic tracing integration
105
+ - **🌐 RESTful APIs** - HTTP access for remote training and evaluation
106
+ - **🛠️ Agent Tools** - Simple abstractions for agent-environment interaction
107
+
108
+ ## 🚀 Quick Start
109
+
110
+ ### Installation
111
+
112
+ ```bash
113
+ # Basic installation
114
+ pip install synth-ai
115
+
116
+ # With research environments (includes game environments)
117
+ pip install synth-ai[research]
118
+
119
+ # Full installation with all providers
120
+ pip install synth-ai[all]
121
+ ```
122
+
123
+ ### Basic Usage
124
+
125
+ ```python
126
+ from synth_ai import LM
127
+
128
+ # Create language model
129
+ lm = LM("gpt-4o-mini", temperature=0.7)
130
+
131
+ # Generate structured output
132
+ from pydantic import BaseModel
133
+
134
+ class Response(BaseModel):
135
+ answer: str
136
+ confidence: float
137
+
138
+ result = lm("What is the capital of France?", response_format=Response)
139
+ print(result.structured_output.answer) # "Paris"
140
+ ```
141
+
142
+ ### Environment Usage
143
+
144
+ ```python
145
+ from synth_ai.environments.examples.tictactoe.environment import TicTacToeEnvironment
146
+
147
+ # Create environment
148
+ env = TicTacToeEnvironment()
149
+
150
+ # Run agent
151
+ state = env.reset()
152
+ while not env.done:
153
+ action = agent.act(state)
154
+ state = env.step(action)
155
+ ```
156
+
157
+ ### Tracing & Observability
158
+
159
+ ```python
160
+ from synth_ai.tracing import trace_event_sync
161
+
162
+ @trace_event_sync
163
+ def my_agent_step(observation):
164
+ # Your agent logic here
165
+ return action
166
+
167
+ # Automatic tracing of execution
168
+ ```
169
+
170
+ ## 🎮 Supported Environments
171
+
172
+ | Environment | Status | Description |
173
+ |-------------|---------|-------------|
174
+ | **TicTacToe** | ✅ Stable | Simple strategic game for testing |
175
+ | **Sokoban** | ✅ Stable | Classic puzzle game for planning |
176
+ | **Hendryks Math** | ✅ Stable | Mathematical reasoning tasks |
177
+ | **Crafter** | 🔄 Research | Minecraft-like survival environment |
178
+ | **NetHack** | 🔄 Research | Complex dungeon exploration |
179
+ | **MiniGrid** | 🔄 Research | Grid world navigation |
180
+
181
+ ## 🤖 Supported LM Providers
182
+
183
+ | Provider | Status | Features |
184
+ |----------|--------|----------|
185
+ | **OpenAI** | ✅ Full | GPT-4, structured outputs, tools |
186
+ | **Anthropic** | ✅ Full | Claude models, structured outputs |
187
+ | **Google** | ✅ Full | Gemini models, structured outputs |
188
+ | **Groq** | ✅ Full | Fast inference, structured outputs |
189
+ | **Together** | ✅ Full | Open source models |
190
+ | **DeepSeek** | ✅ Full | Code and reasoning models |
191
+
192
+ ## 📖 Documentation
193
+
194
+ - **[API Reference](docs/api.md)** - Complete API documentation
195
+ - **[Environment Guide](docs/environments.md)** - Detailed environment descriptions
196
+ - **[LM Provider Guide](docs/providers.md)** - Language model configuration
197
+ - **[Tracing Guide](docs/tracing.md)** - Observability and monitoring
198
+
199
+ ## 🔧 Development
200
+
201
+ ### Health Check
202
+ ```bash
203
+ # Check codebase health
204
+ python scripts/check_health.py
205
+ ```
206
+
207
+ ### Testing
208
+ ```bash
209
+ # Fast tests (~3 seconds)
210
+ uv run pytest tests/ -x --tb=short
211
+
212
+ # With research environments
213
+ uv run --extra research pytest tests/
214
+
215
+ # Full test suite with coverage
216
+ uv run pytest tests/ --cov=synth_ai --cov-report=html
217
+ ```
218
+
219
+ ### Code Quality
220
+ ```bash
221
+ # Format code
222
+ ruff format .
223
+
224
+ # Check linting
225
+ ruff check .
226
+
227
+ # Type checking
228
+ uvx ty check
229
+
230
+ # Run all checks
231
+ uvx ty check && ruff check . && ruff format --check .
232
+ ```
233
+
234
+ ### Performance Profiling
235
+ ```bash
236
+ # Profile LM inference
237
+ uv run python -m synth_ai.lm.core.profiler
238
+
239
+ # Profile environment execution
240
+ uv run python -m synth_ai.environments.profiler
241
+ ```
242
+
243
+ ## 📊 Test Coverage & Metrics
244
+
245
+ Run comprehensive tests and generate metrics:
246
+
247
+ ```bash
248
+ # Generate test coverage report
249
+ uv run pytest tests/ --cov=synth_ai --cov-report=html --cov-report=term
250
+
251
+ # Update README metrics
252
+ python dev/update_readme_metrics.py
253
+
254
+ # Fast metric update (unit tests only)
255
+ python dev/update_readme_metrics.py --fast
256
+ ```
257
+
258
+ ## 🏗️ Architecture
259
+
260
+ ### Monorepo Structure
261
+
262
+ ```
263
+ synth_ai/
264
+ ├── lm/ # Language model core (formerly zyk)
265
+ │ ├── core/ # Main LM interface and clients
266
+ │ ├── vendors/ # Provider-specific implementations
267
+ │ ├── provider_support/ # Enhanced client wrappers
268
+ │ └── structured_outputs/ # Structured generation
269
+ ├── environments/ # Environment framework (formerly synth_env)
270
+ │ ├── examples/ # Built-in environments
271
+ │ ├── service/ # REST API service
272
+ │ └── stateful/ # State management
273
+ ├── tracing/ # Observability (formerly synth_sdk)
274
+ │ ├── decorators/ # Function tracing
275
+ │ ├── events/ # Event management
276
+ │ └── upload/ # Remote logging
277
+ └── zyk/ # Deprecated compatibility layer
278
+ ```
279
+
280
+ ### Migration Guide
281
+
282
+ The package consolidates functionality from multiple repos:
283
+
284
+ ```python
285
+ # Old imports (deprecated, but still work)
286
+ from synth_ai.zyk import LM # ⚠️ Shows deprecation warning
287
+ from synth_env import tasks # ⚠️ Shows deprecation warning
288
+
289
+ # New imports (recommended)
290
+ from synth_ai import LM, environments
291
+ from synth_ai.environments import tasks
292
+ from synth_ai.lm.core.main import LM # Direct import
293
+ ```
294
+
295
+ ## 🚢 Publishing & Releases
296
+
297
+ ### Build Package
298
+ ```bash
299
+ # Build for PyPI
300
+ uv build
301
+
302
+ # Check package contents
303
+ tar -tzf dist/synth-ai-*.tar.gz | head -20
304
+ ```
305
+
306
+ ### Publish
307
+ ```bash
308
+ # Test on TestPyPI
309
+ uv publish --index-url https://test.pypi.org/legacy/
310
+
311
+ # Publish to PyPI
312
+ uv publish
313
+ ```
314
+
315
+ ## 🤝 Contributing
316
+
317
+ We welcome contributions! Please see our **[Contributing Guide](dev/contributing.md)** for:
318
+ - Development setup with `uv`
319
+ - Code style guidelines (`ruff`, `uvx ty`)
320
+ - Testing requirements
321
+ - Pull request process
322
+
323
+ ### Pre-Commit Checklist
324
+ ```bash
325
+ # Run all checks before committing
326
+ uvx ty check && \
327
+ ruff check . && \
328
+ ruff format --check . && \
329
+ uv run pytest tests/ -x --tb=short
330
+ ```
331
+
332
+ ## 📄 License
333
+
334
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
335
+
336
+ ## 🙏 Acknowledgments
337
+
338
+ Special thanks to the teams at OpenAI, Anthropic, Google, and other contributors to the AI ecosystem that made this framework possible.
339
+
340
+ ---
341
+
342
+ **⚠️ Development Status**: This is an active consolidation of multiple AI frameworks. While core LM and tracing functionality is production-ready, some environments may have breaking changes.
343
+
344
+ ## 📈 Recent Updates
345
+
346
+ - **v0.1.9**: Consolidated monorepo with LM, environments, and tracing
347
+ - **Migration**: Moved from `synth_ai.zyk` → `synth_ai.lm` with backward compatibility
348
+ - **Integration**: Combined synth-sdk tracing and synth-env environments
349
+ - **Dependencies**: Added optional `[research]` extras for heavy game environments
@@ -0,0 +1,262 @@
1
+ # Synth AI
2
+
3
+ **Comprehensive AI Framework for Language Models, Environments, and Observability**
4
+
5
+ [![Python](https://img.shields.io/badge/python-3.11+-blue)](https://www.python.org/)
6
+ [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
7
+ [![PyPI](https://img.shields.io/badge/PyPI-0.1.9-orange)](https://pypi.org/project/synth-ai/)
8
+ ![Coverage](https://img.shields.io/badge/coverage-11.3%25-red)
9
+ ![Tests](https://img.shields.io/badge/tests-17/17 passing-brightgreen)
10
+ A unified framework combining language model capabilities, synthetic environments, and comprehensive tracing for building and evaluating AI agents.
11
+
12
+ ## 🎯 Key Features
13
+
14
+ - **🤖 Language Models** - Unified LM interface for OpenAI, Anthropic, Gemini, Groq, and more
15
+ - **🏗️ Synthetic Environments** - Comprehensive framework for agent training and evaluation
16
+ - **📊 Observability & Tracing** - Built-in monitoring, logging, and performance tracking
17
+ - **🔌 Provider Support** - Enhanced client wrappers with automatic tracing integration
18
+ - **🌐 RESTful APIs** - HTTP access for remote training and evaluation
19
+ - **🛠️ Agent Tools** - Simple abstractions for agent-environment interaction
20
+
21
+ ## 🚀 Quick Start
22
+
23
+ ### Installation
24
+
25
+ ```bash
26
+ # Basic installation
27
+ pip install synth-ai
28
+
29
+ # With research environments (includes game environments)
30
+ pip install synth-ai[research]
31
+
32
+ # Full installation with all providers
33
+ pip install synth-ai[all]
34
+ ```
35
+
36
+ ### Basic Usage
37
+
38
+ ```python
39
+ from synth_ai import LM
40
+
41
+ # Create language model
42
+ lm = LM("gpt-4o-mini", temperature=0.7)
43
+
44
+ # Generate structured output
45
+ from pydantic import BaseModel
46
+
47
+ class Response(BaseModel):
48
+ answer: str
49
+ confidence: float
50
+
51
+ result = lm("What is the capital of France?", response_format=Response)
52
+ print(result.structured_output.answer) # "Paris"
53
+ ```
54
+
55
+ ### Environment Usage
56
+
57
+ ```python
58
+ from synth_ai.environments.examples.tictactoe.environment import TicTacToeEnvironment
59
+
60
+ # Create environment
61
+ env = TicTacToeEnvironment()
62
+
63
+ # Run agent
64
+ state = env.reset()
65
+ while not env.done:
66
+ action = agent.act(state)
67
+ state = env.step(action)
68
+ ```
69
+
70
+ ### Tracing & Observability
71
+
72
+ ```python
73
+ from synth_ai.tracing import trace_event_sync
74
+
75
+ @trace_event_sync
76
+ def my_agent_step(observation):
77
+ # Your agent logic here
78
+ return action
79
+
80
+ # Automatic tracing of execution
81
+ ```
82
+
83
+ ## 🎮 Supported Environments
84
+
85
+ | Environment | Status | Description |
86
+ |-------------|---------|-------------|
87
+ | **TicTacToe** | ✅ Stable | Simple strategic game for testing |
88
+ | **Sokoban** | ✅ Stable | Classic puzzle game for planning |
89
+ | **Hendryks Math** | ✅ Stable | Mathematical reasoning tasks |
90
+ | **Crafter** | 🔄 Research | Minecraft-like survival environment |
91
+ | **NetHack** | 🔄 Research | Complex dungeon exploration |
92
+ | **MiniGrid** | 🔄 Research | Grid world navigation |
93
+
94
+ ## 🤖 Supported LM Providers
95
+
96
+ | Provider | Status | Features |
97
+ |----------|--------|----------|
98
+ | **OpenAI** | ✅ Full | GPT-4, structured outputs, tools |
99
+ | **Anthropic** | ✅ Full | Claude models, structured outputs |
100
+ | **Google** | ✅ Full | Gemini models, structured outputs |
101
+ | **Groq** | ✅ Full | Fast inference, structured outputs |
102
+ | **Together** | ✅ Full | Open source models |
103
+ | **DeepSeek** | ✅ Full | Code and reasoning models |
104
+
105
+ ## 📖 Documentation
106
+
107
+ - **[API Reference](docs/api.md)** - Complete API documentation
108
+ - **[Environment Guide](docs/environments.md)** - Detailed environment descriptions
109
+ - **[LM Provider Guide](docs/providers.md)** - Language model configuration
110
+ - **[Tracing Guide](docs/tracing.md)** - Observability and monitoring
111
+
112
+ ## 🔧 Development
113
+
114
+ ### Health Check
115
+ ```bash
116
+ # Check codebase health
117
+ python scripts/check_health.py
118
+ ```
119
+
120
+ ### Testing
121
+ ```bash
122
+ # Fast tests (~3 seconds)
123
+ uv run pytest tests/ -x --tb=short
124
+
125
+ # With research environments
126
+ uv run --extra research pytest tests/
127
+
128
+ # Full test suite with coverage
129
+ uv run pytest tests/ --cov=synth_ai --cov-report=html
130
+ ```
131
+
132
+ ### Code Quality
133
+ ```bash
134
+ # Format code
135
+ ruff format .
136
+
137
+ # Check linting
138
+ ruff check .
139
+
140
+ # Type checking
141
+ uvx ty check
142
+
143
+ # Run all checks
144
+ uvx ty check && ruff check . && ruff format --check .
145
+ ```
146
+
147
+ ### Performance Profiling
148
+ ```bash
149
+ # Profile LM inference
150
+ uv run python -m synth_ai.lm.core.profiler
151
+
152
+ # Profile environment execution
153
+ uv run python -m synth_ai.environments.profiler
154
+ ```
155
+
156
+ ## 📊 Test Coverage & Metrics
157
+
158
+ Run comprehensive tests and generate metrics:
159
+
160
+ ```bash
161
+ # Generate test coverage report
162
+ uv run pytest tests/ --cov=synth_ai --cov-report=html --cov-report=term
163
+
164
+ # Update README metrics
165
+ python dev/update_readme_metrics.py
166
+
167
+ # Fast metric update (unit tests only)
168
+ python dev/update_readme_metrics.py --fast
169
+ ```
170
+
171
+ ## 🏗️ Architecture
172
+
173
+ ### Monorepo Structure
174
+
175
+ ```
176
+ synth_ai/
177
+ ├── lm/ # Language model core (formerly zyk)
178
+ │ ├── core/ # Main LM interface and clients
179
+ │ ├── vendors/ # Provider-specific implementations
180
+ │ ├── provider_support/ # Enhanced client wrappers
181
+ │ └── structured_outputs/ # Structured generation
182
+ ├── environments/ # Environment framework (formerly synth_env)
183
+ │ ├── examples/ # Built-in environments
184
+ │ ├── service/ # REST API service
185
+ │ └── stateful/ # State management
186
+ ├── tracing/ # Observability (formerly synth_sdk)
187
+ │ ├── decorators/ # Function tracing
188
+ │ ├── events/ # Event management
189
+ │ └── upload/ # Remote logging
190
+ └── zyk/ # Deprecated compatibility layer
191
+ ```
192
+
193
+ ### Migration Guide
194
+
195
+ The package consolidates functionality from multiple repos:
196
+
197
+ ```python
198
+ # Old imports (deprecated, but still work)
199
+ from synth_ai.zyk import LM # ⚠️ Shows deprecation warning
200
+ from synth_env import tasks # ⚠️ Shows deprecation warning
201
+
202
+ # New imports (recommended)
203
+ from synth_ai import LM, environments
204
+ from synth_ai.environments import tasks
205
+ from synth_ai.lm.core.main import LM # Direct import
206
+ ```
207
+
208
+ ## 🚢 Publishing & Releases
209
+
210
+ ### Build Package
211
+ ```bash
212
+ # Build for PyPI
213
+ uv build
214
+
215
+ # Check package contents
216
+ tar -tzf dist/synth-ai-*.tar.gz | head -20
217
+ ```
218
+
219
+ ### Publish
220
+ ```bash
221
+ # Test on TestPyPI
222
+ uv publish --index-url https://test.pypi.org/legacy/
223
+
224
+ # Publish to PyPI
225
+ uv publish
226
+ ```
227
+
228
+ ## 🤝 Contributing
229
+
230
+ We welcome contributions! Please see our **[Contributing Guide](dev/contributing.md)** for:
231
+ - Development setup with `uv`
232
+ - Code style guidelines (`ruff`, `uvx ty`)
233
+ - Testing requirements
234
+ - Pull request process
235
+
236
+ ### Pre-Commit Checklist
237
+ ```bash
238
+ # Run all checks before committing
239
+ uvx ty check && \
240
+ ruff check . && \
241
+ ruff format --check . && \
242
+ uv run pytest tests/ -x --tb=short
243
+ ```
244
+
245
+ ## 📄 License
246
+
247
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
248
+
249
+ ## 🙏 Acknowledgments
250
+
251
+ Special thanks to the teams at OpenAI, Anthropic, Google, and other contributors to the AI ecosystem that made this framework possible.
252
+
253
+ ---
254
+
255
+ **⚠️ Development Status**: This is an active consolidation of multiple AI frameworks. While core LM and tracing functionality is production-ready, some environments may have breaking changes.
256
+
257
+ ## 📈 Recent Updates
258
+
259
+ - **v0.1.9**: Consolidated monorepo with LM, environments, and tracing
260
+ - **Migration**: Moved from `synth_ai.zyk` → `synth_ai.lm` with backward compatibility
261
+ - **Integration**: Combined synth-sdk tracing and synth-env environments
262
+ - **Dependencies**: Added optional `[research]` extras for heavy game environments