flock-core 0.2.18__py3-none-any.whl → 0.3.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.
- flock/__init__.py +39 -29
- flock/cli/assets/release_notes.md +111 -0
- flock/cli/constants.py +1 -0
- flock/cli/load_release_notes.py +23 -0
- flock/core/__init__.py +12 -1
- flock/core/context/context.py +10 -5
- flock/core/flock.py +61 -21
- flock/core/flock_agent.py +112 -442
- flock/core/flock_evaluator.py +49 -0
- flock/core/flock_factory.py +73 -0
- flock/core/flock_module.py +77 -0
- flock/{interpreter → core/interpreter}/python_interpreter.py +9 -1
- flock/core/logging/formatters/themes.py +1 -1
- flock/core/logging/logging.py +119 -15
- flock/core/mixin/dspy_integration.py +11 -8
- flock/core/registry/agent_registry.py +4 -2
- flock/core/tools/basic_tools.py +1 -1
- flock/core/util/cli_helper.py +41 -3
- flock/evaluators/declarative/declarative_evaluator.py +52 -0
- flock/evaluators/natural_language/natural_language_evaluator.py +66 -0
- flock/modules/callback/callback_module.py +86 -0
- flock/modules/memory/memory_module.py +235 -0
- flock/modules/memory/memory_parser.py +125 -0
- flock/modules/memory/memory_storage.py +736 -0
- flock/modules/output/output_module.py +194 -0
- flock/modules/performance/metrics_module.py +477 -0
- flock/themes/aardvark-blue.toml +1 -1
- {flock_core-0.2.18.dist-info → flock_core-0.3.1.dist-info}/METADATA +48 -2
- {flock_core-0.2.18.dist-info → flock_core-0.3.1.dist-info}/RECORD +32 -19
- {flock_core-0.2.18.dist-info → flock_core-0.3.1.dist-info}/WHEEL +0 -0
- {flock_core-0.2.18.dist-info → flock_core-0.3.1.dist-info}/entry_points.txt +0 -0
- {flock_core-0.2.18.dist-info → flock_core-0.3.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flock-core
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Declarative LLM Orchestration at Scale
|
|
5
5
|
Author-email: Andre Ratzenberger <andre.ratzenberger@whiteduck.de>
|
|
6
6
|
License-File: LICENSE
|
|
@@ -14,6 +14,7 @@ Requires-Dist: dspy==2.5.42
|
|
|
14
14
|
Requires-Dist: duckduckgo-search>=7.3.2
|
|
15
15
|
Requires-Dist: httpx>=0.28.1
|
|
16
16
|
Requires-Dist: loguru>=0.7.3
|
|
17
|
+
Requires-Dist: matplotlib>=3.10.0
|
|
17
18
|
Requires-Dist: msgpack>=1.1.0
|
|
18
19
|
Requires-Dist: opentelemetry-api>=1.30.0
|
|
19
20
|
Requires-Dist: opentelemetry-exporter-jaeger-proto-grpc>=1.21.0
|
|
@@ -21,13 +22,18 @@ Requires-Dist: opentelemetry-exporter-jaeger>=1.21.0
|
|
|
21
22
|
Requires-Dist: opentelemetry-exporter-otlp>=1.30.0
|
|
22
23
|
Requires-Dist: opentelemetry-instrumentation-logging>=0.51b0
|
|
23
24
|
Requires-Dist: opentelemetry-sdk>=1.30.0
|
|
25
|
+
Requires-Dist: pillow>=10.4.0
|
|
26
|
+
Requires-Dist: prometheus-client>=0.21.1
|
|
24
27
|
Requires-Dist: pydantic>=2.10.5
|
|
25
28
|
Requires-Dist: python-box>=7.3.2
|
|
26
29
|
Requires-Dist: python-decouple>=3.8
|
|
27
30
|
Requires-Dist: questionary>=2.1.0
|
|
28
31
|
Requires-Dist: rich>=13.9.4
|
|
32
|
+
Requires-Dist: sentence-transformers>=3.4.1
|
|
29
33
|
Requires-Dist: temporalio>=1.9.0
|
|
34
|
+
Requires-Dist: tiktoken>=0.8.0
|
|
30
35
|
Requires-Dist: toml>=0.10.2
|
|
36
|
+
Requires-Dist: tqdm>=4.67.1
|
|
31
37
|
Provides-Extra: all-tools
|
|
32
38
|
Requires-Dist: docling>=2.18.0; extra == 'all-tools'
|
|
33
39
|
Requires-Dist: markdownify>=0.14.1; extra == 'all-tools'
|
|
@@ -350,9 +356,49 @@ Super simple rules to remember:
|
|
|
350
356
|
1. Point the first agent to the next one using `hand_off`
|
|
351
357
|
2. Make sure their inputs and outputs match up
|
|
352
358
|
|
|
359
|
+
### Tools of the trade
|
|
360
|
+
|
|
361
|
+
Of couse no agent framework is complete without using tools.
|
|
362
|
+
Flock enables agents to use any python function you pass as tool or to use one of the plenty default tools
|
|
363
|
+
|
|
364
|
+
```python
|
|
365
|
+
bloggy = FlockAgent(
|
|
366
|
+
name="bloggy",
|
|
367
|
+
input="blog_idea: str|The topic to blog about",
|
|
368
|
+
output=(
|
|
369
|
+
"funny_blog_title: str|A catchy title for the blog, "
|
|
370
|
+
"blog_headers: list[str]|List of section headers for the blog"
|
|
371
|
+
"analysis_results: dict[str,Any] | Result of calculated analysis if necessary"
|
|
372
|
+
)
|
|
373
|
+
tools=[basic_tools.web_search_duckduckgo, basic_tools.code_eval],
|
|
374
|
+
)
|
|
375
|
+
|
|
376
|
+
result = flock.run(
|
|
377
|
+
input={"blog_idea": "A blog about cats, with an analysis how old the oldest cat became in days"},
|
|
378
|
+
start_agent=bloggy
|
|
379
|
+
)
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
These tools are available out of the box (needs `flock-core[tools]`):
|
|
383
|
+
|
|
384
|
+
- web_search_tavily
|
|
385
|
+
- web_search_duckduckgo
|
|
386
|
+
- get_web_content_as_markdown
|
|
387
|
+
- get_anything_as_markdown (uses docling and needs `flock-core[all-tools]`)
|
|
388
|
+
- evaluate_math
|
|
389
|
+
- code_eval
|
|
390
|
+
- get_current_time
|
|
391
|
+
- count_words
|
|
392
|
+
- extract_urls
|
|
393
|
+
- extract_numbers
|
|
394
|
+
- json_parse_safe
|
|
395
|
+
- save_to_file
|
|
396
|
+
- read_from_file
|
|
397
|
+
|
|
398
|
+
|
|
353
399
|
That's all there is to it! `bloggy` comes up with amazing headers, and `content_writer` turns them into full blog sections. No more writer's block! 🎉
|
|
354
400
|
|
|
355
|
-
And this is just the beginning - you can chain as many agents as you want. Maybe add a proofreader? Or an SEO optimizer? But let's not get ahead of ourselves! 😉
|
|
401
|
+
And this is just the beginning - you can chain as many agents as you want. Maybe add a proofreader? Or add memory? Or an SEO optimizer? But let's not get ahead of ourselves! 😉
|
|
356
402
|
|
|
357
403
|
So far we've barely scratched the surface of what flock has to offer, and we're currently hard at work building up the documentation for all the other super cool features Flock has up its sleeve! Stay tuned! 🚀
|
|
358
404
|
|
|
@@ -1,47 +1,60 @@
|
|
|
1
|
-
flock/__init__.py,sha256=
|
|
1
|
+
flock/__init__.py,sha256=9BfhaVhkV3ZadIXp6xpZYlt8_N_OBmQSxxJHwpXYPic,1867
|
|
2
2
|
flock/config.py,sha256=O5QJGlStf4DWSK4ovZsKw01ud4YK3_ij6Ay8sWU8ih0,1522
|
|
3
|
-
flock/cli/constants.py,sha256=
|
|
3
|
+
flock/cli/constants.py,sha256=UWshD25IGos5Ks4P9paGPalY8BXy9YynzHk6HB4xfOo,669
|
|
4
4
|
flock/cli/create_agent.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_DBwT0xhzIv4,7
|
|
5
5
|
flock/cli/create_flock.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_DBwT0xhzIv4,7
|
|
6
6
|
flock/cli/load_agent.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_DBwT0xhzIv4,7
|
|
7
7
|
flock/cli/load_examples.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_DBwT0xhzIv4,7
|
|
8
8
|
flock/cli/load_flock.py,sha256=3JdECvt5X7uyOG2vZS3-Zk5C5SI_84_QZjcsB3oJmfA,932
|
|
9
|
+
flock/cli/load_release_notes.py,sha256=qFcgUrMddAE_TP6x1P-6ZywTUjTknfhTDW5LTxtg1yk,599
|
|
9
10
|
flock/cli/settings.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_DBwT0xhzIv4,7
|
|
10
|
-
flock/
|
|
11
|
-
flock/core/
|
|
12
|
-
flock/core/
|
|
13
|
-
flock/core/
|
|
11
|
+
flock/cli/assets/release_notes.md,sha256=K-upUm5vuUuRSSU2FkMdgDfai_YlDk_vTCp0s4s2WO0,3419
|
|
12
|
+
flock/core/__init__.py,sha256=ZTp6qNY-kNH_Xn0xFfCAYceYqWFdahXYMm5wWPb30Go,501
|
|
13
|
+
flock/core/flock.py,sha256=4Kcnw39YiPRND6U8TWLZ0LyjNTykIk56VPruUEGwBrk,19116
|
|
14
|
+
flock/core/flock_agent.py,sha256=RzKX0GRrRJz16YbQFheMo8TqJPXOZSHWNloTbp35zwI,12229
|
|
15
|
+
flock/core/flock_evaluator.py,sha256=j7riJj_KsWoBnKmLiGp-U0CRhxDyJbgEdLGN26tfKm8,1588
|
|
16
|
+
flock/core/flock_factory.py,sha256=vyDq0eyFT4MyE_n2JyNU7YaFx2ljmjSDmZ07OIsmIOE,2694
|
|
17
|
+
flock/core/flock_module.py,sha256=VWFlBiY2RHZLTlGYfcchuT41M3m_JrZcmzw07u7KayM,2581
|
|
18
|
+
flock/core/context/context.py,sha256=fb7SsGAXmhQ1CvHV3_GihGiJG-4oLJ_DcexJ8vsrbHM,6371
|
|
14
19
|
flock/core/context/context_manager.py,sha256=qMySVny_dbTNLh21RHK_YT0mNKIOrqJDZpi9ZVdBsxU,1103
|
|
15
20
|
flock/core/context/context_vars.py,sha256=0Hn6fM2iNc0_jIIU0B7KX-K2o8qXqtZ5EYtwujETQ7U,272
|
|
16
21
|
flock/core/execution/local_executor.py,sha256=rnIQvaJOs6zZORUcR3vvyS6LPREDJTjaygl_Db0M8ao,952
|
|
17
22
|
flock/core/execution/temporal_executor.py,sha256=OF_uXgQsoUGp6U1ZkcuaidAEKyH7XDtbfrtdF10XQ_4,1675
|
|
23
|
+
flock/core/interpreter/python_interpreter.py,sha256=RaUMZuufsKBNQ4FAeSaOgUuxzs8VYu5TgUUs-xwaxxM,26376
|
|
18
24
|
flock/core/logging/__init__.py,sha256=Q8hp9-1ilPIUIV0jLgJ3_cP7COrea32cVwL7dicPnlM,82
|
|
19
|
-
flock/core/logging/logging.py,sha256=
|
|
25
|
+
flock/core/logging/logging.py,sha256=RigZwiu5gsLMqHwhplGkGrmw74xe8M-5KLGIBSsjouY,7620
|
|
20
26
|
flock/core/logging/telemetry.py,sha256=3E9Tyj6AUR6A5RlIufcdCdWm5BAA7tbOsCa7lHoUQaU,5404
|
|
21
27
|
flock/core/logging/trace_and_logged.py,sha256=5vNrK1kxuPMoPJ0-QjQg-EDJL1oiEzvU6UNi6X8FiMs,2117
|
|
22
28
|
flock/core/logging/formatters/enum_builder.py,sha256=LgEYXUv84wK5vwHflZ5h8HBGgvLH3sByvUQe8tZiyY0,981
|
|
23
29
|
flock/core/logging/formatters/theme_builder.py,sha256=Wnaal3HuUDA4HFg9tdql1BxYwK83ACOZBBQy-DXnxcA,17342
|
|
24
30
|
flock/core/logging/formatters/themed_formatter.py,sha256=6WO9RPr6Su05rJEX9bRXd8peE-QzGCQeO5veIjQH-Vc,21086
|
|
25
|
-
flock/core/logging/formatters/themes.py,sha256=
|
|
31
|
+
flock/core/logging/formatters/themes.py,sha256=80BRJJB0LZr11N0yQw2f8vdb_9179qjQO8PoeBaLMN0,10680
|
|
26
32
|
flock/core/logging/span_middleware/baggage_span_processor.py,sha256=gJfRl8FeB6jdtghTaRHCrOaTo4fhPMRKgjqtZj-8T48,1118
|
|
27
33
|
flock/core/logging/telemetry_exporter/base_exporter.py,sha256=rQJJzS6q9n2aojoSqwCnl7ZtHrh5LZZ-gkxUuI5WfrQ,1124
|
|
28
34
|
flock/core/logging/telemetry_exporter/file_exporter.py,sha256=nKAjJSZtA7FqHSTuTiFtYYepaxOq7l1rDvs8U8rSBlA,3023
|
|
29
35
|
flock/core/logging/telemetry_exporter/sqlite_exporter.py,sha256=CDsiMb9QcqeXelZ6ZqPSS56ovMPGqOu6whzBZRK__Vg,3498
|
|
30
|
-
flock/core/mixin/dspy_integration.py,sha256=
|
|
36
|
+
flock/core/mixin/dspy_integration.py,sha256=P5G4Y04nl5hFwFbJXCkQ-0TMR1L4skLL2IM_FlUjH_c,8364
|
|
31
37
|
flock/core/mixin/prompt_parser.py,sha256=eOqI-FK3y17gVqpc_y5GF-WmK1Jv8mFlkZxTcgweoxI,5121
|
|
32
|
-
flock/core/registry/agent_registry.py,sha256=
|
|
33
|
-
flock/core/tools/basic_tools.py,sha256=
|
|
38
|
+
flock/core/registry/agent_registry.py,sha256=TUClh9e3eA6YzZC1CMTlsTPvQeqb9jYHewi-zPpcWM8,4987
|
|
39
|
+
flock/core/tools/basic_tools.py,sha256=fI9r81_ktRiRhNLwT-jSJ9rkjl28LC1ZfL-njnno2iw,4761
|
|
34
40
|
flock/core/tools/dev_tools/github.py,sha256=a2OTPXS7kWOVA4zrZHynQDcsmEi4Pac5MfSjQOLePzA,5308
|
|
35
|
-
flock/core/util/cli_helper.py,sha256=
|
|
41
|
+
flock/core/util/cli_helper.py,sha256=IOl9r4cz_MJv_Bp5R8dhHX8f-unAqA9vDS6-0E90Vzk,49813
|
|
36
42
|
flock/core/util/hydrator.py,sha256=6qNwOwCZB7r6y25BZ--0PGofrAlfMaXbDKFQeP5NLts,11196
|
|
37
43
|
flock/core/util/input_resolver.py,sha256=g9vDPdY4OH-G7qjas5ksGEHueokHGFPMoLOvC-ngeLo,5984
|
|
38
44
|
flock/core/util/serializable.py,sha256=SymJ0YrjBx48mOBItYSqoRpKuzIc4vKWRS6ScTzre7s,2573
|
|
39
|
-
flock/
|
|
45
|
+
flock/evaluators/declarative/declarative_evaluator.py,sha256=f8ldgZZp94zC4CoGzBufKvbvtckCGBe9EHTOoAZfZK0,1695
|
|
46
|
+
flock/evaluators/natural_language/natural_language_evaluator.py,sha256=6nVEeh8_uwv_h-d3FWlA0GbzDzRtdhvxCGKirHtyvOU,2012
|
|
47
|
+
flock/modules/callback/callback_module.py,sha256=hCCw-HNYjK4aHnUQfvw26ZP1Q_jdlKb9kDh3BHzbCQA,2916
|
|
48
|
+
flock/modules/memory/memory_module.py,sha256=2grdmvw7FJWZvz0IjgASbDPCfyS1w4gWkRzOWtK7BFM,8214
|
|
49
|
+
flock/modules/memory/memory_parser.py,sha256=2S7CmVEsm22gD7-MiFj4318FTg8wd_jB-RKMwXI14WM,4369
|
|
50
|
+
flock/modules/memory/memory_storage.py,sha256=CNcLDMmvv0x7Z3YMKr6VveS_VCa7rKPw8l2d-XgqokA,27246
|
|
51
|
+
flock/modules/output/output_module.py,sha256=_Hid4ycGEl14m7GEsVGE9wp88SYkQ3eq_x4avUQcTWI,6985
|
|
52
|
+
flock/modules/performance/metrics_module.py,sha256=K5z5bizIjA4ZEUjBk5ShwTR9ZElR-Vmqa7H38dJ3z_0,16735
|
|
40
53
|
flock/platform/docker_tools.py,sha256=fpA7-6rJBjPOUBLdQP4ny2QPgJ_042nmqRn5GtKnoYw,1445
|
|
41
54
|
flock/platform/jaeger_install.py,sha256=MyOMJQx4TQSMYvdUJxfiGSo3YCtsfkbNXcAcQ9bjETA,2898
|
|
42
55
|
flock/themes/3024-day.toml,sha256=uOVHqEzSyHx0WlUk3D0lne4RBsNBAPCTy3C58yU7kEY,667
|
|
43
56
|
flock/themes/3024-night.toml,sha256=qsXUwd6ZYz6J-R129_Ao2TKlvvK60svhZJJjB5c8Tfo,1667
|
|
44
|
-
flock/themes/aardvark-blue.toml,sha256=
|
|
57
|
+
flock/themes/aardvark-blue.toml,sha256=5ZgsxP3pWLPN3yJ2Wd9ErCo7fy_VJpIfje4kriDKlqo,1667
|
|
45
58
|
flock/themes/abernathy.toml,sha256=T-FeYc_Nkz4dXxj-1SwKhr1BpBPg0bmqAt2Wve9cqUo,1667
|
|
46
59
|
flock/themes/adventure.toml,sha256=sgT63QdUaoq9yatWTnm9H5jp7G6DTsECvfnVon_4LK4,1658
|
|
47
60
|
flock/themes/adventuretime.toml,sha256=ZIrnONaakvI4uqVWfMF4U7OhxtpA-uwzxzlpBgFSQu8,1664
|
|
@@ -380,8 +393,8 @@ flock/workflow/activities.py,sha256=2zcYyDoCuYs9oQbnhLjCzBUdEi7d5IEIemKJ7TV_B8w,
|
|
|
380
393
|
flock/workflow/agent_activities.py,sha256=NhBZscflEf2IMfSRa_pBM_TRP7uVEF_O0ROvWZ33eDc,963
|
|
381
394
|
flock/workflow/temporal_setup.py,sha256=VWBgmBgfTBjwM5ruS_dVpA5AVxx6EZ7oFPGw4j3m0l0,1091
|
|
382
395
|
flock/workflow/workflow.py,sha256=I9MryXW_bqYVTHx-nl2epbTqeRy27CAWHHA7ZZA0nAk,1696
|
|
383
|
-
flock_core-0.
|
|
384
|
-
flock_core-0.
|
|
385
|
-
flock_core-0.
|
|
386
|
-
flock_core-0.
|
|
387
|
-
flock_core-0.
|
|
396
|
+
flock_core-0.3.1.dist-info/METADATA,sha256=lctsSseYD8ZeFnzowlqwFLw9uJf6wTe_asp-ynomji4,20398
|
|
397
|
+
flock_core-0.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
398
|
+
flock_core-0.3.1.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
|
|
399
|
+
flock_core-0.3.1.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
|
|
400
|
+
flock_core-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|