pygeai-orchestration 0.1.0b4__tar.gz → 0.1.0b6__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.
Files changed (95) hide show
  1. {pygeai_orchestration-0.1.0b4/pygeai_orchestration.egg-info → pygeai_orchestration-0.1.0b6}/PKG-INFO +29 -10
  2. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/README.md +28 -9
  3. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/__init__.py +4 -5
  4. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/__init__.py +0 -4
  5. pygeai_orchestration-0.1.0b6/pygeai_orchestration/core/base/__init__.py +23 -0
  6. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/base/geai_agent.py +34 -57
  7. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/base/geai_orchestrator.py +6 -28
  8. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/base/orchestrator.py +2 -2
  9. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/utils/__init__.py +4 -7
  10. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/patterns/multi_agent.py +4 -4
  11. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/patterns/planning.py +4 -4
  12. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/patterns/react.py +4 -4
  13. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/patterns/reflection.py +4 -4
  14. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/patterns/tool_use.py +4 -4
  15. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6/pygeai_orchestration.egg-info}/PKG-INFO +29 -10
  16. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration.egg-info/SOURCES.txt +9 -4
  17. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pyproject.toml +1 -1
  18. pygeai_orchestration-0.1.0b6/snippets/multi_agent_collaboration.py +80 -0
  19. pygeai_orchestration-0.1.0b6/snippets/planning_analysis.py +49 -0
  20. pygeai_orchestration-0.1.0b6/snippets/planning_project.py +45 -0
  21. pygeai_orchestration-0.1.0b6/snippets/react_problem_solving.py +47 -0
  22. pygeai_orchestration-0.1.0b6/snippets/react_research.py +50 -0
  23. pygeai_orchestration-0.1.0b6/snippets/reflection_code_review.py +50 -0
  24. pygeai_orchestration-0.1.0b6/snippets/reflection_explanation.py +42 -0
  25. pygeai_orchestration-0.1.0b6/snippets/tool_use_calculator.py +86 -0
  26. pygeai_orchestration-0.1.0b6/snippets/tool_use_data_processing.py +128 -0
  27. pygeai_orchestration-0.1.0b4/pygeai_orchestration/core/base/__init__.py +0 -23
  28. pygeai_orchestration-0.1.0b4/pygeai_orchestration/core/utils/logging.py +0 -57
  29. pygeai_orchestration-0.1.0b4/snippets/multi_agent_snippet.py +0 -26
  30. pygeai_orchestration-0.1.0b4/snippets/react_snippet.py +0 -17
  31. pygeai_orchestration-0.1.0b4/snippets/reflection_snippet.py +0 -15
  32. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/BUILD.md +0 -0
  33. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/CHANGELOG.md +0 -0
  34. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/CONTRIBUTING.md +0 -0
  35. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/LICENSE +0 -0
  36. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/MANIFEST.in +0 -0
  37. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/patterns_guide.md +0 -0
  38. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/quickstart.md +0 -0
  39. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/api/core.rst +0 -0
  40. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/api/exceptions.rst +0 -0
  41. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/api/patterns.rst +0 -0
  42. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/changelog.rst +0 -0
  43. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/contributing.rst +0 -0
  44. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/examples.rst +0 -0
  45. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/index.rst +0 -0
  46. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/patterns.rst +0 -0
  47. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/docs/source/quickstart.rst +0 -0
  48. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/__init__.py +0 -0
  49. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/__main__.py +0 -0
  50. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/commands/__init__.py +0 -0
  51. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/commands/base.py +0 -0
  52. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/error_handler.py +0 -0
  53. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/formatters.py +0 -0
  54. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/geai_orch.py +0 -0
  55. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/interactive.py +0 -0
  56. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/cli/texts/help.py +0 -0
  57. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/base/agent.py +0 -0
  58. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/base/pattern.py +0 -0
  59. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/base/tool.py +0 -0
  60. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/common/__init__.py +0 -0
  61. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/common/context.py +0 -0
  62. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/common/memory.py +0 -0
  63. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/common/message.py +0 -0
  64. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/common/state.py +0 -0
  65. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/composition.py +0 -0
  66. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/config.py +0 -0
  67. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/exceptions.py +0 -0
  68. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/handlers.py +0 -0
  69. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/utils/cache.py +0 -0
  70. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/utils/config.py +0 -0
  71. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/utils/metrics.py +0 -0
  72. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/core/utils/validators.py +0 -0
  73. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/dev/__init__.py +0 -0
  74. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/dev/debug.py +0 -0
  75. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/dev/templates.py +0 -0
  76. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/dev/testing.py +0 -0
  77. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/patterns/__init__.py +0 -0
  78. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/__init__.py +0 -0
  79. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_base_classes.py +0 -0
  80. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_cache.py +0 -0
  81. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_cli_formatters.py +0 -0
  82. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_common.py +0 -0
  83. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_composition.py +0 -0
  84. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_config.py +0 -0
  85. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_dev_utils.py +0 -0
  86. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_exceptions.py +0 -0
  87. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_handlers.py +0 -0
  88. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_metrics.py +0 -0
  89. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration/tests/test_patterns.py +0 -0
  90. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration.egg-info/dependency_links.txt +0 -0
  91. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration.egg-info/entry_points.txt +0 -0
  92. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration.egg-info/requires.txt +0 -0
  93. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/pygeai_orchestration.egg-info/top_level.txt +0 -0
  94. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/requirements.txt +0 -0
  95. {pygeai_orchestration-0.1.0b4 → pygeai_orchestration-0.1.0b6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygeai-orchestration
3
- Version: 0.1.0b4
3
+ Version: 0.1.0b6
4
4
  Summary: Agentic AI orchestration patterns built on Globant Enterprise AI
5
5
  Author-email: Globant <geai-sdk@globant.com>
6
6
  Keywords: geai,pygeai,orchestration,agents,ai,multi-agent,autogen,crewai
@@ -217,14 +217,13 @@ result = coordinator.execute("Create research report")
217
217
  - [Getting Started Guide](docs/getting-started.md)
218
218
  - [Pattern Documentation](docs/patterns/)
219
219
  - [API Reference](docs/api-reference/)
220
- - [Examples](snippets/)
220
+ - [Code Snippets](snippets/)
221
221
 
222
222
  ## Development
223
223
 
224
224
  ### Setup Development Environment
225
225
 
226
226
  ```bash
227
- git clone https://docs.globant.ai/en/wiki?1149,Getting+started+with+PyGEAI-orchestration.git
228
227
  cd pygeai-orchestration
229
228
  python -m venv venv
230
229
  source venv/bin/activate # On Windows: venv\Scripts\activate
@@ -247,15 +246,35 @@ python testing.py --coverage
247
246
 
248
247
  See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development guidelines.
249
248
 
250
- ## Examples
249
+ ## Code Snippets
251
250
 
252
- Check the [snippets/](snippets/) directory for working examples of each pattern:
251
+ Check the [snippets/](snippets/) directory for working code examples:
253
252
 
254
- - [Reflection Pattern Example](snippets/reflection/basic_reflection.py)
255
- - [Tool Use Pattern Example](snippets/tool_use/function_calling.py)
256
- - [ReAct Pattern Example](snippets/react/simple_react_loop.py)
257
- - [Planning Pattern Example](snippets/planning/multi_step_plan.py)
258
- - [Multi-Agent Pattern Example](snippets/multi_agent/collaborative_agents.py)
253
+ ### Reflection Pattern
254
+ - [reflection_explanation.py](snippets/reflection_explanation.py) - Iterative explanation improvement
255
+ - [reflection_code_review.py](snippets/reflection_code_review.py) - Code review with self-critique
256
+
257
+ ### ReAct Pattern
258
+ - [react_research.py](snippets/react_research.py) - Structured research tasks
259
+ - [react_problem_solving.py](snippets/react_problem_solving.py) - Step-by-step problem solving
260
+
261
+ ### Planning Pattern
262
+ - [planning_project.py](snippets/planning_project.py) - Project planning and breakdown
263
+ - [planning_analysis.py](snippets/planning_analysis.py) - Data analysis planning
264
+
265
+ ### Tool Use Pattern
266
+ - [tool_use_calculator.py](snippets/tool_use_calculator.py) - Mathematical operations with tools
267
+ - [tool_use_data_processing.py](snippets/tool_use_data_processing.py) - Data validation and transformation
268
+
269
+ ### Multi-Agent Pattern
270
+ - [multi_agent_collaboration.py](snippets/multi_agent_collaboration.py) - Collaborative multi-agent workflow
271
+
272
+ Run any snippet:
273
+ ```bash
274
+ python snippets/reflection_explanation.py
275
+ python snippets/react_research.py
276
+ python snippets/planning_project.py
277
+ ```
259
278
 
260
279
  ## Contributing
261
280
 
@@ -187,14 +187,13 @@ result = coordinator.execute("Create research report")
187
187
  - [Getting Started Guide](docs/getting-started.md)
188
188
  - [Pattern Documentation](docs/patterns/)
189
189
  - [API Reference](docs/api-reference/)
190
- - [Examples](snippets/)
190
+ - [Code Snippets](snippets/)
191
191
 
192
192
  ## Development
193
193
 
194
194
  ### Setup Development Environment
195
195
 
196
196
  ```bash
197
- git clone https://docs.globant.ai/en/wiki?1149,Getting+started+with+PyGEAI-orchestration.git
198
197
  cd pygeai-orchestration
199
198
  python -m venv venv
200
199
  source venv/bin/activate # On Windows: venv\Scripts\activate
@@ -217,15 +216,35 @@ python testing.py --coverage
217
216
 
218
217
  See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development guidelines.
219
218
 
220
- ## Examples
219
+ ## Code Snippets
221
220
 
222
- Check the [snippets/](snippets/) directory for working examples of each pattern:
221
+ Check the [snippets/](snippets/) directory for working code examples:
223
222
 
224
- - [Reflection Pattern Example](snippets/reflection/basic_reflection.py)
225
- - [Tool Use Pattern Example](snippets/tool_use/function_calling.py)
226
- - [ReAct Pattern Example](snippets/react/simple_react_loop.py)
227
- - [Planning Pattern Example](snippets/planning/multi_step_plan.py)
228
- - [Multi-Agent Pattern Example](snippets/multi_agent/collaborative_agents.py)
223
+ ### Reflection Pattern
224
+ - [reflection_explanation.py](snippets/reflection_explanation.py) - Iterative explanation improvement
225
+ - [reflection_code_review.py](snippets/reflection_code_review.py) - Code review with self-critique
226
+
227
+ ### ReAct Pattern
228
+ - [react_research.py](snippets/react_research.py) - Structured research tasks
229
+ - [react_problem_solving.py](snippets/react_problem_solving.py) - Step-by-step problem solving
230
+
231
+ ### Planning Pattern
232
+ - [planning_project.py](snippets/planning_project.py) - Project planning and breakdown
233
+ - [planning_analysis.py](snippets/planning_analysis.py) - Data analysis planning
234
+
235
+ ### Tool Use Pattern
236
+ - [tool_use_calculator.py](snippets/tool_use_calculator.py) - Mathematical operations with tools
237
+ - [tool_use_data_processing.py](snippets/tool_use_data_processing.py) - Data validation and transformation
238
+
239
+ ### Multi-Agent Pattern
240
+ - [multi_agent_collaboration.py](snippets/multi_agent_collaboration.py) - Collaborative multi-agent workflow
241
+
242
+ Run any snippet:
243
+ ```bash
244
+ python snippets/reflection_explanation.py
245
+ python snippets/react_research.py
246
+ python snippets/planning_project.py
247
+ ```
229
248
 
230
249
  ## Contributing
231
250
 
@@ -3,10 +3,10 @@ import logging
3
3
  __author__ = "Globant"
4
4
  __version__ = "0.1.0b1"
5
5
 
6
- logger = logging.getLogger("pygeai-orchestration")
6
+ logger = logging.getLogger("pygeai_orchestration")
7
7
  logger.addHandler(logging.NullHandler())
8
8
 
9
- from .core import (
9
+ from pygeai_orchestration.core import (
10
10
  BaseAgent,
11
11
  AgentConfig,
12
12
  BaseOrchestrator,
@@ -32,7 +32,6 @@ from .core import (
32
32
  Memory,
33
33
  MemoryEntry,
34
34
  MemoryStore,
35
- get_logger,
36
35
  get_config,
37
36
  OrchestrationError,
38
37
  PatternExecutionError,
@@ -43,7 +42,7 @@ from .core import (
43
42
  ValidationError,
44
43
  )
45
44
 
46
- from .patterns import (
45
+ from pygeai_orchestration.patterns import (
47
46
  ReflectionPattern,
48
47
  ToolUsePattern,
49
48
  ReActPattern,
@@ -55,6 +54,7 @@ from .patterns import (
55
54
 
56
55
  __all__ = [
57
56
  "__version__",
57
+ "logger",
58
58
  "BaseAgent",
59
59
  "AgentConfig",
60
60
  "BaseOrchestrator",
@@ -80,7 +80,6 @@ __all__ = [
80
80
  "Memory",
81
81
  "MemoryEntry",
82
82
  "MemoryStore",
83
- "get_logger",
84
83
  "get_config",
85
84
  "OrchestrationError",
86
85
  "PatternExecutionError",
@@ -30,8 +30,6 @@ from .common import (
30
30
  )
31
31
 
32
32
  from .utils import (
33
- OrchestrationLogger,
34
- get_logger,
35
33
  ConfigManager,
36
34
  get_config,
37
35
  ValidationResult,
@@ -97,8 +95,6 @@ __all__ = [
97
95
  "Memory",
98
96
  "MemoryEntry",
99
97
  "MemoryStore",
100
- "OrchestrationLogger",
101
- "get_logger",
102
98
  "ConfigManager",
103
99
  "get_config",
104
100
  "ValidationResult",
@@ -0,0 +1,23 @@
1
+ from pygeai_orchestration.core.base.agent import BaseAgent, AgentConfig
2
+ from pygeai_orchestration.core.base.orchestrator import BaseOrchestrator, OrchestratorConfig
3
+ from pygeai_orchestration.core.base.pattern import BasePattern, PatternConfig, PatternResult, PatternType
4
+ from pygeai_orchestration.core.base.tool import BaseTool, ToolConfig, ToolResult, ToolCategory
5
+ from pygeai_orchestration.core.base.geai_agent import GEAIAgent
6
+ from pygeai_orchestration.core.base.geai_orchestrator import GEAIOrchestrator
7
+
8
+ __all__ = [
9
+ "BaseAgent",
10
+ "AgentConfig",
11
+ "BaseOrchestrator",
12
+ "OrchestratorConfig",
13
+ "BasePattern",
14
+ "PatternConfig",
15
+ "PatternResult",
16
+ "PatternType",
17
+ "BaseTool",
18
+ "ToolConfig",
19
+ "ToolResult",
20
+ "ToolCategory",
21
+ "GEAIAgent",
22
+ "GEAIOrchestrator",
23
+ ]
@@ -5,19 +5,16 @@ This module provides a concrete agent implementation using the PyGEAI SDK,
5
5
  enabling AI-powered task execution with GeneXus Enterprise AI.
6
6
  """
7
7
 
8
+ import logging
8
9
  from typing import Any, Dict, Optional
9
- from .agent import BaseAgent, AgentConfig
10
- from ..utils import get_logger
11
10
 
12
- logger = get_logger()
11
+ from pygeai_orchestration.core.base.agent import BaseAgent, AgentConfig
12
+ from pygeai.core.base.session import Session
13
+ from pygeai.chat.managers import ChatManager
14
+ from pygeai.core.models import LlmSettings, ChatMessageList, ChatMessage
15
+ from pygeai.core.common.config import get_settings
13
16
 
14
- try:
15
- from pygeai import Session
16
-
17
- PYGEAI_AVAILABLE = True
18
- except ImportError:
19
- PYGEAI_AVAILABLE = False
20
- logger.warning("PyGEAI not available. GEAIAgent will have limited functionality.")
17
+ logger = logging.getLogger("pygeai_orchestration")
21
18
 
22
19
 
23
20
  class GEAIAgent(BaseAgent):
@@ -28,10 +25,10 @@ class GEAIAgent(BaseAgent):
28
25
  Enterprise AI models, providing AI-powered reasoning and generation.
29
26
 
30
27
  The agent:
31
- - Integrates with PyGEAI Session and Agent resources
28
+ - Integrates with PyGEAI Session and ChatManager
32
29
  - Supports custom system prompts and model configuration
33
- - Automatically manages agent resource creation
34
30
  - Maintains execution history
31
+ - Automatically loads credentials from ~/.geai/credentials
35
32
  """
36
33
 
37
34
  def __init__(self, config: AgentConfig, session=None, alias: Optional[str] = None):
@@ -40,14 +37,20 @@ class GEAIAgent(BaseAgent):
40
37
 
41
38
  :param config: AgentConfig - Agent configuration.
42
39
  :param session: Optional PyGEAI Session - Existing session to use.
43
- :param alias: Optional[str] - Session alias if creating new session.
44
- :raises ImportError: If PyGEAI is not installed.
40
+ :param alias: Optional[str] - Credentials alias (default: 'default').
45
41
  """
46
42
  super().__init__(config)
47
- if not PYGEAI_AVAILABLE:
48
- raise ImportError("PyGEAI is required for GEAIAgent but is not installed")
49
- self._session = session or Session(alias=alias)
50
- self._agent_resource = None
43
+
44
+ if session:
45
+ self._session = session
46
+ else:
47
+ alias = alias or 'default'
48
+ settings = get_settings()
49
+ api_key = settings.get_api_key(alias)
50
+ base_url = settings.get_base_url(alias)
51
+ self._session = Session(api_key=api_key, base_url=base_url)
52
+
53
+ self._chat_manager = ChatManager(self._session)
51
54
 
52
55
  async def execute(self, task: str, context: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
53
56
  """
@@ -88,8 +91,6 @@ class GEAIAgent(BaseAgent):
88
91
  :raises Exception: If generation fails.
89
92
  """
90
93
  try:
91
- self._get_or_create_agent()
92
-
93
94
  messages = kwargs.get("messages", [])
94
95
  if not messages:
95
96
  messages = [{"role": "user", "content": prompt}]
@@ -97,48 +98,24 @@ class GEAIAgent(BaseAgent):
97
98
  if self.config.system_prompt:
98
99
  messages.insert(0, {"role": "system", "content": self.config.system_prompt})
99
100
 
100
- chat = self._session.chats.create(
101
- messages=messages,
102
- model=self.config.model,
103
- temperature=self.config.temperature,
104
- max_tokens=self.config.max_tokens,
101
+ chat_messages = ChatMessageList(
102
+ messages=[ChatMessage(role=msg["role"], content=msg["content"]) for msg in messages]
103
+ )
104
+
105
+ llm_settings = LlmSettings(
106
+ temperature=self.config.temperature, max_tokens=self.config.max_tokens
107
+ )
108
+
109
+ response = self._chat_manager.chat_completion(
110
+ model=self.config.model, messages=chat_messages, llm_settings=llm_settings
105
111
  )
106
112
 
107
- response = chat.choices[0].message.content
113
+ response_text = response.choices[0].message.content
108
114
 
109
- self.add_to_history({"type": "generation", "prompt": prompt, "response": response})
115
+ self.add_to_history({"type": "generation", "prompt": prompt, "response": response_text})
110
116
 
111
- return response
117
+ return response_text
112
118
 
113
119
  except Exception as e:
114
120
  logger.error(f"Generation failed: {str(e)}")
115
121
  raise
116
-
117
- def _get_or_create_agent(self):
118
- """
119
- Get or create PyGEAI agent resource.
120
-
121
- Lazily creates an agent resource in PyGEAI if not already created,
122
- or reuses existing agent with matching name.
123
-
124
- :return: PyGEAI Agent resource.
125
- """
126
- if self._agent_resource is None:
127
- try:
128
- agents = self._session.agents.list()
129
- for agent in agents.data:
130
- if agent.name == self.name:
131
- self._agent_resource = agent
132
- break
133
-
134
- if self._agent_resource is None:
135
- logger.debug(f"Creating new agent resource: {self.name}")
136
- self._agent_resource = self._session.agents.create(
137
- name=self.name,
138
- model=self.config.model,
139
- description=self.config.description or f"Orchestration agent: {self.name}",
140
- )
141
- except Exception as e:
142
- logger.warning(f"Could not create agent resource: {str(e)}")
143
-
144
- return self._agent_resource
@@ -1,9 +1,10 @@
1
+ import logging
1
2
  from typing import Any, Dict, List, Optional
2
- from .orchestrator import BaseOrchestrator, OrchestratorConfig
3
- from .pattern import PatternResult
4
- from ..utils import get_logger
5
3
 
6
- logger = get_logger()
4
+ from pygeai_orchestration.core.base.orchestrator import BaseOrchestrator, OrchestratorConfig
5
+ from pygeai_orchestration.core.base.pattern import PatternResult
6
+
7
+ logger = logging.getLogger("pygeai_orchestration")
7
8
 
8
9
 
9
10
  class GEAIOrchestrator(BaseOrchestrator):
@@ -48,30 +49,7 @@ class GEAIOrchestrator(BaseOrchestrator):
48
49
 
49
50
  async def coordinate_agents(self, agents: List[str], task: str) -> Dict[str, Any]:
50
51
  logger.info(f"Coordinating {len(agents)} agents for task: {task[:50]}...")
51
-
52
- results = {}
53
-
54
- for agent_name in agents:
55
- agent = self.get_agent(agent_name)
56
- if agent is None:
57
- logger.warning(f"Agent '{agent_name}' not found, skipping")
58
- continue
59
-
60
- try:
61
- result = await agent.execute(task)
62
- results[agent_name] = result
63
- except Exception as e:
64
- logger.error(f"Agent '{agent_name}' failed: {str(e)}")
65
- results[agent_name] = {"success": False, "error": str(e)}
66
-
67
- return {
68
- "success": len(results) > 0,
69
- "results": results,
70
- "agents_executed": list(results.keys()),
71
- }
52
+ return {"status": "not_implemented", "agents": agents, "task": task}
72
53
 
73
54
  def get_execution_history(self) -> List[Dict[str, Any]]:
74
55
  return self._execution_history.copy()
75
-
76
- def clear_history(self) -> None:
77
- self._execution_history.clear()
@@ -9,8 +9,8 @@ from abc import ABC, abstractmethod
9
9
  from typing import Any, Dict, List, Optional
10
10
  from pydantic import BaseModel, Field
11
11
 
12
- from .agent import BaseAgent
13
- from .pattern import BasePattern, PatternResult
12
+ from pygeai_orchestration.core.base.agent import BaseAgent
13
+ from pygeai_orchestration.core.base.pattern import BasePattern, PatternResult
14
14
 
15
15
 
16
16
  class OrchestratorConfig(BaseModel):
@@ -1,14 +1,13 @@
1
- from .logging import OrchestrationLogger, get_logger
2
- from .config import ConfigManager, get_config
3
- from .validators import (
1
+ from pygeai_orchestration.core.utils.config import ConfigManager, get_config
2
+ from pygeai_orchestration.core.utils.validators import (
4
3
  ValidationResult,
5
4
  validate_agent_config,
6
5
  validate_pattern_config,
7
6
  validate_tool_config,
8
7
  validate_pydantic_model,
9
8
  )
10
- from .cache import CacheEntry, LRUCache, PatternCache
11
- from .metrics import (
9
+ from pygeai_orchestration.core.utils.cache import CacheEntry, LRUCache, PatternCache
10
+ from pygeai_orchestration.core.utils.metrics import (
12
11
  Metric,
13
12
  MetricType,
14
13
  MetricsCollector,
@@ -17,8 +16,6 @@ from .metrics import (
17
16
  )
18
17
 
19
18
  __all__ = [
20
- "OrchestrationLogger",
21
- "get_logger",
22
19
  "ConfigManager",
23
20
  "get_config",
24
21
  "ValidationResult",
@@ -1,9 +1,9 @@
1
1
  from typing import Any, Dict, List, Optional
2
- from ..core.base import BasePattern, PatternConfig, PatternResult, PatternType
3
- from ..core.common import Message, MessageRole, Conversation, State, StateStatus
4
- from ..core.utils import get_logger
2
+ from pygeai_orchestration.core.base import BasePattern, PatternConfig, PatternResult, PatternType
3
+ from pygeai_orchestration.core.common import Message, MessageRole, Conversation, State, StateStatus
4
+ import logging
5
5
 
6
- logger = get_logger()
6
+ logger = logging.getLogger("pygeai_orchestration")
7
7
 
8
8
 
9
9
  class AgentRole:
@@ -1,9 +1,9 @@
1
1
  from typing import Any, Dict, List, Optional
2
- from ..core.base import BasePattern, PatternConfig, PatternResult, PatternType
3
- from ..core.common import Message, MessageRole, Conversation, State, StateStatus
4
- from ..core.utils import get_logger
2
+ from pygeai_orchestration.core.base import BasePattern, PatternConfig, PatternResult, PatternType
3
+ from pygeai_orchestration.core.common import Message, MessageRole, Conversation, State, StateStatus
4
+ import logging
5
5
 
6
- logger = get_logger()
6
+ logger = logging.getLogger("pygeai_orchestration")
7
7
 
8
8
 
9
9
  class PlanStep:
@@ -1,9 +1,9 @@
1
1
  from typing import Any, Dict, List, Optional
2
- from ..core.base import BasePattern, BaseTool, PatternConfig, PatternResult, PatternType
3
- from ..core.common import Message, MessageRole, Conversation, State, StateStatus
4
- from ..core.utils import get_logger
2
+ from pygeai_orchestration.core.base import BasePattern, BaseTool, PatternConfig, PatternResult, PatternType
3
+ from pygeai_orchestration.core.common import Message, MessageRole, Conversation, State, StateStatus
4
+ import logging
5
5
 
6
- logger = get_logger()
6
+ logger = logging.getLogger("pygeai_orchestration")
7
7
 
8
8
 
9
9
  class ReActPattern(BasePattern):
@@ -1,9 +1,9 @@
1
1
  from typing import Any, Dict, Optional
2
- from ..core.base import BasePattern, PatternConfig, PatternResult, PatternType
3
- from ..core.common import Message, MessageRole, Conversation, State, StateStatus
4
- from ..core.utils import get_logger
2
+ from pygeai_orchestration.core.base import BasePattern, PatternConfig, PatternResult, PatternType
3
+ from pygeai_orchestration.core.common import Message, MessageRole, Conversation, State, StateStatus
4
+ import logging
5
5
 
6
- logger = get_logger()
6
+ logger = logging.getLogger("pygeai_orchestration")
7
7
 
8
8
 
9
9
  class ReflectionPattern(BasePattern):
@@ -1,9 +1,9 @@
1
1
  from typing import Any, Dict, List, Optional
2
- from ..core.base import BasePattern, BaseTool, PatternConfig, PatternResult, PatternType
3
- from ..core.common import Message, MessageRole, Conversation, State, StateStatus
4
- from ..core.utils import get_logger
2
+ from pygeai_orchestration.core.base import BasePattern, BaseTool, PatternConfig, PatternResult, PatternType
3
+ from pygeai_orchestration.core.common import Message, MessageRole, Conversation, State, StateStatus
4
+ import logging
5
5
 
6
- logger = get_logger()
6
+ logger = logging.getLogger("pygeai_orchestration")
7
7
 
8
8
 
9
9
  class ToolUsePattern(BasePattern):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygeai-orchestration
3
- Version: 0.1.0b4
3
+ Version: 0.1.0b6
4
4
  Summary: Agentic AI orchestration patterns built on Globant Enterprise AI
5
5
  Author-email: Globant <geai-sdk@globant.com>
6
6
  Keywords: geai,pygeai,orchestration,agents,ai,multi-agent,autogen,crewai
@@ -217,14 +217,13 @@ result = coordinator.execute("Create research report")
217
217
  - [Getting Started Guide](docs/getting-started.md)
218
218
  - [Pattern Documentation](docs/patterns/)
219
219
  - [API Reference](docs/api-reference/)
220
- - [Examples](snippets/)
220
+ - [Code Snippets](snippets/)
221
221
 
222
222
  ## Development
223
223
 
224
224
  ### Setup Development Environment
225
225
 
226
226
  ```bash
227
- git clone https://docs.globant.ai/en/wiki?1149,Getting+started+with+PyGEAI-orchestration.git
228
227
  cd pygeai-orchestration
229
228
  python -m venv venv
230
229
  source venv/bin/activate # On Windows: venv\Scripts\activate
@@ -247,15 +246,35 @@ python testing.py --coverage
247
246
 
248
247
  See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development guidelines.
249
248
 
250
- ## Examples
249
+ ## Code Snippets
251
250
 
252
- Check the [snippets/](snippets/) directory for working examples of each pattern:
251
+ Check the [snippets/](snippets/) directory for working code examples:
253
252
 
254
- - [Reflection Pattern Example](snippets/reflection/basic_reflection.py)
255
- - [Tool Use Pattern Example](snippets/tool_use/function_calling.py)
256
- - [ReAct Pattern Example](snippets/react/simple_react_loop.py)
257
- - [Planning Pattern Example](snippets/planning/multi_step_plan.py)
258
- - [Multi-Agent Pattern Example](snippets/multi_agent/collaborative_agents.py)
253
+ ### Reflection Pattern
254
+ - [reflection_explanation.py](snippets/reflection_explanation.py) - Iterative explanation improvement
255
+ - [reflection_code_review.py](snippets/reflection_code_review.py) - Code review with self-critique
256
+
257
+ ### ReAct Pattern
258
+ - [react_research.py](snippets/react_research.py) - Structured research tasks
259
+ - [react_problem_solving.py](snippets/react_problem_solving.py) - Step-by-step problem solving
260
+
261
+ ### Planning Pattern
262
+ - [planning_project.py](snippets/planning_project.py) - Project planning and breakdown
263
+ - [planning_analysis.py](snippets/planning_analysis.py) - Data analysis planning
264
+
265
+ ### Tool Use Pattern
266
+ - [tool_use_calculator.py](snippets/tool_use_calculator.py) - Mathematical operations with tools
267
+ - [tool_use_data_processing.py](snippets/tool_use_data_processing.py) - Data validation and transformation
268
+
269
+ ### Multi-Agent Pattern
270
+ - [multi_agent_collaboration.py](snippets/multi_agent_collaboration.py) - Collaborative multi-agent workflow
271
+
272
+ Run any snippet:
273
+ ```bash
274
+ python snippets/reflection_explanation.py
275
+ python snippets/react_research.py
276
+ python snippets/planning_project.py
277
+ ```
259
278
 
260
279
  ## Contributing
261
280
 
@@ -53,7 +53,6 @@ pygeai_orchestration/core/common/state.py
53
53
  pygeai_orchestration/core/utils/__init__.py
54
54
  pygeai_orchestration/core/utils/cache.py
55
55
  pygeai_orchestration/core/utils/config.py
56
- pygeai_orchestration/core/utils/logging.py
57
56
  pygeai_orchestration/core/utils/metrics.py
58
57
  pygeai_orchestration/core/utils/validators.py
59
58
  pygeai_orchestration/dev/__init__.py
@@ -78,6 +77,12 @@ pygeai_orchestration/tests/test_exceptions.py
78
77
  pygeai_orchestration/tests/test_handlers.py
79
78
  pygeai_orchestration/tests/test_metrics.py
80
79
  pygeai_orchestration/tests/test_patterns.py
81
- snippets/multi_agent_snippet.py
82
- snippets/react_snippet.py
83
- snippets/reflection_snippet.py
80
+ snippets/multi_agent_collaboration.py
81
+ snippets/planning_analysis.py
82
+ snippets/planning_project.py
83
+ snippets/react_problem_solving.py
84
+ snippets/react_research.py
85
+ snippets/reflection_code_review.py
86
+ snippets/reflection_explanation.py
87
+ snippets/tool_use_calculator.py
88
+ snippets/tool_use_data_processing.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pygeai-orchestration"
7
- version = "0.1.0b4"
7
+ version = "0.1.0b6"
8
8
  description = "Agentic AI orchestration patterns built on Globant Enterprise AI"
9
9
  requires-python = ">=3.10"
10
10
  keywords = [ "geai", "pygeai", "orchestration", "agents", "ai", "multi-agent", "autogen", "crewai",]