penguiflow 2.2.4__tar.gz → 2.2.6__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.
Potentially problematic release.
This version of penguiflow might be problematic. Click here for more details.
- {penguiflow-2.2.4/penguiflow.egg-info → penguiflow-2.2.6}/PKG-INFO +2 -1
- penguiflow-2.2.6/examples/planner_enterprise_agent/__init__.py +30 -0
- penguiflow-2.2.6/examples/planner_enterprise_agent/config.py +93 -0
- penguiflow-2.2.6/examples/planner_enterprise_agent/main.py +709 -0
- penguiflow-2.2.6/examples/planner_enterprise_agent/nodes.py +882 -0
- penguiflow-2.2.6/examples/planner_enterprise_agent/telemetry.py +245 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/quickstart/flow.py +3 -6
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/trace_cancel/flow.py +9 -8
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/__init__.py +1 -1
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/planner/__init__.py +6 -0
- penguiflow-2.2.6/penguiflow/planner/dspy_client.py +327 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/planner/react.py +465 -52
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/remote.py +2 -2
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/state.py +1 -1
- {penguiflow-2.2.4 → penguiflow-2.2.6/penguiflow.egg-info}/PKG-INFO +2 -1
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow.egg-info/SOURCES.txt +6 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow.egg-info/requires.txt +1 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/pyproject.toml +2 -1
- penguiflow-2.2.6/tests/test_patterns.py +447 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_react_planner.py +206 -2
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_remote.py +61 -0
- penguiflow-2.2.6/tests/test_routing_policy.py +299 -0
- penguiflow-2.2.4/tests/test_patterns.py +0 -151
- penguiflow-2.2.4/tests/test_routing_policy.py +0 -128
- {penguiflow-2.2.4 → penguiflow-2.2.6}/LICENSE +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/README.md +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/controller_multihop/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/controller_multihop/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/fanout_join/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/fanout_join/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/map_concurrent/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/map_concurrent/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/metadata_propagation/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/mlflow_metrics/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/mlflow_metrics/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/playbook_retrieval/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/playbook_retrieval/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/quickstart/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/react_minimal/main.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/react_parallel/main.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/react_pause_resume/main.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/react_replan/main.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/reliability_middleware/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/reliability_middleware/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/roadmap_status_updates/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/roadmap_status_updates/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/roadmap_status_updates_subflows/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/roadmap_status_updates_subflows/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/routing_policy/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/routing_policy/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/routing_predicate/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/routing_predicate/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/routing_union/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/routing_union/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/status_roadmap_flow/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/status_roadmap_flow/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/streaming_llm/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/streaming_llm/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/testkit_demo/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/traceable_errors/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/examples/visualizer/flow.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/admin.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/bus.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/catalog.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/core.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/debug.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/errors.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/metrics.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/middlewares.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/node.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/patterns.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/planner/prompts.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/policies.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/registry.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/streaming.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/testkit.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/types.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow/viz.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow.egg-info/dependency_links.txt +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow.egg-info/entry_points.txt +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow.egg-info/top_level.txt +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow_a2a/__init__.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/penguiflow_a2a/server.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/setup.cfg +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_a2a_server.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_budgets.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_cancel.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_catalog.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_controller.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_core.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_distribution_hooks.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_errors.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_examples_roadmap.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_metadata.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_metrics.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_middlewares.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_node.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_planner_prompts.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_property_based.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_registry.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_streaming.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_testkit.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_types.py +0 -0
- {penguiflow-2.2.4 → penguiflow-2.2.6}/tests/test_viz.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: penguiflow
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.6
|
|
4
4
|
Summary: Async agent orchestration primitives.
|
|
5
5
|
Author: PenguiFlow Team
|
|
6
6
|
License: MIT License
|
|
@@ -44,6 +44,7 @@ Provides-Extra: a2a-server
|
|
|
44
44
|
Requires-Dist: fastapi>=0.118; extra == "a2a-server"
|
|
45
45
|
Provides-Extra: planner
|
|
46
46
|
Requires-Dist: litellm>=1.77.3; extra == "planner"
|
|
47
|
+
Requires-Dist: dspy>=3.0.3; extra == "planner"
|
|
47
48
|
Dynamic: license-file
|
|
48
49
|
|
|
49
50
|
# PenguiFlow 🐧❄️
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Enterprise agent example with ReactPlanner.
|
|
2
|
+
|
|
3
|
+
This package provides a gold-standard implementation for production
|
|
4
|
+
agent deployments using PenguiFlow's ReactPlanner with comprehensive
|
|
5
|
+
observability, error handling, and configuration management.
|
|
6
|
+
|
|
7
|
+
Public API:
|
|
8
|
+
- EnterpriseAgentOrchestrator: Main agent orchestrator
|
|
9
|
+
- AgentConfig: Type-safe configuration
|
|
10
|
+
- AgentTelemetry: Observability middleware
|
|
11
|
+
|
|
12
|
+
Example:
|
|
13
|
+
>>> from examples.planner_enterprise_agent import (
|
|
14
|
+
... EnterpriseAgentOrchestrator,
|
|
15
|
+
... AgentConfig,
|
|
16
|
+
... )
|
|
17
|
+
>>> config = AgentConfig.from_env()
|
|
18
|
+
>>> agent = EnterpriseAgentOrchestrator(config)
|
|
19
|
+
>>> result = await agent.execute("Analyze deployment logs")
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from .config import AgentConfig
|
|
23
|
+
from .main import EnterpriseAgentOrchestrator
|
|
24
|
+
from .telemetry import AgentTelemetry
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"AgentConfig",
|
|
28
|
+
"AgentTelemetry",
|
|
29
|
+
"EnterpriseAgentOrchestrator",
|
|
30
|
+
]
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""Enterprise configuration management with environment variable support."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
from dataclasses import dataclass
|
|
7
|
+
from typing import Literal
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass(frozen=True)
|
|
11
|
+
class AgentConfig:
|
|
12
|
+
"""Production-grade agent configuration.
|
|
13
|
+
|
|
14
|
+
All settings can be configured via environment variables with sensible
|
|
15
|
+
defaults for development. In production, set all credentials explicitly.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
# LLM Configuration
|
|
19
|
+
llm_model: str
|
|
20
|
+
llm_temperature: float
|
|
21
|
+
llm_max_retries: int
|
|
22
|
+
llm_timeout_s: float
|
|
23
|
+
|
|
24
|
+
# Planner Configuration
|
|
25
|
+
planner_max_iters: int
|
|
26
|
+
planner_token_budget: int
|
|
27
|
+
planner_deadline_s: float | None
|
|
28
|
+
planner_hop_budget: int | None
|
|
29
|
+
planner_absolute_max_parallel: int
|
|
30
|
+
|
|
31
|
+
# Summarizer LLM (cheaper model for trajectory compression)
|
|
32
|
+
summarizer_model: str | None
|
|
33
|
+
|
|
34
|
+
# Observability
|
|
35
|
+
log_level: Literal["DEBUG", "INFO", "WARNING", "ERROR"]
|
|
36
|
+
enable_telemetry: bool
|
|
37
|
+
telemetry_backend: Literal["logging", "mlflow", "datadog"]
|
|
38
|
+
mlflow_tracking_uri: str | None
|
|
39
|
+
|
|
40
|
+
# Application Settings
|
|
41
|
+
environment: Literal["development", "staging", "production"]
|
|
42
|
+
agent_name: str
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_env(cls) -> AgentConfig:
|
|
46
|
+
"""Load configuration from environment variables.
|
|
47
|
+
|
|
48
|
+
Required environment variables:
|
|
49
|
+
- OPENAI_API_KEY or other LLM provider credentials
|
|
50
|
+
|
|
51
|
+
Optional (with defaults):
|
|
52
|
+
- LLM_MODEL (default: gpt-4o-mini)
|
|
53
|
+
- AGENT_ENVIRONMENT (default: development)
|
|
54
|
+
- ENABLE_TELEMETRY (default: true)
|
|
55
|
+
- LOG_LEVEL (default: INFO)
|
|
56
|
+
"""
|
|
57
|
+
return cls(
|
|
58
|
+
# LLM settings
|
|
59
|
+
llm_model=os.getenv("LLM_MODEL", "gpt-4o-mini"),
|
|
60
|
+
llm_temperature=float(os.getenv("LLM_TEMPERATURE", "0.0")),
|
|
61
|
+
llm_max_retries=int(os.getenv("LLM_MAX_RETRIES", "3")),
|
|
62
|
+
llm_timeout_s=float(os.getenv("LLM_TIMEOUT_S", "60.0")),
|
|
63
|
+
# Planner settings
|
|
64
|
+
planner_max_iters=int(os.getenv("PLANNER_MAX_ITERS", "12")),
|
|
65
|
+
planner_token_budget=int(os.getenv("PLANNER_TOKEN_BUDGET", "8000")),
|
|
66
|
+
planner_deadline_s=_parse_optional_float(
|
|
67
|
+
os.getenv("PLANNER_DEADLINE_S")
|
|
68
|
+
),
|
|
69
|
+
planner_hop_budget=_parse_optional_int(os.getenv("PLANNER_HOP_BUDGET")),
|
|
70
|
+
planner_absolute_max_parallel=int(
|
|
71
|
+
os.getenv("PLANNER_ABSOLUTE_MAX_PARALLEL", "50")
|
|
72
|
+
),
|
|
73
|
+
# Summarizer
|
|
74
|
+
summarizer_model=os.getenv("SUMMARIZER_MODEL", "gpt-4o-mini"),
|
|
75
|
+
# Observability
|
|
76
|
+
log_level=os.getenv("LOG_LEVEL", "INFO"), # type: ignore
|
|
77
|
+
enable_telemetry=os.getenv("ENABLE_TELEMETRY", "true").lower() == "true",
|
|
78
|
+
telemetry_backend=os.getenv("TELEMETRY_BACKEND", "logging"), # type: ignore
|
|
79
|
+
mlflow_tracking_uri=os.getenv("MLFLOW_TRACKING_URI"),
|
|
80
|
+
# Application
|
|
81
|
+
environment=os.getenv("AGENT_ENVIRONMENT", "development"), # type: ignore
|
|
82
|
+
agent_name=os.getenv("AGENT_NAME", "enterprise_agent"),
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def _parse_optional_float(value: str | None) -> float | None:
|
|
87
|
+
"""Parse optional float from environment variable."""
|
|
88
|
+
return float(value) if value is not None else None
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _parse_optional_int(value: str | None) -> int | None:
|
|
92
|
+
"""Parse optional int from environment variable."""
|
|
93
|
+
return int(value) if value is not None else None
|