flock-core 0.5.4__py3-none-any.whl → 0.5.6__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.
- flock/agent.py +153 -17
- flock/components.py +36 -0
- flock/dashboard/collector.py +2 -0
- flock/dashboard/static_v2/assets/index-DFRnI_mt.js +1 -1
- flock/dashboard/static_v2/index.html +3 -3
- flock/engines/dspy_engine.py +41 -3
- flock/engines/examples/__init__.py +6 -0
- flock/engines/examples/simple_batch_engine.py +61 -0
- flock/frontend/README.md +4 -4
- flock/frontend/docs/DESIGN_SYSTEM.md +1 -1
- flock/frontend/package-lock.json +2 -2
- flock/frontend/package.json +1 -1
- flock/frontend/src/components/settings/SettingsPanel.css +1 -1
- flock/frontend/src/components/settings/ThemeSelector.tsx +2 -2
- flock/frontend/src/services/indexeddb.ts +1 -1
- flock/frontend/src/styles/variables.css +1 -1
- flock/orchestrator.py +500 -140
- flock/orchestrator_component.py +686 -0
- flock/runtime.py +3 -0
- {flock_core-0.5.4.dist-info → flock_core-0.5.6.dist-info}/METADATA +69 -3
- {flock_core-0.5.4.dist-info → flock_core-0.5.6.dist-info}/RECORD +24 -21
- {flock_core-0.5.4.dist-info → flock_core-0.5.6.dist-info}/WHEEL +0 -0
- {flock_core-0.5.4.dist-info → flock_core-0.5.6.dist-info}/entry_points.txt +0 -0
- {flock_core-0.5.4.dist-info → flock_core-0.5.6.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flock-core
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.6
|
|
4
4
|
Summary: Flock: A declrative framework for building and orchestrating AI agents.
|
|
5
5
|
Author-email: Andre Ratzenberger <andre.ratzenberger@whiteduck.de>
|
|
6
6
|
License: MIT
|
|
@@ -57,6 +57,8 @@ Flock is a production-focused framework for orchestrating AI agents through **de
|
|
|
57
57
|
**Quick links:**
|
|
58
58
|
- **[Getting Started](https://whiteducksoftware.github.io/flock/getting-started/installation/)** - Installation and first steps
|
|
59
59
|
- **[Tutorials](https://whiteducksoftware.github.io/flock/tutorials/)** - Step-by-step learning path
|
|
60
|
+
- [Custom Engines: Emoji Vibes & Batch Brews](https://whiteducksoftware.github.io/flock/tutorials/custom-engines/)
|
|
61
|
+
- [Custom Agent Components: Foreshadow & Hype](https://whiteducksoftware.github.io/flock/tutorials/custom-agent-components/)
|
|
60
62
|
- **[User Guides](https://whiteducksoftware.github.io/flock/guides/)** - In-depth feature documentation
|
|
61
63
|
- **[API Reference](https://whiteducksoftware.github.io/flock/reference/api/)** - Complete API documentation
|
|
62
64
|
- **[Roadmap](https://whiteducksoftware.github.io/flock/about/roadmap/)** - What's coming in v1.0
|
|
@@ -482,13 +484,77 @@ await flock.run_until_idle()
|
|
|
482
484
|
# Total time: ~1x single execution (parallel)
|
|
483
485
|
```
|
|
484
486
|
|
|
487
|
+
### Agent Components (Agent Lifecycle Hooks)
|
|
488
|
+
|
|
489
|
+
**Extend agent behavior through composable lifecycle hooks:**
|
|
490
|
+
|
|
491
|
+
Agent components let you inject custom logic at specific points in an agent's execution without modifying core agent code:
|
|
492
|
+
|
|
493
|
+
```python
|
|
494
|
+
from flock.components import AgentComponent
|
|
495
|
+
|
|
496
|
+
# Custom component: Log inputs/outputs
|
|
497
|
+
class LoggingComponent(AgentComponent):
|
|
498
|
+
async def on_pre_evaluate(self, agent, ctx, inputs):
|
|
499
|
+
logger.info(f"Agent {agent.name} evaluating: {inputs}")
|
|
500
|
+
return inputs # Pass through unchanged
|
|
501
|
+
|
|
502
|
+
async def on_post_evaluate(self, agent, ctx, inputs, result):
|
|
503
|
+
logger.info(f"Agent {agent.name} produced: {result}")
|
|
504
|
+
return result
|
|
505
|
+
|
|
506
|
+
# Attach to any agent
|
|
507
|
+
analyzer = (
|
|
508
|
+
flock.agent("analyzer")
|
|
509
|
+
.consumes(Data)
|
|
510
|
+
.publishes(Report)
|
|
511
|
+
.with_utilities(LoggingComponent())
|
|
512
|
+
)
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**Built-in components**: Rate limiting, caching, metrics collection, budget tracking, guardrails
|
|
516
|
+
|
|
517
|
+
**📖 [Learn more: Agent Components Guide](https://whiteducksoftware.github.io/flock/guides/components/)**
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
### Orchestrator Components (Orchestrator Lifecycle Hooks)
|
|
522
|
+
|
|
523
|
+
**Extend orchestrator behavior through composable lifecycle hooks:**
|
|
524
|
+
|
|
525
|
+
Orchestrator components let you inject custom logic into the orchestrator's scheduling pipeline:
|
|
526
|
+
|
|
527
|
+
```python
|
|
528
|
+
from flock.orchestrator_component import OrchestratorComponent, ScheduleDecision
|
|
529
|
+
|
|
530
|
+
# Custom component: Skip scheduling during maintenance window
|
|
531
|
+
class MaintenanceWindowComponent(OrchestratorComponent):
|
|
532
|
+
async def on_before_schedule(self, orch, artifact, agent, subscription):
|
|
533
|
+
if self.is_maintenance_window():
|
|
534
|
+
logger.info(f"Deferring {agent.name} during maintenance")
|
|
535
|
+
return ScheduleDecision.DEFER
|
|
536
|
+
return ScheduleDecision.CONTINUE
|
|
537
|
+
|
|
538
|
+
# Add to orchestrator
|
|
539
|
+
flock = Flock("openai/gpt-4.1")
|
|
540
|
+
flock.add_component(MaintenanceWindowComponent())
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
**Built-in components**:
|
|
544
|
+
- `CircuitBreakerComponent` - Prevent runaway agent execution
|
|
545
|
+
- `DeduplicationComponent` - Skip duplicate artifact/agent processing
|
|
546
|
+
|
|
547
|
+
**8 Lifecycle Hooks**: Artifact publication, scheduling decisions, artifact collection, agent scheduling, idle/shutdown
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
485
551
|
### Production Safety Features
|
|
486
552
|
|
|
487
553
|
**Built-in safeguards prevent common production failures:**
|
|
488
554
|
|
|
489
555
|
```python
|
|
490
|
-
# Circuit breakers prevent runaway costs
|
|
491
|
-
flock = Flock("openai/gpt-4.1"
|
|
556
|
+
# Circuit breakers prevent runaway costs (via OrchestratorComponent)
|
|
557
|
+
flock = Flock("openai/gpt-4.1") # Auto-adds CircuitBreakerComponent(max_iterations=1000)
|
|
492
558
|
|
|
493
559
|
# Feedback loop protection
|
|
494
560
|
critic = (
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
flock/__init__.py,sha256=fvp4ltfaAGmYliShuTY_XVIpOUN6bMXbWiBnwb1NBoM,310
|
|
2
|
-
flock/agent.py,sha256=
|
|
2
|
+
flock/agent.py,sha256=hJY9oT16u-TnP3BoXsm6y_-tnRShHwYuz_EPAe48AkA,48049
|
|
3
3
|
flock/artifact_collector.py,sha256=8rsg5NzmXeXKNT07TqX1_Z6aAGud2dXKzvS0jhjX3gQ,6372
|
|
4
4
|
flock/artifacts.py,sha256=3vQQ1J7QxTzeQBUGaNLiyojlmBv1NfdhFC98-qj8fpU,2541
|
|
5
5
|
flock/batch_accumulator.py,sha256=YcZSpdYMhm8wAGqKEF49NJ_Jl2HZX78NrJYqfyHqTuE,8003
|
|
6
6
|
flock/cli.py,sha256=lPtKxEXnGtyuTh0gyG3ixEIFS4Ty6Y0xsPd6SpUTD3U,4526
|
|
7
|
-
flock/components.py,sha256=
|
|
7
|
+
flock/components.py,sha256=WDCOFSk_y69cncK5aAz7UAGZ1ErXdBzh_p0qW1eLmPM,7761
|
|
8
8
|
flock/correlation_engine.py,sha256=iGB6-G5F-B-pw-clLx4-pZEiUrK_Q2l3kOn4jtEO_kw,8103
|
|
9
9
|
flock/examples.py,sha256=eQb8k6EYBbUhauFuSN_0EIIu5KW0mTqJU0HM4-p14sc,3632
|
|
10
|
-
flock/orchestrator.py,sha256=
|
|
10
|
+
flock/orchestrator.py,sha256=EzS7K6ZTxfVzuincnK3NRc_sqkbiSYimbpJhKGj_mac,62900
|
|
11
|
+
flock/orchestrator_component.py,sha256=jHYKv-58Rsu3Qsa6QYEx4iMWyJfpSqjowGZWfv-BKDI,25017
|
|
11
12
|
flock/registry.py,sha256=s0-H-TMtOsDZiZQCc7T1tYiWQg3OZHn5T--jaI_INIc,4786
|
|
12
|
-
flock/runtime.py,sha256=
|
|
13
|
+
flock/runtime.py,sha256=uEq_zpCd--zqVAGU95uQt9QXqp2036iWo2lRr1JGlM8,8651
|
|
13
14
|
flock/service.py,sha256=JDdjjPTPH6NFezAr8x6svtqxIGXA7-AyHS11GF57g9Q,11041
|
|
14
15
|
flock/store.py,sha256=H6z1_y5uDp_4UnHWqrxNksyoSGlzeVTgLY3Sv-guSTU,45793
|
|
15
16
|
flock/subscription.py,sha256=0fqjGVAr-3u1azSsXJ-xVjnUgSSYVO2a0Gd_zln2tZA,5422
|
|
@@ -17,7 +18,7 @@ flock/utilities.py,sha256=bqTPnFF6E-pDqx1ISswDNEzTU2-ED_URlkyKWLjF3mU,12109
|
|
|
17
18
|
flock/visibility.py,sha256=Cu2PMBjRtqjiWzlwHLCIC2AUFBjJ2augecG-jvK8ky0,2949
|
|
18
19
|
flock/api/themes.py,sha256=BOj1e0LHx6BDLdnVdXh1LKsbQ_ZeubH9UCoj08dC1yc,1886
|
|
19
20
|
flock/dashboard/__init__.py,sha256=_W6Id_Zb7mkSz0iHY1nfdUqF9p9uV_NyHsU7PFsRnFI,813
|
|
20
|
-
flock/dashboard/collector.py,sha256=
|
|
21
|
+
flock/dashboard/collector.py,sha256=ucH76Fp_MKs1sDgwHXzzqe1qmGljiX1DQibPExHRiqk,21765
|
|
21
22
|
flock/dashboard/events.py,sha256=ICqpBKE68HjevJg7GAT7rrUbPV8Adkird34ZC45_oYA,7679
|
|
22
23
|
flock/dashboard/graph_builder.py,sha256=jdiaruce5uRybndlA4aiOXW-gKkHeGtnndzYQ1WyU9Y,32006
|
|
23
24
|
flock/dashboard/launcher.py,sha256=dCfwaeMLtyIkik3aVSEsbBdABS5ADRlKWYkih7sF5hM,8196
|
|
@@ -25,20 +26,22 @@ flock/dashboard/service.py,sha256=_jyHQ_hC9sFgj8mwtuW2r8labZ3NsBJ-1FYcKB0qq9E,52
|
|
|
25
26
|
flock/dashboard/websocket.py,sha256=_DCZApJPXc8OQnxFDFS9TA9ozq7kM73QByRj-_a8n-8,9508
|
|
26
27
|
flock/dashboard/models/__init__.py,sha256=T4Yz8IXMm7lBqa2HLDSv7WJBtaKcdZIlTrz6GHNFZxs,68
|
|
27
28
|
flock/dashboard/models/graph.py,sha256=oQAGAVMV32tim8xscUxZ9nFOci0RvryjdPf1sJgiGxQ,5402
|
|
28
|
-
flock/dashboard/static_v2/index.html,sha256=
|
|
29
|
-
flock/dashboard/static_v2/assets/index-DFRnI_mt.js,sha256=
|
|
29
|
+
flock/dashboard/static_v2/index.html,sha256=0KNfWwmpr0JmVNbalnsaQta0y3XlVhOQ_HSts2LuU3A,423
|
|
30
|
+
flock/dashboard/static_v2/assets/index-DFRnI_mt.js,sha256=qeezaWLISr_EKNBBh8v0jzspd2KRcz8jW1r0p7z0Ht0,764860
|
|
30
31
|
flock/dashboard/static_v2/assets/index-fPLNdmp1.css,sha256=skpvfkkrlw7WbmBh7HN-rUKAtKP-gpuLUH4klUgFHT4,74529
|
|
31
32
|
flock/engines/__init__.py,sha256=waNyObJ8PKCLFZL3WUFynxSK-V47m559P3Px-vl_OSc,124
|
|
32
|
-
flock/engines/dspy_engine.py,sha256=
|
|
33
|
-
flock/
|
|
33
|
+
flock/engines/dspy_engine.py,sha256=Q2stZi6jMjjNlhXvzmW3m-Y8AdVo1QuNunbnxEZl6rA,52232
|
|
34
|
+
flock/engines/examples/__init__.py,sha256=cDAjF8_NPL7nhpwa_xxgnPYRAXZWppKE2HkxmL8LGAI,126
|
|
35
|
+
flock/engines/examples/simple_batch_engine.py,sha256=RZVuFJHr3j_4dJZc2AXUcjKZJdct0A7UKOSwWgVEKk4,2235
|
|
36
|
+
flock/frontend/README.md,sha256=0dEzu4UxacGfSstz9_R0KSeFWJ1vNRi0p-KLIay_TfU,26212
|
|
34
37
|
flock/frontend/index.html,sha256=BFg1VR_YVAJ_MGN16xa7sT6wTGwtFYUhfJhGuKv89VM,312
|
|
35
|
-
flock/frontend/package-lock.json,sha256=
|
|
36
|
-
flock/frontend/package.json,sha256=
|
|
38
|
+
flock/frontend/package-lock.json,sha256=vNOaISeq3EfEDDEsFYPWFaMsqypDgQIE0P_u6tzE0g4,150798
|
|
39
|
+
flock/frontend/package.json,sha256=SFwHeNZ0mS9p4_enSXZNMtuXxSM5cl52dzEr-MuRZ90,1253
|
|
37
40
|
flock/frontend/tsconfig.json,sha256=B9p9jXohg_jrCZAq5_yIHvznpeXHiHQkwUZrVE2oMRA,705
|
|
38
41
|
flock/frontend/tsconfig.node.json,sha256=u5_YWSqeNkZBRBIZ8Q2E2q6bospcyF23mO-taRO7glc,233
|
|
39
42
|
flock/frontend/vite.config.ts,sha256=M76uTsyn7fvHI4NhaGyizOGmml0fJvuhSljOQm_UvGs,566
|
|
40
43
|
flock/frontend/vitest.config.ts,sha256=xSWyGrBv2Cy_5eeZA68NCO5AXS6q8WKZXXzqu2JnXPY,244
|
|
41
|
-
flock/frontend/docs/DESIGN_SYSTEM.md,sha256=
|
|
44
|
+
flock/frontend/docs/DESIGN_SYSTEM.md,sha256=a7hbH7kQCOrOQu3CMTYthTZTrFCQUIRcqtXaYHMkPbo,48498
|
|
42
45
|
flock/frontend/src/App.tsx,sha256=3vwTT_WJP7OUb0LJDVMXfkb5hD-uZZmiGBK2wl1QgeM,5233
|
|
43
46
|
flock/frontend/src/main.tsx,sha256=sfWsPgNn5AyDH4LJJLTz2c5OwOPl0o4oi-FArpqc-W4,354
|
|
44
47
|
flock/frontend/src/vite-env.d.ts,sha256=tDjMtvUVN9uIgSCHe__Jhp0-nZiIV21pkcQuyOjaryw,344
|
|
@@ -112,9 +115,9 @@ flock/frontend/src/components/settings/AdvancedSettings.tsx,sha256=Ngw5jAIRn3ocX
|
|
|
112
115
|
flock/frontend/src/components/settings/AppearanceSettings.tsx,sha256=UHH4BcJ9-F-nRJEJf2rzmX0W-0hvmeKo6AYNF3lZPWE,6872
|
|
113
116
|
flock/frontend/src/components/settings/GraphSettings.tsx,sha256=qX1F4hnsxGcCbn3oHP7nsPPMLyETHG3UL55kJ_3tA-s,3815
|
|
114
117
|
flock/frontend/src/components/settings/MultiSelect.tsx,sha256=aFjk8pt18UFHIPh-MXxEepjh-haNYhxEwzMiewSKFbU,7005
|
|
115
|
-
flock/frontend/src/components/settings/SettingsPanel.css,sha256=
|
|
118
|
+
flock/frontend/src/components/settings/SettingsPanel.css,sha256=SUUfMHGXVxX8GDDQcb0f6v7ZG983tXa9pC6Xrwctep8,7062
|
|
116
119
|
flock/frontend/src/components/settings/SettingsPanel.tsx,sha256=62GXPCQzYdbk17XYVOx_vCeWlVyFZSxp3w0JTkp3z60,4392
|
|
117
|
-
flock/frontend/src/components/settings/ThemeSelector.tsx,sha256=
|
|
120
|
+
flock/frontend/src/components/settings/ThemeSelector.tsx,sha256=FqyRtWhN8vm6cxfPI1pxFCCuCFDb4YXrwzdufwrXFqM,10538
|
|
118
121
|
flock/frontend/src/components/settings/TracingSettings.tsx,sha256=zHZrUuVQzUANclHfvTndm50zHYX1y-LecFnrloh2Hkc,14224
|
|
119
122
|
flock/frontend/src/hooks/useKeyboardShortcuts.ts,sha256=Dsf64nPtJdW2kV-a-bBpaq1VXZkXyxpioBnI1WIGduM,5019
|
|
120
123
|
flock/frontend/src/hooks/useModulePersistence.test.ts,sha256=kqYlFSzqYK_0jGxeRTeXORZ2KTDo3MdByJ2t2ivbg20,14323
|
|
@@ -125,7 +128,7 @@ flock/frontend/src/services/api.ts,sha256=kNHBHvbSk50M3pUtwDMNYwco5Cd4AbQbGGHkpR
|
|
|
125
128
|
flock/frontend/src/services/graphService.test.ts,sha256=wftS4QX-Bw6hogTWXVYaV3F7z6AN94d7iI8jrMVwwkg,11493
|
|
126
129
|
flock/frontend/src/services/graphService.ts,sha256=MaFdj8S2l7UOkQBkACDv29BuroMy1vJEhliVnsYkmwM,1964
|
|
127
130
|
flock/frontend/src/services/indexeddb.test.ts,sha256=lY1JzyKRd4Kaw135JlO7njy5rpaAsRRXLM8SwYxDhAc,27452
|
|
128
|
-
flock/frontend/src/services/indexeddb.ts,sha256=
|
|
131
|
+
flock/frontend/src/services/indexeddb.ts,sha256=2sXodUZAp3jSiS-3a7Bwvkjdjp_Tc47bk5eR_1f9qqw,28703
|
|
129
132
|
flock/frontend/src/services/layout.test.ts,sha256=-KwUxWCum_Rsyc5NIpk99UB3prfAkMO5ksJULhjOiwA,16174
|
|
130
133
|
flock/frontend/src/services/layout.ts,sha256=5WzlOv7OBlQXiUxrv4l1JwaAfHbUK1C99JOT0fQCNRY,9503
|
|
131
134
|
flock/frontend/src/services/themeApplicator.ts,sha256=utRFw-45e1IEOrI6lHkB_E_-5kc2kFKbN-veAUdXiOM,5802
|
|
@@ -144,7 +147,7 @@ flock/frontend/src/store/uiStore.ts,sha256=H5aH8YfaxOTfm3zCrT9A1QdC2dnHJWPUUg8uV
|
|
|
144
147
|
flock/frontend/src/store/wsStore.ts,sha256=vKaGd6H7UONN7A-8tCTOgdH8X2LxrZmVbZ7hRnfGQ2c,936
|
|
145
148
|
flock/frontend/src/styles/index.css,sha256=HVMvVEMvlFk8_vqxBdt8CzkleXkV-oSUcQUzom588PM,231
|
|
146
149
|
flock/frontend/src/styles/scrollbar.css,sha256=OHH2nryMANNvuJBloG_t1BPY_BtKMSb36Df4q2X47Rk,1207
|
|
147
|
-
flock/frontend/src/styles/variables.css,sha256=
|
|
150
|
+
flock/frontend/src/styles/variables.css,sha256=18UzMGPn_GOKWa2eXe1u0lJLI4yRLM7LjONASATwo6Q,13884
|
|
148
151
|
flock/frontend/src/test/setup.ts,sha256=pG1mhRrywFboBf3VdL9ew62xGBxDxeQfChxZLjOK_mQ,36
|
|
149
152
|
flock/frontend/src/types/filters.ts,sha256=zPa4AvL9xudvB6RZsqJCllMoLTnvPuBhqU6vLeWO89Y,1041
|
|
150
153
|
flock/frontend/src/types/graph.ts,sha256=mz62owu0OXO-xbzCPX2_arRRv0_Kp79tj5Ek-TqdHhI,4615
|
|
@@ -527,8 +530,8 @@ flock/themes/zenburned.toml,sha256=UEmquBbcAO3Zj652XKUwCsNoC2iQSlIh-q5c6DH-7Kc,1
|
|
|
527
530
|
flock/themes/zenwritten-dark.toml,sha256=-dgaUfg1iCr5Dv4UEeHv_cN4GrPUCWAiHSxWK20X1kI,1663
|
|
528
531
|
flock/themes/zenwritten-light.toml,sha256=G1iEheCPfBNsMTGaVpEVpDzYBHA_T-MV27rolUYolmE,1666
|
|
529
532
|
flock/utility/output_utility_component.py,sha256=yVHhlIIIoYKziI5UyT_zvQb4G-NsxCTgLwA1wXXTTj4,9047
|
|
530
|
-
flock_core-0.5.
|
|
531
|
-
flock_core-0.5.
|
|
532
|
-
flock_core-0.5.
|
|
533
|
-
flock_core-0.5.
|
|
534
|
-
flock_core-0.5.
|
|
533
|
+
flock_core-0.5.6.dist-info/METADATA,sha256=HxIB8GkFjBRu-DTuN0zcIdOq0TPUnAqZJ4rKwkTuPyw,41805
|
|
534
|
+
flock_core-0.5.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
535
|
+
flock_core-0.5.6.dist-info/entry_points.txt,sha256=UQdPmtHd97gSA_IdLt9MOd-1rrf_WO-qsQeIiHWVrp4,42
|
|
536
|
+
flock_core-0.5.6.dist-info/licenses/LICENSE,sha256=U3IZuTbC0yLj7huwJdldLBipSOHF4cPf6cUOodFiaBE,1072
|
|
537
|
+
flock_core-0.5.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|