flock-core 0.4.503__py3-none-any.whl → 0.4.505__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.

@@ -250,6 +250,7 @@ loguru_logger.add(
250
250
  colorize=True,
251
251
  format=custom_format,
252
252
  )
253
+ logging.basicConfig(level=LOG_LEVELS["NO_LOGS"])
253
254
  # Optionally add a file handler, e.g.:
254
255
  # loguru_logger.add("logs/flock.log", rotation="100 MB", retention="30 days", level="DEBUG")
255
256
 
@@ -51,7 +51,7 @@ def init_console(clear_screen: bool = True, show_banner: bool = True):
51
51
  │ ▒█▀▀▀ █░░ █▀▀█ █▀▀ █░█ │
52
52
  │ ▒█▀▀▀ █░░ █░░█ █░░ █▀▄ │
53
53
  │ ▒█░░░ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀░▀ │
54
- ╰━━━━━━━━━━v{__version__}━━━━━━━━╯
54
+ ╰━━━━━━━━v{__version__}━━━━━━━━╯
55
55
  🦆 🐤 🐧 🐓
56
56
  """,
57
57
  justify="center",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flock-core
3
- Version: 0.4.503
3
+ Version: 0.4.505
4
4
  Summary: Declarative LLM Orchestration at Scale
5
5
  Author-email: Andre Ratzenberger <andre.ratzenberger@whiteduck.de>
6
6
  License-File: LICENSE
@@ -92,52 +92,80 @@ Description-Content-Type: text/markdown
92
92
  </p>
93
93
 
94
94
 
95
-
96
95
  ---
97
96
 
98
- **Tired of wrestling with paragraphs of prompt text just to get your AI agent to perform a specific, structured task?** 😫
99
97
 
100
- Enter **Flock**, the agent framework that lets you ditch the prompt-palaver and focus on **what** you want your agents to achieve through a **declarative approach**. Define your agent's inputs, outputs, and available tools using clear Python structures (including type hints!), and let Flock handle the complex LLM interactions and orchestration.
98
+ ## The Problem You Know Too Well
99
+
100
+ 🤯 **Prompt Hell**: Brittle 500-line prompts that break with every model update.
101
+ 💥 **System Failures**: One bad LLM response crashes your entire workflow
102
+ 🧪 **Testing Nightmares**: "How do I unit test a prompt?" (You don't.)
103
+ 🧪 **Measuring Quality**: "How do I know my prompts are close to optimal?" (You also don't.)
104
+ 📄 **Output Chaos**: Parsing unstructured LLM responses into reliable data
105
+ ⛓️ **Orchestration Limits**: Moving beyond simple chains and DAGs? Good luck
106
+ 🚀 **Production Gap**: Jupyter notebooks don't scale to enterprise systems
107
+
108
+ *After building dozens of AI systems for enterprise clients, we realized the tooling was fundamentally broken.*
109
+
110
+
111
+ **Build with agents, not against them.**
112
+
113
+
114
+ ## The Flock Solution
115
+
116
+ **What if you could just skip that 'prompt engineering' step?**
117
+
118
+ Flock is an agent framework for declarative AI workflows. You define what goes in and what should come out, the how is handled by the agent.
119
+ No brittle prompts. No guesswork. Just reliable, testable AI agents.
120
+
121
+
122
+ ✅ **Declarative Contracts**: Define inputs/outputs with Pydantic models. Flock handles the LLM complexity.
123
+ ⚡ **Built-in Resilience**: Automatic retries, state persistence, and workflow resumption via Temporal.io
124
+ 🧪 **Actually Testable**: Clear contracts make agents unit-testable like any other code
125
+ 🧪 **Optimal Quality**: Agents posses multiple self-optimization algorithms based on latest research
126
+ 🚀 **Dynamic Workflows**: Self-correcting loops, conditional routing, and intelligent decision-making
127
+ 🔧 **Zero-Config Production**: Deploy as REST APIs with one command. Scale without rewriting.
101
128
 
102
- Built with real-world deployment in mind, Flock integrates seamlessly with tools like **Temporal** (optional) for building robust, fault-tolerant, and scalable agent systems right out of the box.
129
+ **Ready to see it in action?**
103
130
 
104
- **Looking for examples and tutorials?** Check out the dedicated [**👉 flock-showcase Repository**](https://github.com/whiteducksoftware/flock-showcase)!
131
+ ## Quick Start
105
132
 
106
- ## ✨ Why Join the Flock?
133
+ ```python
134
+ from flock.core import Flock, FlockFactory
107
135
 
108
- Flock offers a different way to build agentic systems:
136
+ # 1. Create the main orchestrator
137
+ my_flock = Flock(model="openai/gpt-4o")
109
138
 
110
- | Traditional Agent Frameworks 😟 | Flock Framework 🐤🐧🐓🦆 |
111
- | :------------------------------------ | :------------------------------------- |
112
- | 🤯 **Prompt Nightmare** | ✅ **Declarative Simplicity** |
113
- | *Long, brittle, hard-to-tune prompts* | *Clear input/output specs (typed!)* |
114
- | 💥 **Fragile & Unpredictable** | ⚡ **Robust & Production-Ready** |
115
- | *Single errors can halt everything* | *Fault-tolerant via Temporal option* |
116
- | 🧩 **Monolithic & Rigid** | 🔧 **Modular & Flexible** |
117
- | *Hard to extend or modify logic* | *Pluggable Evaluators, Modules, Tools* |
118
- | ⛓️ **Basic Chaining** | 🚀 **Advanced Orchestration** |
119
- | *Often just linear workflows* | *Dynamic Routing, Batch Processing* |
120
- | 🧪 **Difficult Testing** | ✅ **Testable Components** |
121
- | *Hard to unit test prompt logic* | *Clear I/O contracts aid testing* |
122
- | 📄 **Unstructured Output** | ✨ **Structured Data Handling** |
123
- | *Parsing unreliable LLM text output* | *Native Pydantic/Typed Dict support* |
139
+ # 2. Declaratively define an agent
140
+ brainstorm_agent = FlockFactory.create_default_agent(
141
+ name="idea_generator",
142
+ input="topic",
143
+ output="catchy_title, key_points"
144
+ )
124
145
 
146
+ # 3. Add the agent to the Flock
147
+ my_flock.add_agent(brainstorm_agent)
148
+
149
+ # 4. Run the agent!
150
+ input_data = {"topic": "The future of AI agents"}
151
+ result = my_flock.run(start_agent="idea_generator", input=input_data)
152
+
153
+ # The result is a Box object (dot-accessible dict)
154
+ print(f"Generated Title: {result.catchy_title}")
155
+ print(f"Key Points: {result.key_points}")
156
+ ```
157
+
158
+ **No 20-line prompt fiddling. Just structured output, every time.**
159
+
160
+ ![image](https://github.com/user-attachments/assets/37a897cb-910f-49fc-89d4-510a780ad775)
161
+
162
+ **Explore more examples →** [**Flock Showcase Repository**](https://github.com/whiteducksoftware/flock-showcase)
125
163
 
126
164
  ## 📹 Video Demo
127
165
 
128
166
  https://github.com/user-attachments/assets/bdab4786-d532-459f-806a-024727164dcc
129
167
 
130
- ## 💡 Core Concepts
131
-
132
- Flock's power comes from a few key ideas (Learn more in the [Full Documentation](https://whiteducksoftware.github.io/flock/)):
133
168
 
134
- 1. **Declarative Agents:** Define agents by *what* they do (inputs/outputs), not *how*. Flock uses **Evaluators** (like the default `DeclarativeEvaluator` powered by DSPy) to handle the underlying logic.
135
- 2. **Typed Signatures:** Specify agent inputs and outputs using Python type hints and optional descriptions (e.g., `"query: str | User request, context: Optional[List[MyType]]"`).
136
- 3. **Modular Components:** Extend agent capabilities with pluggable **Modules** (e.g., for memory, metrics, output formatting) that hook into the agent's lifecycle.
137
- 4. **Intelligent Workflows:** Chain agents explicitly or use **Routers** (LLM-based, Agent-based, or custom) for dynamic decision-making.
138
- 5. **Reliable Execution:** Run locally for easy debugging or seamlessly switch to **Temporal** (optional) for production-grade fault tolerance, retries, and state management.
139
- 6. **Tool Integration:** Equip agents with standard or custom Python functions (`@flock_tool`) registered via the `FlockRegistry`.
140
- 7. **Registry:** A central place (`@flock_component`, `@flock_type`, `@flock_tool`) to register your custom classes, types, and functions, enabling robust serialization and dynamic loading.
141
169
 
142
170
  ## 💾 Installation - Use Flock in your project
143
171
 
@@ -155,10 +183,10 @@ Extras: Install optional dependencies for specific features:
155
183
 
156
184
  ```bash
157
185
  # Common tools (Tavily, Markdownify)
158
- uv pip install flock-core[tools]
186
+ uv pip install flock-core[all-tools]
159
187
 
160
188
  # All optional dependencies (including tools, docling, etc.)
161
- uv pip install flock-core[all]
189
+ uv sync --all-extras
162
190
  ```
163
191
 
164
192
  ## 🔑 Installation - Develop Flock
@@ -208,51 +236,13 @@ DEFAULT_MODEL="openai/gpt-4o" # Default LLM if agent doesn't specify
208
236
 
209
237
  Be sure that the .env file is added to your .gitignore!
210
238
 
211
- ## ⚡ Quick Start Syntax
212
-
213
- While detailed examples and tutorials now live in the flock-showcase repository, here's a minimal example to illustrate the core syntax:
214
-
215
- ```python
216
- from flock.core import Flock, FlockFactory
217
-
218
- # 1. Create the main orchestrator
219
- # Uses DEFAULT_MODEL from .env or defaults to "openai/gpt-4o" if not set
220
- my_flock = Flock(name="SimpleFlock")
221
-
222
- # 2. Declaratively define an agent using the Factory
223
- # Input: a topic (string)
224
- # Output: a title (string) and bullet points (list of strings)
225
- brainstorm_agent = FlockFactory.create_default_agent(
226
- name="idea_generator",
227
- description="Generates titles and key points for a given topic.",
228
- input="topic: str | The subject to brainstorm about",
229
- output="catchy_title: str, key_points: list[str] | 3-5 main bullet points"
230
- )
231
-
232
- # 3. Add the agent to the Flock
233
- my_flock.add_agent(brainstorm_agent)
234
-
235
- # 4. Run the agent!
236
- if __name__ == "__main__":
237
- input_data = {"topic": "The future of AI agents"}
238
- try:
239
- # The result is a Box object (dot-accessible dict)
240
- result = my_flock.run(start_agent="idea_generator", input=input_data)
241
- print(f"Generated Title: {result.catchy_title}")
242
- print("Key Points:")
243
- for point in result.key_points:
244
- print(f"- {point}")
245
- except Exception as e:
246
- print(f"An error occurred: {e}")
247
- print("Ensure your LLM API key (e.g., OPENAI_API_KEY) is set in your .env file!")
248
- ```
249
239
 
250
240
  ## 🐤 New in Flock 0.4.0 `Magpie` 🐤
251
241
  <p align="center">
252
242
  <img width="300" alt="image" src="https://github.com/user-attachments/assets/34c2fe2f-6dd2-498c-a826-1687cb158755" />
253
243
  </p>
254
244
 
255
- ### MCP Support - Declaratively connect to 1000s of different tools!
245
+ ### 0.4.5 - MCP Support - Declaratively connect to 1000s of different tools!
256
246
 
257
247
  Create a server
258
248
 
@@ -55,7 +55,7 @@ flock/core/execution/local_executor.py,sha256=rnIQvaJOs6zZORUcR3vvyS6LPREDJTjayg
55
55
  flock/core/execution/temporal_executor.py,sha256=dHcb0xuzPFWU_wbwTgI7glLNyyppei93Txs2sapjhaw,6283
56
56
  flock/core/interpreter/python_interpreter.py,sha256=RaUMZuufsKBNQ4FAeSaOgUuxzs8VYu5TgUUs-xwaxxM,26376
57
57
  flock/core/logging/__init__.py,sha256=xn5fC-8IgsdIv0ywe_cICK1KVhTrVD8t-jYORg0ETUA,155
58
- flock/core/logging/logging.py,sha256=zurkhu1SKOkTGz9iBUB6f5_7kB6PSKPIbV5k7WxpQR4,19457
58
+ flock/core/logging/logging.py,sha256=Tgbyu_Ah2g9keD_uQZXNeGsEQuCapGBBKvLiF7L2UrE,19506
59
59
  flock/core/logging/telemetry.py,sha256=Trssqx02SBovTL843YwY3L-ZGj3KvcfMHLMU7Syk8L0,6561
60
60
  flock/core/logging/trace_and_logged.py,sha256=5vNrK1kxuPMoPJ0-QjQg-EDJL1oiEzvU6UNi6X8FiMs,2117
61
61
  flock/core/logging/formatters/enum_builder.py,sha256=LgEYXUv84wK5vwHflZ5h8HBGgvLH3sByvUQe8tZiyY0,981
@@ -88,7 +88,7 @@ flock/core/serialization/json_encoder.py,sha256=gAKj2zU_8wQiNvdkby2hksSA4fbPNwTj
88
88
  flock/core/serialization/secure_serializer.py,sha256=n5-zRvvXddgJv1FFHsaQ2wuYdL3WUSGPvG_LGaffEJo,6144
89
89
  flock/core/serialization/serializable.py,sha256=qlv8TsTqRuklXiNuCMrvro5VKz764xC2i3FlgLJSkdk,12129
90
90
  flock/core/serialization/serialization_utils.py,sha256=AHRf90trgnj2Q6aaGaq5eja5PRcuJANUsp2wafGUeig,15257
91
- flock/core/util/cli_helper.py,sha256=YxTktsPiA7xmV_RCI7vfgtwSYrKl2XrNgQn5c5ye1o8,49972
91
+ flock/core/util/cli_helper.py,sha256=9MiAw8y0IRlWKF7lRYViRFzSwbWSeiiLv0usyhn8XlU,49966
92
92
  flock/core/util/file_path_utils.py,sha256=Odf7uU32C-x1KNighbNERSiMtkzW4h8laABIoFK7A5M,6246
93
93
  flock/core/util/hydrator.py,sha256=ARg4ufXNlfAESDaxPeU8j6TOJ2ywzfl00KAIfVHGIxo,10699
94
94
  flock/core/util/input_resolver.py,sha256=KPoPSpklyCoiR2t5r6J6GJHegmPLFZ0YE126VcKBewM,4703
@@ -557,8 +557,8 @@ flock/workflow/agent_execution_activity.py,sha256=Gy6FtuVAjf0NiUXmC3syS2eJpNQF4R
557
557
  flock/workflow/flock_workflow.py,sha256=iSUF_soFvWar0ffpkzE4irkDZRx0p4HnwmEBi_Ne2sY,9666
558
558
  flock/workflow/temporal_config.py,sha256=3_8O7SDEjMsSMXsWJBfnb6XTp0TFaz39uyzSlMTSF_I,3988
559
559
  flock/workflow/temporal_setup.py,sha256=YIHnSBntzOchHfMSh8hoLeNXrz3B1UbR14YrR6soM7A,1606
560
- flock_core-0.4.503.dist-info/METADATA,sha256=_wEmHySkEiRLzW-OS3yjdzwK93F0eVssh1JBTJ7ZIuc,23806
561
- flock_core-0.4.503.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
562
- flock_core-0.4.503.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
563
- flock_core-0.4.503.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
564
- flock_core-0.4.503.dist-info/RECORD,,
560
+ flock_core-0.4.505.dist-info/METADATA,sha256=bEDt27opsaGZZ5zZVMJblSoIG4phGH2Q4W8kG1RFOpQ,21599
561
+ flock_core-0.4.505.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
562
+ flock_core-0.4.505.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
563
+ flock_core-0.4.505.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
564
+ flock_core-0.4.505.dist-info/RECORD,,