flock-core 0.1.1__py3-none-any.whl → 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flock-core might be problematic. Click here for more details.

Files changed (405) hide show
  1. flock/__init__.py +1 -4
  2. flock/agents/__init__.py +0 -3
  3. flock/agents/batch_agent.py +140 -175
  4. flock/agents/loop_agent.py +117 -178
  5. flock/agents/trigger_agent.py +113 -191
  6. flock/agents/user_agent.py +145 -230
  7. flock/core/__init__.py +1 -7
  8. flock/core/context/context.py +211 -0
  9. flock/core/context/context_manager.py +34 -0
  10. flock/core/{context_vars.py → context/context_vars.py} +8 -6
  11. flock/core/execution/local_executor.py +27 -0
  12. flock/core/execution/temporal_executor.py +40 -0
  13. flock/core/flock.py +199 -208
  14. flock/core/flock_agent.py +492 -0
  15. flock/core/logging/__init__.py +2 -18
  16. flock/core/logging/formatters/base_formatter.py +36 -0
  17. flock/core/logging/formatters/formatter_factory.py +38 -0
  18. flock/core/logging/formatters/pprint_formatter.py +18 -0
  19. flock/core/logging/formatters/rich_formatters.py +132 -0
  20. flock/core/logging/formatters/theme_builder.py +480 -0
  21. flock/core/logging/formatters/themed_formatter.py +442 -0
  22. flock/core/logging/logging.py +123 -0
  23. flock/core/mixin/dspy_integration.py +171 -0
  24. flock/core/mixin/prompt_parser.py +125 -0
  25. flock/core/registry/agent_registry.py +103 -0
  26. flock/core/tools/basic_tools.py +273 -98
  27. flock/core/tools/dev_tools/github.py +161 -0
  28. flock/core/util/cli_helper.py +21 -0
  29. flock/core/util/input_resolver.py +156 -0
  30. flock/core/util/serializable.py +93 -0
  31. flock/themes/3024-day.toml +39 -0
  32. flock/themes/3024-night.toml +77 -0
  33. flock/themes/aardvark-blue.toml +77 -0
  34. flock/themes/abernathy.toml +77 -0
  35. flock/themes/adventure.toml +77 -0
  36. flock/themes/adventuretime.toml +77 -0
  37. flock/themes/afterglow.toml +77 -0
  38. flock/themes/alabaster.toml +77 -0
  39. flock/themes/alienblood.toml +77 -0
  40. flock/themes/andromeda.toml +77 -0
  41. flock/themes/apple-classic.toml +77 -0
  42. flock/themes/apple-system-colors.toml +77 -0
  43. flock/themes/arcoiris.toml +77 -0
  44. flock/themes/argonaut copy.toml +77 -0
  45. flock/themes/argonaut.toml +39 -0
  46. flock/themes/arthur.toml +77 -0
  47. flock/themes/ateliersulphurpool.toml +77 -0
  48. flock/themes/atom.toml +38 -0
  49. flock/themes/atom_test.toml +65 -0
  50. flock/themes/atomonelight.toml +77 -0
  51. flock/themes/aurora.toml +77 -0
  52. flock/themes/ayu copy.toml +77 -0
  53. flock/themes/ayu-light.toml +77 -0
  54. flock/themes/ayu-mirage.toml +77 -0
  55. flock/themes/ayu.toml +39 -0
  56. flock/themes/banana-blueberry.toml +77 -0
  57. flock/themes/batman.toml +77 -0
  58. flock/themes/belafonte-day.toml +77 -0
  59. flock/themes/belafonte-night.toml +77 -0
  60. flock/themes/birdsofparadise.toml +77 -0
  61. flock/themes/blazer.toml +77 -0
  62. flock/themes/blue-matrix.toml +77 -0
  63. flock/themes/blueberrypie.toml +77 -0
  64. flock/themes/bluedolphin.toml +77 -0
  65. flock/themes/blulocodark.toml +77 -0
  66. flock/themes/blulocolight.toml +77 -0
  67. flock/themes/borland.toml +77 -0
  68. flock/themes/breeze.toml +77 -0
  69. flock/themes/bright-lights.toml +77 -0
  70. flock/themes/broadcast.toml +77 -0
  71. flock/themes/brogrammer.toml +77 -0
  72. flock/themes/builtin-dark.toml +77 -0
  73. flock/themes/builtin-light.toml +77 -0
  74. flock/themes/builtin-pastel-dark.toml +77 -0
  75. flock/themes/builtin-solarized-dark.toml +77 -0
  76. flock/themes/builtin-solarized-light.toml +77 -0
  77. flock/themes/builtin-tango-dark.toml +77 -0
  78. flock/themes/builtin-tango-light.toml +77 -0
  79. flock/themes/c64.toml +77 -0
  80. flock/themes/calamity.toml +77 -0
  81. flock/themes/catppuccin-frappe.toml +77 -0
  82. flock/themes/catppuccin-latte.toml +77 -0
  83. flock/themes/catppuccin-macchiato.toml +77 -0
  84. flock/themes/catppuccin-mocha.toml +77 -0
  85. flock/themes/cga.toml +77 -0
  86. flock/themes/chalk.toml +77 -0
  87. flock/themes/chalkboard.toml +77 -0
  88. flock/themes/challengerdeep.toml +77 -0
  89. flock/themes/chester.toml +77 -0
  90. flock/themes/ciapre.toml +77 -0
  91. flock/themes/clrs.toml +77 -0
  92. flock/themes/cobalt-neon.toml +77 -0
  93. flock/themes/cobalt2.toml +77 -0
  94. flock/themes/coffee-theme.toml +77 -0
  95. flock/themes/crayonponyfish.toml +77 -0
  96. flock/themes/cutiepro.toml +77 -0
  97. flock/themes/cyberdyne.toml +77 -0
  98. flock/themes/cyberpunk.toml +77 -0
  99. flock/themes/cyberpunkscarletprotocol.toml +77 -0
  100. flock/themes/dark+.toml +77 -0
  101. flock/themes/dark-pastel.toml +77 -0
  102. flock/themes/darkermatrix.toml +77 -0
  103. flock/themes/darkmatrix.toml +77 -0
  104. flock/themes/darkside.toml +77 -0
  105. flock/themes/dayfox.toml +77 -0
  106. flock/themes/deep.toml +77 -0
  107. flock/themes/desert.toml +77 -0
  108. flock/themes/dimidium.toml +77 -0
  109. flock/themes/dimmedmonokai.toml +77 -0
  110. flock/themes/django.toml +77 -0
  111. flock/themes/djangorebornagain.toml +77 -0
  112. flock/themes/djangosmooth.toml +77 -0
  113. flock/themes/doom-peacock.toml +77 -0
  114. flock/themes/doomone.toml +77 -0
  115. flock/themes/dotgov.toml +77 -0
  116. flock/themes/dracula+.toml +77 -0
  117. flock/themes/dracula.toml +77 -0
  118. flock/themes/duckbones.toml +77 -0
  119. flock/themes/duotone-dark.toml +77 -0
  120. flock/themes/earthsong.toml +77 -0
  121. flock/themes/elemental.toml +77 -0
  122. flock/themes/elementary.toml +77 -0
  123. flock/themes/encom.toml +77 -0
  124. flock/themes/espresso-libre.toml +77 -0
  125. flock/themes/espresso.toml +77 -0
  126. flock/themes/everblush.toml +77 -0
  127. flock/themes/fahrenheit.toml +77 -0
  128. flock/themes/fairyfloss.toml +77 -0
  129. flock/themes/farmhouse-dark.toml +77 -0
  130. flock/themes/farmhouse-light.toml +77 -0
  131. flock/themes/fideloper.toml +77 -0
  132. flock/themes/firefly-traditional.toml +77 -0
  133. flock/themes/firefoxdev.toml +77 -0
  134. flock/themes/firewatch.toml +77 -0
  135. flock/themes/fishtank.toml +77 -0
  136. flock/themes/flat.toml +77 -0
  137. flock/themes/flatland.toml +77 -0
  138. flock/themes/flexoki-dark.toml +77 -0
  139. flock/themes/flexoki-light.toml +77 -0
  140. flock/themes/floraverse.toml +77 -0
  141. flock/themes/forestblue.toml +77 -0
  142. flock/themes/framer.toml +77 -0
  143. flock/themes/frontenddelight.toml +77 -0
  144. flock/themes/funforrest.toml +77 -0
  145. flock/themes/galaxy.toml +77 -0
  146. flock/themes/galizur.toml +77 -0
  147. flock/themes/github-dark.toml +77 -0
  148. flock/themes/github.toml +77 -0
  149. flock/themes/glacier.toml +77 -0
  150. flock/themes/grape.toml +77 -0
  151. flock/themes/grass.toml +77 -0
  152. flock/themes/grey-green.toml +77 -0
  153. flock/themes/gruber-darker.toml +77 -0
  154. flock/themes/gruvboxdark.toml +77 -0
  155. flock/themes/gruvboxdarkhard.toml +77 -0
  156. flock/themes/gruvboxlight.toml +77 -0
  157. flock/themes/guezwhoz.toml +77 -0
  158. flock/themes/hacktober.toml +77 -0
  159. flock/themes/hardcore.toml +77 -0
  160. flock/themes/harper.toml +77 -0
  161. flock/themes/hax0r-blue.toml +77 -0
  162. flock/themes/hax0r-gr33n.toml +77 -0
  163. flock/themes/hax0r-r3d.toml +77 -0
  164. flock/themes/highway.toml +77 -0
  165. flock/themes/hipster-green.toml +77 -0
  166. flock/themes/hivacruz.toml +77 -0
  167. flock/themes/homebrew.toml +77 -0
  168. flock/themes/hopscotch.256.toml +77 -0
  169. flock/themes/hopscotch.toml +77 -0
  170. flock/themes/hurtado.toml +77 -0
  171. flock/themes/hybrid.toml +77 -0
  172. flock/themes/ic-green-ppl.toml +77 -0
  173. flock/themes/ic-orange-ppl.toml +77 -0
  174. flock/themes/iceberg-dark.toml +77 -0
  175. flock/themes/iceberg-light.toml +77 -0
  176. flock/themes/idea.toml +77 -0
  177. flock/themes/idletoes.toml +77 -0
  178. flock/themes/ir-black.toml +77 -0
  179. flock/themes/iterm2-dark-background.toml +77 -0
  180. flock/themes/iterm2-default.toml +77 -0
  181. flock/themes/iterm2-light-background.toml +77 -0
  182. flock/themes/iterm2-pastel-dark-background.toml +77 -0
  183. flock/themes/iterm2-smoooooth.toml +77 -0
  184. flock/themes/iterm2-solarized-dark.toml +77 -0
  185. flock/themes/iterm2-solarized-light.toml +77 -0
  186. flock/themes/iterm2-tango-dark.toml +77 -0
  187. flock/themes/iterm2-tango-light.toml +77 -0
  188. flock/themes/jackie-brown.toml +77 -0
  189. flock/themes/japanesque.toml +77 -0
  190. flock/themes/jellybeans.toml +77 -0
  191. flock/themes/jetbrains-darcula.toml +77 -0
  192. flock/themes/jubi.toml +77 -0
  193. flock/themes/kanagawabones.toml +77 -0
  194. flock/themes/kibble.toml +77 -0
  195. flock/themes/kolorit.toml +77 -0
  196. flock/themes/konsolas.toml +77 -0
  197. flock/themes/kurokula.toml +77 -0
  198. flock/themes/lab-fox.toml +77 -0
  199. flock/themes/laser.toml +77 -0
  200. flock/themes/later-this-evening.toml +77 -0
  201. flock/themes/lavandula.toml +77 -0
  202. flock/themes/liquidcarbon.toml +77 -0
  203. flock/themes/liquidcarbontransparent.toml +77 -0
  204. flock/themes/liquidcarbontransparentinverse.toml +77 -0
  205. flock/themes/lovelace.toml +77 -0
  206. flock/themes/man-page.toml +77 -0
  207. flock/themes/mariana.toml +77 -0
  208. flock/themes/material.toml +77 -0
  209. flock/themes/materialdark.toml +77 -0
  210. flock/themes/materialdarker.toml +77 -0
  211. flock/themes/materialdesigncolors.toml +77 -0
  212. flock/themes/materialocean.toml +77 -0
  213. flock/themes/mathias.toml +77 -0
  214. flock/themes/matrix.toml +77 -0
  215. flock/themes/medallion.toml +77 -0
  216. flock/themes/mellifluous.toml +77 -0
  217. flock/themes/midnight-in-mojave.toml +77 -0
  218. flock/themes/mirage.toml +77 -0
  219. flock/themes/misterioso.toml +77 -0
  220. flock/themes/molokai.toml +77 -0
  221. flock/themes/monalisa.toml +77 -0
  222. flock/themes/monokai-remastered.toml +77 -0
  223. flock/themes/monokai-soda.toml +77 -0
  224. flock/themes/monokai-vivid.toml +77 -0
  225. flock/themes/n0tch2k.toml +77 -0
  226. flock/themes/neobones-dark.toml +77 -0
  227. flock/themes/neobones-light.toml +77 -0
  228. flock/themes/neon.toml +77 -0
  229. flock/themes/neopolitan.toml +77 -0
  230. flock/themes/neutron.toml +77 -0
  231. flock/themes/night-owlish-light.toml +77 -0
  232. flock/themes/nightfox.toml +77 -0
  233. flock/themes/nightlion-v1.toml +77 -0
  234. flock/themes/nightlion-v2.toml +77 -0
  235. flock/themes/niji.toml +77 -0
  236. flock/themes/nocturnal-winter.toml +77 -0
  237. flock/themes/nord-light.toml +77 -0
  238. flock/themes/nord.toml +77 -0
  239. flock/themes/novel.toml +77 -0
  240. flock/themes/nvimdark.toml +77 -0
  241. flock/themes/nvimlight.toml +77 -0
  242. flock/themes/obsidian.toml +77 -0
  243. flock/themes/ocean.toml +77 -0
  244. flock/themes/oceanic-next.toml +77 -0
  245. flock/themes/oceanicmaterial.toml +77 -0
  246. flock/themes/ollie.toml +77 -0
  247. flock/themes/onehalfdark.toml +77 -0
  248. flock/themes/onehalflight.toml +77 -0
  249. flock/themes/operator-mono-dark.toml +77 -0
  250. flock/themes/overnight-slumber.toml +77 -0
  251. flock/themes/oxocarbon.toml +77 -0
  252. flock/themes/palenighthc.toml +77 -0
  253. flock/themes/pandora.toml +77 -0
  254. flock/themes/paraiso-dark.toml +77 -0
  255. flock/themes/paulmillr.toml +77 -0
  256. flock/themes/pencildark.toml +77 -0
  257. flock/themes/pencillight.toml +77 -0
  258. flock/themes/peppermint.toml +77 -0
  259. flock/themes/piatto-light.toml +77 -0
  260. flock/themes/pnevma.toml +77 -0
  261. flock/themes/popping-and-locking.toml +77 -0
  262. flock/themes/primary.toml +77 -0
  263. flock/themes/pro-light.toml +77 -0
  264. flock/themes/pro.toml +77 -0
  265. flock/themes/purple-rain.toml +77 -0
  266. flock/themes/purplepeter.toml +77 -0
  267. flock/themes/rapture.toml +77 -0
  268. flock/themes/raycast-dark.toml +77 -0
  269. flock/themes/raycast-light.toml +77 -0
  270. flock/themes/rebecca.toml +77 -0
  271. flock/themes/red-alert.toml +77 -0
  272. flock/themes/red-planet.toml +77 -0
  273. flock/themes/red-sands.toml +77 -0
  274. flock/themes/relaxed.toml +77 -0
  275. flock/themes/retro.toml +77 -0
  276. flock/themes/rippedcasts.toml +77 -0
  277. flock/themes/rose-pine-dawn.toml +77 -0
  278. flock/themes/rose-pine-moon.toml +77 -0
  279. flock/themes/rose-pine.toml +77 -0
  280. flock/themes/rouge-2.toml +77 -0
  281. flock/themes/royal.toml +77 -0
  282. flock/themes/ryuuko.toml +77 -0
  283. flock/themes/sakura.toml +77 -0
  284. flock/themes/scarlet-protocol.toml +77 -0
  285. flock/themes/seafoam-pastel.toml +77 -0
  286. flock/themes/seashells.toml +77 -0
  287. flock/themes/seoulbones-dark.toml +77 -0
  288. flock/themes/seoulbones-light.toml +77 -0
  289. flock/themes/seti.toml +77 -0
  290. flock/themes/shades-of-purple.toml +77 -0
  291. flock/themes/shaman.toml +77 -0
  292. flock/themes/slate.toml +77 -0
  293. flock/themes/sleepyhollow.toml +77 -0
  294. flock/themes/smyck.toml +77 -0
  295. flock/themes/snazzy.toml +77 -0
  296. flock/themes/softserver.toml +77 -0
  297. flock/themes/solarized-darcula.toml +77 -0
  298. flock/themes/solarized-dark---patched.toml +77 -0
  299. flock/themes/solarized-dark-higher-contrast.toml +77 -0
  300. flock/themes/spacedust.toml +77 -0
  301. flock/themes/spacegray-eighties-dull.toml +77 -0
  302. flock/themes/spacegray-eighties.toml +77 -0
  303. flock/themes/spacegray.toml +77 -0
  304. flock/themes/spiderman.toml +77 -0
  305. flock/themes/spring.toml +77 -0
  306. flock/themes/square.toml +77 -0
  307. flock/themes/sublette.toml +77 -0
  308. flock/themes/subliminal.toml +77 -0
  309. flock/themes/sugarplum.toml +77 -0
  310. flock/themes/sundried.toml +77 -0
  311. flock/themes/symfonic.toml +77 -0
  312. flock/themes/synthwave-everything.toml +77 -0
  313. flock/themes/synthwave.toml +77 -0
  314. flock/themes/synthwavealpha.toml +77 -0
  315. flock/themes/tango-adapted.toml +77 -0
  316. flock/themes/tango-half-adapted.toml +77 -0
  317. flock/themes/teerb.toml +77 -0
  318. flock/themes/terafox.toml +77 -0
  319. flock/themes/terminal-basic.toml +77 -0
  320. flock/themes/thayer-bright.toml +77 -0
  321. flock/themes/the-hulk.toml +77 -0
  322. flock/themes/tinacious-design-(dark).toml +77 -0
  323. flock/themes/tinacious-design-(light).toml +77 -0
  324. flock/themes/tokyonight-day.toml +77 -0
  325. flock/themes/tokyonight-storm.toml +77 -0
  326. flock/themes/tokyonight.toml +77 -0
  327. flock/themes/tomorrow-night-blue.toml +77 -0
  328. flock/themes/tomorrow-night-bright.toml +77 -0
  329. flock/themes/tomorrow-night-burns.toml +77 -0
  330. flock/themes/tomorrow-night-eighties.toml +77 -0
  331. flock/themes/tomorrow-night.toml +77 -0
  332. flock/themes/tomorrow.toml +77 -0
  333. flock/themes/toychest.toml +77 -0
  334. flock/themes/treehouse.toml +77 -0
  335. flock/themes/twilight.toml +77 -0
  336. flock/themes/ubuntu.toml +77 -0
  337. flock/themes/ultradark.toml +77 -0
  338. flock/themes/ultraviolent.toml +77 -0
  339. flock/themes/underthesea.toml +77 -0
  340. flock/themes/unikitty.toml +77 -0
  341. flock/themes/urple.toml +77 -0
  342. flock/themes/vaughn.toml +77 -0
  343. flock/themes/vesper.toml +77 -0
  344. flock/themes/vibrantink.toml +77 -0
  345. flock/themes/vimbones.toml +77 -0
  346. flock/themes/violet-dark.toml +77 -0
  347. flock/themes/violet-light.toml +77 -0
  348. flock/themes/warmneon.toml +77 -0
  349. flock/themes/wez.toml +77 -0
  350. flock/themes/whimsy.toml +77 -0
  351. flock/themes/wildcherry.toml +77 -0
  352. flock/themes/wilmersdorf.toml +77 -0
  353. flock/themes/wombat.toml +77 -0
  354. flock/themes/wryan.toml +77 -0
  355. flock/themes/xcodedark.toml +77 -0
  356. flock/themes/xcodedarkhc.toml +77 -0
  357. flock/themes/xcodelight.toml +77 -0
  358. flock/themes/xcodelighthc.toml +77 -0
  359. flock/themes/xcodewwdc.toml +77 -0
  360. flock/themes/zenbones-dark.toml +77 -0
  361. flock/themes/zenbones-light.toml +77 -0
  362. flock/themes/zenbones.toml +77 -0
  363. flock/themes/zenburn.toml +77 -0
  364. flock/themes/zenburned.toml +77 -0
  365. flock/themes/zenwritten-dark.toml +77 -0
  366. flock/themes/zenwritten-light.toml +77 -0
  367. flock/workflow/activities.py +117 -115
  368. flock/workflow/agent_activities.py +24 -26
  369. flock/workflow/temporal_setup.py +38 -37
  370. flock/workflow/workflow.py +58 -53
  371. flock_core-0.2.1.dist-info/METADATA +287 -0
  372. flock_core-0.2.1.dist-info/RECORD +375 -0
  373. {flock_core-0.1.1.dist-info → flock_core-0.2.1.dist-info}/licenses/LICENSE +21 -21
  374. flock/agents/declarative_agent.py +0 -166
  375. flock/app/components/__init__.py +0 -14
  376. flock/app/components/charts/agent_workflow.py +0 -14
  377. flock/app/components/charts/core_architecture.py +0 -14
  378. flock/app/components/charts/tool_system.py +0 -14
  379. flock/app/components/history_grid.py +0 -168
  380. flock/app/components/history_grid_alt.py +0 -189
  381. flock/app/components/sidebar.py +0 -19
  382. flock/app/components/theme.py +0 -9
  383. flock/app/components/util.py +0 -18
  384. flock/app/hive_app.py +0 -118
  385. flock/app/html/d3.html +0 -179
  386. flock/app/modules/__init__.py +0 -12
  387. flock/app/modules/about.py +0 -17
  388. flock/app/modules/agent_detail.py +0 -70
  389. flock/app/modules/agent_list.py +0 -59
  390. flock/app/modules/playground.py +0 -322
  391. flock/app/modules/settings.py +0 -96
  392. flock/core/agent.py +0 -150
  393. flock/core/agent_registry.py +0 -162
  394. flock/core/context.py +0 -279
  395. flock/core/handoff/handoff_base.py +0 -12
  396. flock/core/logging/error_handler.py +0 -84
  397. flock/core/logging/formatters.py +0 -122
  398. flock/core/logging/handlers.py +0 -117
  399. flock/core/logging/logger.py +0 -107
  400. flock/core/serializable.py +0 -206
  401. flock_core-0.1.1.dist-info/METADATA +0 -449
  402. flock_core-0.1.1.dist-info/RECORD +0 -48
  403. flock_core-0.1.1.dist-info/entry_points.txt +0 -2
  404. /flock/{core/config/declarative_agent_config.py → workflow/__init__.py} +0 -0
  405. {flock_core-0.1.1.dist-info → flock_core-0.2.1.dist-info}/WHEEL +0 -0
