penguiflow 2.2.5__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.

Files changed (105) hide show
  1. {penguiflow-2.2.5/penguiflow.egg-info → penguiflow-2.2.6}/PKG-INFO +2 -1
  2. penguiflow-2.2.6/examples/planner_enterprise_agent/__init__.py +30 -0
  3. penguiflow-2.2.6/examples/planner_enterprise_agent/config.py +93 -0
  4. penguiflow-2.2.6/examples/planner_enterprise_agent/main.py +709 -0
  5. penguiflow-2.2.6/examples/planner_enterprise_agent/nodes.py +882 -0
  6. penguiflow-2.2.6/examples/planner_enterprise_agent/telemetry.py +245 -0
  7. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/__init__.py +1 -1
  8. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/planner/__init__.py +6 -0
  9. penguiflow-2.2.6/penguiflow/planner/dspy_client.py +327 -0
  10. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/planner/react.py +465 -52
  11. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/remote.py +2 -2
  12. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/state.py +1 -1
  13. {penguiflow-2.2.5 → penguiflow-2.2.6/penguiflow.egg-info}/PKG-INFO +2 -1
  14. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow.egg-info/SOURCES.txt +6 -0
  15. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow.egg-info/requires.txt +1 -0
  16. {penguiflow-2.2.5 → penguiflow-2.2.6}/pyproject.toml +2 -1
  17. penguiflow-2.2.6/tests/test_patterns.py +447 -0
  18. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_react_planner.py +206 -2
  19. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_remote.py +61 -0
  20. penguiflow-2.2.6/tests/test_routing_policy.py +299 -0
  21. penguiflow-2.2.5/tests/test_patterns.py +0 -151
  22. penguiflow-2.2.5/tests/test_routing_policy.py +0 -128
  23. {penguiflow-2.2.5 → penguiflow-2.2.6}/LICENSE +0 -0
  24. {penguiflow-2.2.5 → penguiflow-2.2.6}/README.md +0 -0
  25. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/__init__.py +0 -0
  26. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/controller_multihop/__init__.py +0 -0
  27. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/controller_multihop/flow.py +0 -0
  28. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/fanout_join/__init__.py +0 -0
  29. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/fanout_join/flow.py +0 -0
  30. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/map_concurrent/__init__.py +0 -0
  31. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/map_concurrent/flow.py +0 -0
  32. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/metadata_propagation/flow.py +0 -0
  33. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/mlflow_metrics/__init__.py +0 -0
  34. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/mlflow_metrics/flow.py +0 -0
  35. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/playbook_retrieval/__init__.py +0 -0
  36. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/playbook_retrieval/flow.py +0 -0
  37. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/quickstart/__init__.py +0 -0
  38. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/quickstart/flow.py +0 -0
  39. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/react_minimal/main.py +0 -0
  40. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/react_parallel/main.py +0 -0
  41. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/react_pause_resume/main.py +0 -0
  42. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/react_replan/main.py +0 -0
  43. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/reliability_middleware/__init__.py +0 -0
  44. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/reliability_middleware/flow.py +0 -0
  45. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/roadmap_status_updates/__init__.py +0 -0
  46. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/roadmap_status_updates/flow.py +0 -0
  47. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/roadmap_status_updates_subflows/__init__.py +0 -0
  48. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/roadmap_status_updates_subflows/flow.py +0 -0
  49. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/routing_policy/__init__.py +0 -0
  50. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/routing_policy/flow.py +0 -0
  51. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/routing_predicate/__init__.py +0 -0
  52. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/routing_predicate/flow.py +0 -0
  53. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/routing_union/__init__.py +0 -0
  54. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/routing_union/flow.py +0 -0
  55. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/status_roadmap_flow/__init__.py +0 -0
  56. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/status_roadmap_flow/flow.py +0 -0
  57. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/streaming_llm/__init__.py +0 -0
  58. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/streaming_llm/flow.py +0 -0
  59. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/testkit_demo/flow.py +0 -0
  60. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/trace_cancel/flow.py +0 -0
  61. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/traceable_errors/flow.py +0 -0
  62. {penguiflow-2.2.5 → penguiflow-2.2.6}/examples/visualizer/flow.py +0 -0
  63. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/admin.py +0 -0
  64. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/bus.py +0 -0
  65. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/catalog.py +0 -0
  66. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/core.py +0 -0
  67. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/debug.py +0 -0
  68. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/errors.py +0 -0
  69. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/metrics.py +0 -0
  70. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/middlewares.py +0 -0
  71. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/node.py +0 -0
  72. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/patterns.py +0 -0
  73. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/planner/prompts.py +0 -0
  74. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/policies.py +0 -0
  75. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/registry.py +0 -0
  76. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/streaming.py +0 -0
  77. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/testkit.py +0 -0
  78. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/types.py +0 -0
  79. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow/viz.py +0 -0
  80. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow.egg-info/dependency_links.txt +0 -0
  81. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow.egg-info/entry_points.txt +0 -0
  82. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow.egg-info/top_level.txt +0 -0
  83. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow_a2a/__init__.py +0 -0
  84. {penguiflow-2.2.5 → penguiflow-2.2.6}/penguiflow_a2a/server.py +0 -0
  85. {penguiflow-2.2.5 → penguiflow-2.2.6}/setup.cfg +0 -0
  86. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_a2a_server.py +0 -0
  87. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_budgets.py +0 -0
  88. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_cancel.py +0 -0
  89. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_catalog.py +0 -0
  90. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_controller.py +0 -0
  91. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_core.py +0 -0
  92. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_distribution_hooks.py +0 -0
  93. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_errors.py +0 -0
  94. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_examples_roadmap.py +0 -0
  95. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_metadata.py +0 -0
  96. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_metrics.py +0 -0
  97. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_middlewares.py +0 -0
  98. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_node.py +0 -0
  99. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_planner_prompts.py +0 -0
  100. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_property_based.py +0 -0
  101. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_registry.py +0 -0
  102. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_streaming.py +0 -0
  103. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_testkit.py +0 -0
  104. {penguiflow-2.2.5 → penguiflow-2.2.6}/tests/test_types.py +0 -0
  105. {penguiflow-2.2.5 → 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.5
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