@@ -1,449 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: flock-core
3
- Version: 0.1.1
4
- Summary: An agent framework for the age of agents
5
- Author-email: Andre Ratzenberger <andre.ratzenberger@whiteduck.de>
6
- License-File: LICENSE
7
- Classifier: License :: OSI Approved :: MIT License
8
- Classifier: Operating System :: OS Independent
9
- Classifier: Programming Language :: Python :: 3
10
- Requires-Python: >=3.10
11
- Requires-Dist: cloudpickle>=3.1.1
12
- Requires-Dist: devtools>=0.12.2
13
- Requires-Dist: dspy>=2.5.42
14
- Requires-Dist: httpx>=0.28.1
15
- Requires-Dist: loguru>=0.7.3
16
- Requires-Dist: marimo>=0.10.15
17
- Requires-Dist: markdownify>=0.14.1
18
- Requires-Dist: monsterui>=0.0.23
19
- Requires-Dist: msgpack>=1.1.0
20
- Requires-Dist: pydantic>=2.10.5
21
- Requires-Dist: python-box>=7.3.2
22
- Requires-Dist: python-fasthtml>=0.12.0
23
- Requires-Dist: rich>=13.9.4
24
- Requires-Dist: tavily-python>=0.5.0
25
- Requires-Dist: temporalio>=1.9.0
26
- Description-Content-Type: text/markdown
27
-
28
- # flock
29
-
30
- white duck flock (engl. Herde/Schwarm) ist ein KI-gestütztes Agentenframework. Agenten sind Applikationen die autark und autonom entscheiden wie sie ein Problem lösen, und je nach konfiguration auch selber entscheiden wie sie untereinander kommunizieren. Ein zusammenschluss mehrerer Agenten ist ein Agentensystem.
31
-
32
- Wir dachten da vielleicht als Logo einfach eine Herde/Schwarm an Freds, oder ähnlich wie Huggingface an einen James Bond Fred (vgl. https://huggingface.co/docs/smolagents/en/index) oder natürlich auch gerne eine Herde an James Bond Freds!
33
-
34
-
35
- White Duck Flock (engl. Herde/Schwarm) ist ein KI-gestütztes Agentenframework. Agenten sind Applikationen, die autark und autonom entscheiden, wie sie ein Problem lösen – und je nach Konfiguration auch selbst bestimmen, wie sie untereinander kommunizieren. Ein Zusammenschluss mehrerer Agenten bildet ein Agentensystem.
36
-
37
- Als Logo dachten wir vielleicht an eine Herde/Schwarm von Freds – oder, ähnlich wie Hugging Face, an einen James-Bond-Fred (vgl. https://huggingface.co/docs/smolagents/en/index). Alternativ natürlich auch gerne eine ganze Herde an James-Bond-Freds!
38
-
39
-
40
-
41
-
42
- ```python
43
- MODEL = "openai/gpt-4o"
44
-
45
- async def main():
46
-
47
- #--------------------------------
48
- # Create the flock and context
49
- #--------------------------------
50
- # The flock is the place where all the agents are at home
51
- # The context is everything that happened in the flock
52
- flock, context = Flock.create()
53
-
54
- #--------------------------------
55
- # Create an agent
56
- #--------------------------------
57
- # The Flock doesn't believe in prompts (see the readme for more info)
58
- # The Flock just declares what agents get in and what agents produce
59
- # bloggy takes in a blog_idea and outputs a funny_blog_title and blog_headers
60
- bloggy = DeclarativeAgent(
61
- name="bloggy",
62
- input="blog_idea",
63
- output="funny_blog_title, blog_headers",
64
- model=MODEL
65
- )
66
- # Let's add bloggy to the flock
67
- flock.add_agent(bloggy)
68
-
69
- #--------------------------------
70
- # Run the flock
71
- #--------------------------------
72
- # By giving the flock a start_agent and an input, we can run the flock
73
- # local_debug makes it easier to debug the flock
74
- result = await flock.run_async(
75
- context=context,
76
- start_agent=bloggy,
77
- input="a blog about cats",
78
- local_debug=True
79
- )
80
- # earn the fruits of the flock's labor
81
- print(result)
82
-
83
- ```
84
-
85
- Problems with other agent frameworks
86
-
87
- - Instead of writing software you need to write pages long natural language prompts
88
- - One crash and your whole agent system is dead
89
- - Demand having your system be a real DAG and a real state machine
90
-
91
- How Flock tries to solve it:
92
-
93
- - Just declare what your agents get ind, and what they should return
94
- - First grade temporalio support. Retry, Error, Timeout etc etc are somethi
95
- - Chain your agents together in any kind you want
96
-
97
- ## Philosophy & Design Principles
98
-
99
- ### Say goodbye to prompting
100
-
101
- Sometimes you see agents with a 200 lines of text system prompt.
102
- How do evaluate if this is the most optimal prompt for your use case? How would changes affect the performance?
103
- Questions for there is no easy answer.
104
-
105
- How does a good prompt look like? What happens with your prompt if you switch models?
106
-
107
- With flock you just tell an agent what kind of input it gets, and what it should output. Done. Easy peasy.
108
-
109
- The philosophy behind this approach is simple: by focusing on the interface (inputs and outputs) rather than implementation details (prompts), we create more maintainable and adaptable systems. This declarative approach means:
110
- - Your agents are model-agnostic
111
- - Behavior can be tested and validated objectively
112
- - Changes are localized and predictable
113
- - Integration with other systems becomes straightforward
114
-
115
- ### Testable
116
-
117
- Reducing the need for fuzzy natural language to a minimum agents become easily testable, evaluable.
118
- Flock comes with tools to know exactly how good your agents and therefore the agent system is performing.
119
-
120
- This focus on testability isn't just about catching bugs - it's about building confidence in your AI systems:
121
- - Clear input/output contracts make unit testing straightforward
122
- - Type safety ensures data consistency
123
- - Performance metrics are built into the framework
124
- - Behavior can be validated systematically
125
-
126
- ### Production ready
127
-
128
- Would you run your agent system in critical environments? The answer is probably no, since with most frameworks one dead endpoint or uncatched exception will break the whole agent system.
129
-
130
- Flock uses Temporal as its workflow engine which comes with battle-hardened retry, failure, exception options.
131
-
132
- This production-readiness is achieved through several key design decisions:
133
- - Temporal workflow engine for durability and reliability
134
- - Strong typing for predictable behavior
135
- - Modular architecture for maintainability
136
- - Built-in monitoring and debugging capabilities
137
-
138
- ## Core Features
139
-
140
- - **Declarative Agent System**: Define agents with clear input/output specifications and optional tool capabilities
141
- - **Temporal Workflow Integration**: Built-in support for durable execution and state management using Temporal
142
- - **Tool Integration**: Easy integration of external tools like web search, code evaluation, and math computation
143
- - **Type Safety**: Strong typing support for agent inputs and outputs
144
- - **DSPy Integration**: Seamless integration with DSPy for LLM interactions
145
- - **Flexible Architecture**: Support for agent chaining, hand-offs, and complex workflows
146
-
147
- ## Architecture and Flow
148
-
149
- ![alt text](docs/img/charts/agent_workflow_inv.png)
150
-
151
-
152
- ![alt text](docs/img/charts/core_architecture_inv.png)
153
-
154
- ## Requirements
155
-
156
- Nothing. Temporal is not needed for development but recommended
157
-
158
- Either clone https://github.com/temporalio/docker-compose and up the compose
159
-
160
- or install the temporal cli
161
-
162
- https://docs.temporal.io/cli
163
-
164
- ## Installation
165
-
166
- ```bash
167
- pip install flock
168
- ```
169
-
170
- ## Quick Start
171
-
172
- Here's a simple example of creating and using an agent:
173
-
174
- ```python
175
- import asyncio
176
- from flock.core.agents.declarative_agent import DeclarativeAgent
177
- from flock.core.flock import Flock
178
-
179
- async def main():
180
- # Initialize Flock
181
- agent_runner = Flock()
182
-
183
- # Create a simple agent
184
- agent = DeclarativeAgent(
185
- name="blog_title_agent",
186
- input="blog_idea",
187
- output="funny_blog_title",
188
- )
189
- agent_runner.add_agent(agent)
190
-
191
- # Run the agent
192
- result = await agent_runner.run_async(
193
- start_agent=agent,
194
- input="a blog about cats",
195
- local_debug=True,
196
- )
197
- print(result)
198
-
199
- if __name__ == "__main__":
200
- asyncio.run(main())
201
- ```
202
-
203
- ## Web Application
204
-
205
- ![alt text](docs/img/app.png)
206
-
207
- Flock comes with a built-in web interface for managing and monitoring your agents. The web app provides a rich, interactive environment for working with your agent systems.
208
-
209
- TODO: Expand
210
-
211
- ### Running the Web App
212
-
213
- ```bash
214
- # After installing flock
215
- flock
216
- # Or with uv
217
- uv run flock
218
- ```
219
-
220
- ### Features
221
-
222
- - **Dashboard**: Overview of your agent systems and their status
223
- - **Agent Management**:
224
- - List and filter agents
225
- - View agent details and configuration
226
- - Monitor production readiness
227
- - Track agent history
228
- - **Agent Systems**: Manage complex agent workflows and interactions
229
- - **History**: View execution history and results
230
- - **Tools**: Access and manage available tools
231
- - **Playground**: Interactive environment for testing agents
232
- - **Settings**: Configure system preferences and integrations
233
-
234
- ### Technical Details
235
-
236
- The web application is built with:
237
- - FastHTML for UI components
238
- - MonsterUI for enhanced UI elements
239
- - Interactive features using D3.js and interact.js
240
- - Real-time updates and monitoring
241
- - Responsive design for different screen sizes
242
-
243
- ### Interface Structure
244
-
245
- ```
246
- Web Interface
247
- ├── Sidebar Navigation
248
- │ ├── Dashboard
249
- │ ├── Agents
250
- │ ├── Agent Systems
251
- │ ├── History
252
- │ ├── Tools
253
- │ ├── Playground
254
- │ └── Settings
255
- ├── Main Content Area
256
- │ ├── Agent List
257
- │ └── Agent Details
258
- └── Interactive Features
259
- ├── Theme Switching
260
- ├── Search Functionality
261
- └── Real-time Updates
262
- ```
263
-
264
- ## Advanced Usage
265
-
266
- ### Agents with Tools
267
-
268
- Agents can use tools to interact with external systems:
269
-
270
- ```python
271
- from flock.core.tools import basic_tools
272
-
273
- agent = DeclarativeAgent(
274
- name="research_agent",
275
- input="research_topic",
276
- output="research_result",
277
- tools=[basic_tools.web_search_tavily],
278
- )
279
- ```
280
-
281
- ### Type-Safe Outputs
282
-
283
- Define complex output types for structured responses:
284
-
285
- ```python
286
- agent = DeclarativeAgent(
287
- name="analysis_agent",
288
- input="long_text",
289
- output="""
290
- title: str,
291
- headings: list[str],
292
- entities_and_metadata: list[dict[str, str]],
293
- type: Literal['news', 'blog', 'opinion piece', 'tweet']
294
- """,
295
- )
296
- ```
297
-
298
- ### Agent Chaining
299
-
300
- Create chains of agents that can hand off tasks:
301
-
302
- ```python
303
- # First agent in chain
304
- project_plan_agent = DeclarativeAgent(
305
- name="project_plan_agent",
306
- input="project_idea",
307
- output="catchy_project_name, project_pitch, project_plan_headings: list[str]",
308
- tools=[basic_tools.web_search_tavily, basic_tools.code_eval],
309
- )
310
-
311
- # Second agent in chain
312
- content_agent = DeclarativeAgent(
313
- name="content_agent",
314
- input="context,project_plan_agent.project_plan_headings.items",
315
- output="project_plan_heading, project_plan_content_for_heading",
316
- )
317
-
318
- # Set up hand-off
319
- project_plan_agent.hand_off = content_agent
320
- ```
321
-
322
- ## Core Components
323
-
324
- ### Flock Class
325
-
326
- The main orchestrator that manages agent creation and execution:
327
- - Handles agent registration
328
- - Manages workflow execution
329
- - Supports both local debugging and distributed execution
330
-
331
- ### DeclarativeAgent
332
-
333
- Base class for creating agents with:
334
- - Input/output specifications
335
- - Tool integration
336
- - Type validation
337
- - Hand-off capabilities
338
-
339
- ### Workflow System
340
-
341
- Built on Temporal for:
342
- - Durable execution
343
- - State management
344
- - Error handling
345
- - Activity tracking
346
-
347
- ### Tools
348
-
349
- Built-in tools include:
350
- - Web search (via Tavily)
351
- - Math evaluation
352
- - Code execution
353
- - Extensible tool system for custom integrations
354
-
355
- ## Architecture
356
-
357
- ```
358
- Flock Framework
359
- ├── Core
360
- │ ├── Agents
361
- │ │ ├── DeclarativeAgent
362
- │ │ └── Agent Registry
363
- │ ├── Tools
364
- │ │ └── Basic Tools
365
- │ └── Flock Manager
366
- ├── Workflow
367
- │ ├── Activities
368
- │ ├── Temporal Setup
369
- │ └── Workflow Definitions
370
- └── App
371
- └── Components
372
- ```
373
-
374
- ## Development
375
-
376
- ### Prerequisites
377
-
378
- - Python 3.12+
379
- - Temporal server running locally (for workflow features)
380
- - Required API keys (e.g., Tavily for web search)
381
-
382
- ### Setup
383
-
384
- 1. Clone the repository:
385
- ```bash
386
- git clone https://github.com/yourusername/flock.git
387
- cd flock
388
- ```
389
-
390
- 2. Create a virtual environment:
391
- ```bash
392
- python -m venv .venv
393
- source .venv/bin/activate # On Windows: .venv\Scripts\activate
394
- ```
395
-
396
- 3. Install dependencies:
397
- ```bash
398
- pip install -e .
399
- ```
400
-
401
- ### Running Tests
402
-
403
- ```bash
404
- pytest tests/
405
- ```
406
-
407
- ## Contributing
408
-
409
- Contributions are welcome! Please feel free to submit a Pull Request.
410
-
411
- ## License
412
-
413
- This project is licensed under the terms of the LICENSE file included in the repository.
414
-
415
- ## Acknowledgments
416
-
417
- - Built with [DSPy](https://github.com/stanfordnlp/dspy)
418
- - Uses [Temporal](https://temporal.io/) for workflow management
419
- - Integrates with [Tavily](https://tavily.com/) for web search capabilities
420
- - Web interface built with FastHTML and MonsterUI
421
-
422
- ## Evolution & Future Direction
423
-
424
- Flock was born from the realization that current agent frameworks often prioritize flexibility at the cost of reliability and maintainability. The framework's design decisions reflect this focus:
425
-
426
- ### Why Declarative?
427
- The declarative approach wasn't just a stylistic choice - it was a deliberate decision to separate what agents do from how they do it. This separation means:
428
- - Agents can be optimized independently of their interface
429
- - Different LLM backends can be swapped without changing agent definitions
430
- - Testing and validation become straightforward
431
- - Integration with existing systems is simplified
432
-
433
- ### Why Temporal?
434
- Using Temporal as the workflow engine was crucial for production reliability:
435
- - Automatic retry on failures
436
- - Built-in state management
437
- - Scalable execution
438
- - Detailed execution history
439
- - Production-grade monitoring
440
-
441
- ### Future Plans
442
- The framework is actively evolving with several key areas of focus:
443
- - Enhanced type system for more complex agent interactions
444
- - Expanded tool ecosystem
445
- - Improved optimization capabilities
446
- - Advanced monitoring and debugging features
447
- - Extended testing and validation tools
448
-
449
- Join us in building the future of reliable, production-ready AI agent systems!
@@ -1,48 +0,0 @@
1
- flock/__init__.py,sha256=xbfYMDyjxWYPIzfiMjuuA7zMST-cPVU3wsfFm8kPuJM,129
2
- flock/agents/__init__.py,sha256=pIcDAbFNP6CX3UH0W5tT1WZ06AW9RH1d1h9VTkCl-fI,95
3
- flock/agents/batch_agent.py,sha256=MIet5iGDuW5OmHdCas3DuLt7R4e0YQa7eDqdJ5oQAuI,8282
4
- flock/agents/declarative_agent.py,sha256=KHdobQOpCLJQqBY4gWL2tx6hYI2k_yjEal5RoZp2Uic,7560
5
- flock/agents/loop_agent.py,sha256=2ajHqNWoRyStGoqLKgkaCFcPCD-EPSyr0RHGFsM5K8I,7392
6
- flock/agents/trigger_agent.py,sha256=4LpfJ7xgDGAZXjS7_tPfMfLmbZwVLOe8YhikoZOg_og,8224
7
- flock/agents/user_agent.py,sha256=PexPzGY9S3tmm0s8WvdKf8C89ONMJdpO8tvw3zRpCjo,8575
8
- flock/app/hive_app.py,sha256=vNyZ3I8PZ_M-CO7joc9XBqdBOEKrxP761AQKX_Fzkv4,2621
9
- flock/app/components/__init__.py,sha256=wEOcF89JLUdjrOXsODZ-iADxasHBluaW7U8IxxIX3Ak,369
10
- flock/app/components/history_grid.py,sha256=kbUNdHq_DlhYM2zy_j1kOksvEEhyq-68YnJmFb3CLb0,5629
11
- flock/app/components/history_grid_alt.py,sha256=V2iJ53aPEpb2_U4Eaat8g0LqgTG3xaCWBXCaUR7ZQWk,6739
12
- flock/app/components/sidebar.py,sha256=WF_69gie1z7Wjfbdt7rESuhk4wjPle0z8P8IEVGeUog,558
13
- flock/app/components/theme.py,sha256=tBOi0Fgewke-l3Ifp-An-HRNEsinEFxtX1xYb8w62PE,201
14
- flock/app/components/util.py,sha256=u_kAo1L_hF0LiHm4gdkRxJUlWJWPU3fmh8o3ZnYNec0,415
15
- flock/app/components/charts/agent_workflow.py,sha256=XVxMnHsx8YY5jPQ7wbp_36dMPxw3dTkwH1aN3e-Cxrg,10862
16
- flock/app/components/charts/core_architecture.py,sha256=YqENUkIR8913JvHuYfY-V2vymelDJkH1wZkEckmEqY4,10865
17
- flock/app/components/charts/tool_system.py,sha256=ExrtqBrEkoXiVCHo424NB3TeMhRb3V_8L3ZIOBiDDvM,10384
18
- flock/app/html/d3.html,sha256=Wb1dFBmqXeiH3Ol2g3GeyPkvlyGsoOKSUOaEk3_2uUw,5404
19
- flock/app/modules/__init__.py,sha256=DrK6C1UJpKJt980WqpQPN-w3dyslwfRp4GGK8AefJlg,279
20
- flock/app/modules/about.py,sha256=BZT6beln4opwk4bhbn6wi1oLQTezcdg3vHmEM7OiTeA,438
21
- flock/app/modules/agent_detail.py,sha256=JBuAhtTpnrxbq8n0VeQM9FNMd1jZ3iiMQzp1aehkRvo,3128
22
- flock/app/modules/agent_list.py,sha256=-f6qlNzJkH6Hhd306-Mp1JrWkZQjZf1xUyCzKRXob2Q,2311
23
- flock/app/modules/playground.py,sha256=CiqrDLUd30eVdoyWsQNCGm-Qsf-O3GE7vvyv7jOamMY,9980
24
- flock/app/modules/settings.py,sha256=HmVzoV6A6QjYdmMfw4vpF1w8V5TIqRusQhQQhEQCQKw,2970
25
- flock/core/__init__.py,sha256=tSc7Ix_UVOqsc7VTkPq7-3wGUPbRUeYoLIMADnpisGo,291
26
- flock/core/agent.py,sha256=TIYlz5hX-ocd7ag1Ixa9RU5i9B59R-tEb11_qDYYj40,6445
27
- flock/core/agent_registry.py,sha256=OegRMXbE7ebptnF_PcEIewjcNk1OUOxx_2h2K8-1ubc,5672
28
- flock/core/context.py,sha256=s-Nci1Qp1px9SUwA5Xx66VvIDFlMA1_jcsNaJbsHGuM,11454
29
- flock/core/context_vars.py,sha256=iP3RnOP0YJtPpMSwbixbpxOm7PmzhiLPJdqw6INRVqc,242
30
- flock/core/flock.py,sha256=Fa4VrjjniwIxrBaDA9zco6lfz0LlqYkQckp2xLU__fE,8241
31
- flock/core/serializable.py,sha256=mbsNDwTD-3bBUzfAi7yXR55VhGbYt0XZq44Me1wtBIs,7404
32
- flock/core/config/declarative_agent_config.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- flock/core/handoff/handoff_base.py,sha256=iXHhpGojrLT3nUGWLuGog5EjsPq50GJ2aKV-AmRRO-I,267
34
- flock/core/logging/__init__.py,sha256=nYatDGaN5pSyu2eudnhREbS7WRIKFR7ysMTtL7cfupU,605
35
- flock/core/logging/error_handler.py,sha256=cw2XKGMi-O1HtGjN0bbB46onolW0aAygX3qu2eqB_IE,2602
36
- flock/core/logging/formatters.py,sha256=Z_wHK7qjIPW2oEFcqkSZm0-ibHv4AizbSZSStsRTSJ0,4747
37
- flock/core/logging/handlers.py,sha256=C6-P10RuZ_y2odtRipOwCv5r1ezIWBvNnMKcWz6onQ4,4235
38
- flock/core/logging/logger.py,sha256=w0TMb1jRw25FJKGhcmabXdXKZylubeNDJr5cR2TWBIk,4234
39
- flock/core/tools/basic_tools.py,sha256=9Qj_Nl5QACvHeWSt6k9pfBEcBqsO--D6XcSuiJWF1Rc,2082
40
- flock/workflow/activities.py,sha256=YZ0YYJTYPSmoTkpiY7x_pzwY3OpkkWm3ye9g6n-bFO4,5398
41
- flock/workflow/agent_activities.py,sha256=Shwiphd5Yi3VwbQN9SCuEsuhe6zJxIn0gBwMIpRZh-8,1134
42
- flock/workflow/temporal_setup.py,sha256=if3fmdy9cxoKGOZlbIfizLrZBYRGn2soMOBYLtP1mPI,1126
43
- flock/workflow/workflow.py,sha256=JTWFGE2_JltOd2PPJXlYfSeBlwbTQqRKLMszVdeqia0,1813
44
- flock_core-0.1.1.dist-info/METADATA,sha256=sy9f6S-CEemZi0whRjOjlcPy4wvrU68yWVCiKUAilsU,13656
45
- flock_core-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
46
- flock_core-0.1.1.dist-info/entry_points.txt,sha256=BoHLk1jgBHMsiQNA8h6lEe8B-dcq3Hqh3sbJGSmavZs,51
47
- flock_core-0.1.1.dist-info/licenses/LICENSE,sha256=eukczQf9y9W2_CLyGK-S06qMcU5zkTF39gJCjspsDA0,1093
48
- flock_core-0.1.1.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- flock = flock.app.flock_app:main