oagi-core 0.10.3__tar.gz → 0.12.0__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 (131) hide show
  1. oagi_core-0.12.0/.github/ISSUE_TEMPLATE/bug-report.yml +86 -0
  2. oagi_core-0.12.0/.github/ISSUE_TEMPLATE/config.yml +6 -0
  3. oagi_core-0.12.0/.github/ISSUE_TEMPLATE/feature-request.yml +37 -0
  4. oagi_core-0.12.0/.github/ISSUE_TEMPLATE/question.yml +22 -0
  5. {oagi_core-0.10.3 → oagi_core-0.12.0}/PKG-INFO +90 -10
  6. {oagi_core-0.10.3 → oagi_core-0.12.0}/README.md +80 -1
  7. oagi_core-0.12.0/examples/openai_agent_loop_example.py +118 -0
  8. {oagi_core-0.10.3 → oagi_core-0.12.0}/metapackage/pyproject.toml +2 -2
  9. {oagi_core-0.10.3 → oagi_core-0.12.0}/metapackage/uv.lock +5 -5
  10. {oagi_core-0.10.3 → oagi_core-0.12.0}/pyproject.toml +10 -9
  11. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/__init__.py +1 -3
  12. {oagi_core-0.10.3/src/oagi/task → oagi_core-0.12.0/src/oagi/actor}/async_.py +23 -7
  13. {oagi_core-0.10.3/src/oagi/task → oagi_core-0.12.0/src/oagi/actor}/async_short.py +1 -1
  14. oagi_core-0.12.0/src/oagi/actor/base.py +222 -0
  15. {oagi_core-0.10.3/src/oagi/task → oagi_core-0.12.0/src/oagi/actor}/short.py +1 -1
  16. {oagi_core-0.10.3/src/oagi/task → oagi_core-0.12.0/src/oagi/actor}/sync.py +21 -5
  17. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/default.py +5 -0
  18. oagi_core-0.12.0/src/oagi/agent/factories.py +162 -0
  19. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/observer/exporters.py +6 -0
  20. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/observer/report_template.html +19 -0
  21. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/tasker/planner.py +31 -19
  22. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/tasker/taskee_agent.py +26 -7
  23. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/tasker/tasker_agent.py +4 -0
  24. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/cli/agent.py +54 -30
  25. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/client/async_.py +54 -96
  26. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/client/base.py +81 -133
  27. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/client/sync.py +52 -99
  28. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/constants.py +7 -2
  29. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/handler/__init__.py +16 -0
  30. oagi_core-0.12.0/src/oagi/handler/_macos.py +192 -0
  31. oagi_core-0.12.0/src/oagi/handler/_windows.py +101 -0
  32. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/handler/async_pyautogui_action_handler.py +8 -0
  33. oagi_core-0.12.0/src/oagi/handler/capslock_manager.py +55 -0
  34. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/handler/pyautogui_action_handler.py +21 -39
  35. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/server/session_store.py +3 -3
  36. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/server/socketio_server.py +4 -4
  37. oagi_core-0.12.0/src/oagi/task/__init__.py +35 -0
  38. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/__init__.py +2 -1
  39. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/models/__init__.py +0 -2
  40. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/models/action.py +4 -1
  41. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/models/client.py +1 -17
  42. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/step_observer.py +2 -0
  43. oagi_core-0.12.0/src/oagi/types/url.py +28 -0
  44. oagi_core-0.12.0/src/oagi/utils/__init__.py +12 -0
  45. oagi_core-0.12.0/src/oagi/utils/output_parser.py +166 -0
  46. oagi_core-0.12.0/src/oagi/utils/prompt_builder.py +44 -0
  47. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/conftest.py +51 -81
  48. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_action_parsing.py +3 -0
  49. oagi_core-0.12.0/tests/test_actor.py +503 -0
  50. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_agent/test_default_agent.py +1 -0
  51. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_agent_registry.py +4 -3
  52. oagi_core-0.12.0/tests/test_async_actor.py +190 -0
  53. oagi_core-0.12.0/tests/test_async_client.py +293 -0
  54. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_logging.py +12 -99
  55. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_planner.py +10 -5
  56. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_pyautogui_action_handler.py +102 -29
  57. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_server/test_session_store.py +2 -2
  58. oagi_core-0.12.0/tests/test_sync_client.py +268 -0
  59. oagi_core-0.12.0/tests/utils/__init__.py +7 -0
  60. oagi_core-0.12.0/tests/utils/test_output_parser.py +256 -0
  61. {oagi_core-0.10.3 → oagi_core-0.12.0}/uv.lock +148 -9
  62. oagi_core-0.10.3/src/oagi/agent/factories.py +0 -90
  63. oagi_core-0.10.3/src/oagi/handler/_macos.py +0 -55
  64. oagi_core-0.10.3/src/oagi/task/base.py +0 -158
  65. oagi_core-0.10.3/src/oagi/types/url.py +0 -3
  66. oagi_core-0.10.3/tests/test_actor.py +0 -440
  67. oagi_core-0.10.3/tests/test_async_actor.py +0 -180
  68. oagi_core-0.10.3/tests/test_async_client.py +0 -385
  69. oagi_core-0.10.3/tests/test_sync_client.py +0 -603
  70. {oagi_core-0.10.3 → oagi_core-0.12.0}/.github/workflows/ci.yml +0 -0
  71. {oagi_core-0.10.3 → oagi_core-0.12.0}/.github/workflows/release.yml +0 -0
  72. {oagi_core-0.10.3 → oagi_core-0.12.0}/.gitignore +0 -0
  73. {oagi_core-0.10.3 → oagi_core-0.12.0}/.python-version +0 -0
  74. {oagi_core-0.10.3 → oagi_core-0.12.0}/CONTRIBUTING.md +0 -0
  75. {oagi_core-0.10.3 → oagi_core-0.12.0}/LICENSE +0 -0
  76. {oagi_core-0.10.3 → oagi_core-0.12.0}/Makefile +0 -0
  77. {oagi_core-0.10.3 → oagi_core-0.12.0}/examples/async_google_weather.py +0 -0
  78. {oagi_core-0.10.3 → oagi_core-0.12.0}/examples/execute_task_auto.py +0 -0
  79. {oagi_core-0.10.3 → oagi_core-0.12.0}/examples/execute_task_manual.py +0 -0
  80. {oagi_core-0.10.3 → oagi_core-0.12.0}/examples/google_weather.py +0 -0
  81. {oagi_core-0.10.3 → oagi_core-0.12.0}/examples/screenshot_with_config.py +0 -0
  82. {oagi_core-0.10.3 → oagi_core-0.12.0}/examples/tasker_agent_example.py +0 -0
  83. {oagi_core-0.10.3/src/oagi/task → oagi_core-0.12.0/src/oagi/actor}/__init__.py +0 -0
  84. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/__init__.py +0 -0
  85. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/observer/__init__.py +0 -0
  86. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/observer/agent_observer.py +0 -0
  87. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/observer/events.py +0 -0
  88. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/observer/protocol.py +0 -0
  89. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/protocol.py +0 -0
  90. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/registry.py +0 -0
  91. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/tasker/__init__.py +0 -0
  92. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/tasker/memory.py +0 -0
  93. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/agent/tasker/models.py +0 -0
  94. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/cli/__init__.py +0 -0
  95. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/cli/display.py +0 -0
  96. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/cli/main.py +0 -0
  97. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/cli/server.py +0 -0
  98. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/cli/tracking.py +0 -0
  99. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/cli/utils.py +0 -0
  100. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/client/__init__.py +0 -0
  101. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/exceptions.py +0 -0
  102. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/handler/async_screenshot_maker.py +0 -0
  103. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/handler/pil_image.py +0 -0
  104. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/handler/screenshot_maker.py +0 -0
  105. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/logging.py +0 -0
  106. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/server/__init__.py +0 -0
  107. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/server/agent_wrappers.py +0 -0
  108. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/server/config.py +0 -0
  109. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/server/main.py +0 -0
  110. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/server/models.py +0 -0
  111. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/action_handler.py +0 -0
  112. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/async_action_handler.py +0 -0
  113. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/async_image_provider.py +0 -0
  114. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/image.py +0 -0
  115. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/image_provider.py +0 -0
  116. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/models/image_config.py +0 -0
  117. {oagi_core-0.10.3 → oagi_core-0.12.0}/src/oagi/types/models/step.py +0 -0
  118. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/__init__.py +0 -0
  119. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_agent/test_agent_wrappers.py +0 -0
  120. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_async_handlers.py +0 -0
  121. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_cli.py +0 -0
  122. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_mac_double_click.py +0 -0
  123. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_observer.py +0 -0
  124. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_pil_image.py +0 -0
  125. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_planner_memory.py +0 -0
  126. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_screenshot_maker.py +0 -0
  127. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_server/__init__.py +0 -0
  128. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_server/test_config.py +0 -0
  129. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_server/test_socketio_integration.py +0 -0
  130. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_taskee_agent.py +0 -0
  131. {oagi_core-0.10.3 → oagi_core-0.12.0}/tests/test_tasker_agent.py +0 -0
@@ -0,0 +1,86 @@
1
+ name: Bug report
2
+ description: Report a problem installing or using the OpenAGI (oagi) Python SDK.
3
+ title: "[Bug]: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: checkboxes
7
+ id: checks
8
+ attributes:
9
+ label: Pre-checks
10
+ options:
11
+ - label: I have searched existing issues.
12
+ required: true
13
+ - label: I am using Python 3.10 or newer (per docs).
14
+ required: true
15
+ - label: I included the full error output/logs.
16
+ required: false
17
+ - type: input
18
+ id: version
19
+ attributes:
20
+ label: oagi package version
21
+ description: Output of `pip show oagi`.
22
+ placeholder: e.g. 0.11.0
23
+ validations:
24
+ required: true
25
+ - type: dropdown
26
+ id: python
27
+ attributes:
28
+ label: Python version (docs require 3.10+)
29
+ options:
30
+ - 3.10
31
+ - 3.11
32
+ - 3.12
33
+ - 3.13
34
+ - Other (>=3.10)
35
+ validations:
36
+ required: true
37
+ - type: dropdown
38
+ id: os
39
+ attributes:
40
+ label: Operating system
41
+ options:
42
+ - Windows
43
+ - macOS
44
+ - Linux
45
+ validations:
46
+ required: true
47
+ - type: dropdown
48
+ id: installer
49
+ attributes:
50
+ label: How did you install? (docs recommend `pip install oagi`)
51
+ options:
52
+ - pip
53
+ - uv
54
+ - other
55
+ validations:
56
+ required: true
57
+ - type: textarea
58
+ id: steps
59
+ attributes:
60
+ label: Steps to reproduce
61
+ description: Include exact commands and any virtual env/tooling used.
62
+ placeholder: |
63
+ 1. ...
64
+ 2. ...
65
+ validations:
66
+ required: true
67
+ - type: textarea
68
+ id: expected
69
+ attributes:
70
+ label: Expected behavior
71
+ validations:
72
+ required: true
73
+ - type: textarea
74
+ id: actual
75
+ attributes:
76
+ label: Actual behavior and logs
77
+ description: Paste full traceback/build logs if applicable.
78
+ render: shell
79
+ validations:
80
+ required: true
81
+ - type: textarea
82
+ id: extra
83
+ attributes:
84
+ label: Additional context
85
+ description: Environment details, proxies, system architecture, etc.
86
+
@@ -0,0 +1,6 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation & API reference
4
+ url: https://developer.agiopen.org/docs/index
5
+ about: Review the OpenAGI docs before filing an issue.
6
+
@@ -0,0 +1,37 @@
1
+ name: Feature request
2
+ description: Suggest an improvement or new capability for the OAGI Python SDK.
3
+ title: "[Feature]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: textarea
7
+ id: summary
8
+ attributes:
9
+ label: Summary
10
+ description: Short description of the feature.
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: problem
15
+ attributes:
16
+ label: Problem to solve
17
+ description: What problem or workflow does this address?
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: proposal
22
+ attributes:
23
+ label: Proposed solution
24
+ description: Describe the desired behavior or API shape.
25
+ validations:
26
+ required: true
27
+ - type: textarea
28
+ id: alternatives
29
+ attributes:
30
+ label: Alternatives considered
31
+ description: Other approaches you tried or considered.
32
+ - type: textarea
33
+ id: extra
34
+ attributes:
35
+ label: Additional context
36
+ description: Screenshots, links, or related issues.
37
+
@@ -0,0 +1,22 @@
1
+ name: Question
2
+ description: Ask a question about using the OAGI Python SDK.
3
+ title: "[Question]: "
4
+ labels: ["question"]
5
+ body:
6
+ - type: textarea
7
+ id: question
8
+ attributes:
9
+ label: What do you need help with?
10
+ validations:
11
+ required: true
12
+ - type: input
13
+ id: version
14
+ attributes:
15
+ label: Relevant package/version info
16
+ description: e.g. oagi version, Python version.
17
+ - type: textarea
18
+ id: context
19
+ attributes:
20
+ label: Context
21
+ description: What you tried, expected results, and any logs.
22
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: oagi-core
3
- Version: 0.10.3
3
+ Version: 0.12.0
4
4
  Summary: Official API of OpenAGI Foundation
5
5
  Project-URL: Homepage, https://github.com/agiopen-org/oagi
6
6
  Author-email: OpenAGI Foundation <contact@agiopen.org>
@@ -26,25 +26,71 @@ License: MIT License
26
26
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
27
  SOFTWARE.
28
28
  Requires-Python: >=3.10
29
- Requires-Dist: httpx>=0.28.0
29
+ Requires-Dist: httpx>=0.24.0
30
+ Requires-Dist: openai>=1.3.0
30
31
  Requires-Dist: pydantic>=2.0.0
31
- Requires-Dist: rich>=13.0.0
32
+ Requires-Dist: rich>=10.0.0
32
33
  Provides-Extra: desktop
33
- Requires-Dist: pillow>=11.3.0; extra == 'desktop'
34
+ Requires-Dist: pillow>=9.0.0; extra == 'desktop'
34
35
  Requires-Dist: pyautogui>=0.9.54; extra == 'desktop'
35
- Requires-Dist: pyobjc-framework-applicationservices>=9.0; (sys_platform == 'darwin') and extra == 'desktop'
36
- Requires-Dist: pyobjc-framework-quartz>=9.0; (sys_platform == 'darwin') and extra == 'desktop'
36
+ Requires-Dist: pyobjc-framework-applicationservices>=8.0; (sys_platform == 'darwin') and extra == 'desktop'
37
+ Requires-Dist: pyobjc-framework-quartz>=8.0; (sys_platform == 'darwin') and extra == 'desktop'
37
38
  Provides-Extra: server
38
- Requires-Dist: fastapi[standard]>=0.115.0; extra == 'server'
39
+ Requires-Dist: fastapi[standard]>=0.100.0; extra == 'server'
39
40
  Requires-Dist: pydantic-settings>=2.0.0; extra == 'server'
40
- Requires-Dist: python-socketio>=5.11.0; extra == 'server'
41
- Requires-Dist: uvicorn[standard]>=0.32.0; extra == 'server'
41
+ Requires-Dist: python-socketio>=5.5.0; extra == 'server'
42
+ Requires-Dist: uvicorn[standard]>=0.20.0; extra == 'server'
42
43
  Description-Content-Type: text/markdown
43
44
 
44
45
  # OAGI Python SDK
45
46
 
47
+ [![PyPI version](https://img.shields.io/pypi/v/oagi-core)](https://pypi.org/project/oagi-core/)
48
+ [![Python version](https://img.shields.io/pypi/pyversions/oagi-core)](https://pypi.org/project/oagi-core/)
49
+ [![License](https://img.shields.io/github/license/agiopen-org/oagi-python)](https://github.com/agiopen-org/oagi-python/blob/main/LICENSE)
50
+ [![Build status](https://img.shields.io/github/actions/workflow/status/agiopen-org/oagi-python/ci.yml?branch=main)](https://github.com/agiopen-org/oagi-python/actions/workflows/ci.yml)
51
+
46
52
  Python SDK for the OAGI API - vision-based task automation.
47
53
 
54
+ ## What is OAGI?
55
+
56
+ OAGI is the Python SDK for **Lux**, the world's most advanced computer-use model from the OpenAGI Foundation.
57
+
58
+ **Computer Use** is AI's ability to operate human-facing software — not just through APIs, but by operating computers natively, just as human users do. It's a paradigm shift in what AI can do: not just generating, reasoning, or researching, but actually operating on your computer.
59
+
60
+ Lux comes in three modes, giving you control over depth, speed, and style of execution:
61
+
62
+ - **Tasker** — Strictly follows step-by-step instructions with ultra-stable, controllable execution
63
+ - **Actor** — Ideal for immediate tasks, completing actions at near-instant speed
64
+ - **Thinker** — Understands vague, complex goals, performing hour-long executions
65
+
66
+ ### Use Cases
67
+
68
+ With Lux, possibilities are endless. Here are a few examples:
69
+
70
+ - **Web Scraping & Data Crawl** — Navigate websites, sort results, and collect product information autonomously
71
+ - **Software QA** — Automate repetitive testing tasks, navigate applications, perform test actions, and validate expected behaviors
72
+ - **Financial Data Extraction** — Navigate to sites like NASDAQ and extract insider activity data
73
+ - **Data Entry** — Enter accurate data across dashboards and forms
74
+ - **Workflow Automation** — Chain together multi-step tasks across different applications
75
+
76
+ ## Table of Contents
77
+
78
+ - [What is OAGI?](#what-is-oagi)
79
+ - [Installation](#installation)
80
+ - [Quick Start](#quick-start)
81
+ - [Automated Task Execution](#automated-task-execution)
82
+ - [Command Line Interface](#command-line-interface)
83
+ - [Image Processing](#image-processing)
84
+ - [Manual Control with Actor](#manual-control-with-actor)
85
+ - [Examples](#examples)
86
+ - [Socket.IO Server (Optional)](#socketio-server-optional)
87
+ - [Installation](#installation-1)
88
+ - [Running the Server](#running-the-server)
89
+ - [Server Features](#server-features)
90
+ - [Client Integration](#client-integration)
91
+ - [Documentation](#documentation)
92
+ - [License](#license)
93
+
48
94
  ## Installation
49
95
 
50
96
  ```bash
@@ -74,7 +120,7 @@ pip install oagi-core[server] # Server support
74
120
 
75
121
  Set your API credentials:
76
122
  ```bash
77
- export OAGI_API_KEY="your-api-key" # get your API key from https://developer.openagi.org/
123
+ export OAGI_API_KEY="your-api-key" # get your API key from https://developer.agiopen.org/
78
124
  # export OAGI_BASE_URL="https://api.agiopen.org/", # optional, defaults to production endpoint
79
125
  ```
80
126
 
@@ -116,6 +162,39 @@ config = PyautoguiConfig(
116
162
  action_handler = AsyncPyautoguiActionHandler(config=config)
117
163
  ```
118
164
 
165
+ ### Command Line Interface
166
+
167
+ Run agents directly from the terminal:
168
+
169
+ ```bash
170
+ # Run with actor model
171
+ oagi agent run "Go to nasdaq.com, search for AAPL. Under More, go to Insider Activity" --model lux-actor-1
172
+
173
+ # Run with thinker mode (uses lux-thinker-1 model with more steps)
174
+ oagi agent run "Look up the store hours for the nearest Apple Store to zip code 23456 using the Apple Store Locator" --model lux-thinker-1
175
+
176
+ # Run pre-configured tasker workflows (no instruction needed)
177
+ oagi agent run --mode tasker:software_qa
178
+
179
+ # List all available modes
180
+ oagi agent modes
181
+
182
+ # Check macOS permissions (screen recording & accessibility)
183
+ oagi agent permission
184
+
185
+ # Export execution history
186
+ oagi agent run "Complete the form" --export html --export-file report.html
187
+ ```
188
+
189
+ CLI options:
190
+ - `--mode`: Agent mode (default: actor). Use `oagi agent modes` to list available modes
191
+ - `--model`: Override the model (default: determined by mode)
192
+ - `--max-steps`: Maximum steps (default: determined by mode)
193
+ - `--temperature`: Sampling temperature (default: determined by mode)
194
+ - `--step-delay`: Delay after each action before next screenshot (default: 0.3s)
195
+ - `--export`: Export format (markdown, html, json)
196
+ - `--export-file`: Output file path for export
197
+
119
198
  ### Image Processing
120
199
 
121
200
  Process and optimize images before sending to API:
@@ -239,6 +318,7 @@ See [`examples/socketio_client_example.py`](examples/socketio_client_example.py)
239
318
 
240
319
  ## Documentation
241
320
 
321
+ For full Lux documentation and guides, visit the [OAGI Developer Documentation](https://developer.agiopen.org/docs/index).
242
322
 
243
323
  ## License
244
324
 
@@ -1,7 +1,52 @@
1
1
  # OAGI Python SDK
2
2
 
3
+ [![PyPI version](https://img.shields.io/pypi/v/oagi-core)](https://pypi.org/project/oagi-core/)
4
+ [![Python version](https://img.shields.io/pypi/pyversions/oagi-core)](https://pypi.org/project/oagi-core/)
5
+ [![License](https://img.shields.io/github/license/agiopen-org/oagi-python)](https://github.com/agiopen-org/oagi-python/blob/main/LICENSE)
6
+ [![Build status](https://img.shields.io/github/actions/workflow/status/agiopen-org/oagi-python/ci.yml?branch=main)](https://github.com/agiopen-org/oagi-python/actions/workflows/ci.yml)
7
+
3
8
  Python SDK for the OAGI API - vision-based task automation.
4
9
 
10
+ ## What is OAGI?
11
+
12
+ OAGI is the Python SDK for **Lux**, the world's most advanced computer-use model from the OpenAGI Foundation.
13
+
14
+ **Computer Use** is AI's ability to operate human-facing software — not just through APIs, but by operating computers natively, just as human users do. It's a paradigm shift in what AI can do: not just generating, reasoning, or researching, but actually operating on your computer.
15
+
16
+ Lux comes in three modes, giving you control over depth, speed, and style of execution:
17
+
18
+ - **Tasker** — Strictly follows step-by-step instructions with ultra-stable, controllable execution
19
+ - **Actor** — Ideal for immediate tasks, completing actions at near-instant speed
20
+ - **Thinker** — Understands vague, complex goals, performing hour-long executions
21
+
22
+ ### Use Cases
23
+
24
+ With Lux, possibilities are endless. Here are a few examples:
25
+
26
+ - **Web Scraping & Data Crawl** — Navigate websites, sort results, and collect product information autonomously
27
+ - **Software QA** — Automate repetitive testing tasks, navigate applications, perform test actions, and validate expected behaviors
28
+ - **Financial Data Extraction** — Navigate to sites like NASDAQ and extract insider activity data
29
+ - **Data Entry** — Enter accurate data across dashboards and forms
30
+ - **Workflow Automation** — Chain together multi-step tasks across different applications
31
+
32
+ ## Table of Contents
33
+
34
+ - [What is OAGI?](#what-is-oagi)
35
+ - [Installation](#installation)
36
+ - [Quick Start](#quick-start)
37
+ - [Automated Task Execution](#automated-task-execution)
38
+ - [Command Line Interface](#command-line-interface)
39
+ - [Image Processing](#image-processing)
40
+ - [Manual Control with Actor](#manual-control-with-actor)
41
+ - [Examples](#examples)
42
+ - [Socket.IO Server (Optional)](#socketio-server-optional)
43
+ - [Installation](#installation-1)
44
+ - [Running the Server](#running-the-server)
45
+ - [Server Features](#server-features)
46
+ - [Client Integration](#client-integration)
47
+ - [Documentation](#documentation)
48
+ - [License](#license)
49
+
5
50
  ## Installation
6
51
 
7
52
  ```bash
@@ -31,7 +76,7 @@ pip install oagi-core[server] # Server support
31
76
 
32
77
  Set your API credentials:
33
78
  ```bash
34
- export OAGI_API_KEY="your-api-key" # get your API key from https://developer.openagi.org/
79
+ export OAGI_API_KEY="your-api-key" # get your API key from https://developer.agiopen.org/
35
80
  # export OAGI_BASE_URL="https://api.agiopen.org/", # optional, defaults to production endpoint
36
81
  ```
37
82
 
@@ -73,6 +118,39 @@ config = PyautoguiConfig(
73
118
  action_handler = AsyncPyautoguiActionHandler(config=config)
74
119
  ```
75
120
 
121
+ ### Command Line Interface
122
+
123
+ Run agents directly from the terminal:
124
+
125
+ ```bash
126
+ # Run with actor model
127
+ oagi agent run "Go to nasdaq.com, search for AAPL. Under More, go to Insider Activity" --model lux-actor-1
128
+
129
+ # Run with thinker mode (uses lux-thinker-1 model with more steps)
130
+ oagi agent run "Look up the store hours for the nearest Apple Store to zip code 23456 using the Apple Store Locator" --model lux-thinker-1
131
+
132
+ # Run pre-configured tasker workflows (no instruction needed)
133
+ oagi agent run --mode tasker:software_qa
134
+
135
+ # List all available modes
136
+ oagi agent modes
137
+
138
+ # Check macOS permissions (screen recording & accessibility)
139
+ oagi agent permission
140
+
141
+ # Export execution history
142
+ oagi agent run "Complete the form" --export html --export-file report.html
143
+ ```
144
+
145
+ CLI options:
146
+ - `--mode`: Agent mode (default: actor). Use `oagi agent modes` to list available modes
147
+ - `--model`: Override the model (default: determined by mode)
148
+ - `--max-steps`: Maximum steps (default: determined by mode)
149
+ - `--temperature`: Sampling temperature (default: determined by mode)
150
+ - `--step-delay`: Delay after each action before next screenshot (default: 0.3s)
151
+ - `--export`: Export format (markdown, html, json)
152
+ - `--export-file`: Output file path for export
153
+
76
154
  ### Image Processing
77
155
 
78
156
  Process and optimize images before sending to API:
@@ -196,6 +274,7 @@ See [`examples/socketio_client_example.py`](examples/socketio_client_example.py)
196
274
 
197
275
  ## Documentation
198
276
 
277
+ For full Lux documentation and guides, visit the [OAGI Developer Documentation](https://developer.agiopen.org/docs/index).
199
278
 
200
279
  ## License
201
280
 
@@ -0,0 +1,118 @@
1
+ # -----------------------------------------------------------------------------
2
+ # Copyright (c) OpenAGI Foundation
3
+ # All rights reserved.
4
+ #
5
+ # This file is part of the official API project.
6
+ # Licensed under the MIT License.
7
+ # -----------------------------------------------------------------------------
8
+ """
9
+ Example: OpenAI-Compatible Agent Loop
10
+
11
+ This example demonstrates how to build an agent loop using:
12
+ 1. OAGI file upload for screenshots
13
+ 2. OAGI action handler for execution
14
+ 3. OAGI utilities for prompt building and action parsing
15
+ 4. OpenAI-compatible API endpoint for LLM calls
16
+
17
+ Environment variables:
18
+ - OAGI_API_KEY: Your OAGI API key
19
+ - OAGI_BASE_URL: API base URL (default: https://api.agiopen.org)
20
+ """
21
+
22
+ import os
23
+
24
+ from openai import OpenAI
25
+
26
+ from oagi import PyautoguiActionHandler, ScreenshotMaker, SyncClient
27
+ from oagi.utils.output_parser import parse_raw_output
28
+ from oagi.utils.prompt_builder import build_prompt
29
+
30
+ DEFAULT_BASE_URL = "https://api.agiopen.org"
31
+ DEFAULT_MODEL = "lux-actor-1"
32
+
33
+
34
+ def agent_loop(task_description: str, max_steps: int = 10) -> bool:
35
+ """
36
+ Run an agent loop to complete a task.
37
+
38
+ Args:
39
+ task_description: The task to complete
40
+ max_steps: Maximum number of steps to take
41
+
42
+ Returns:
43
+ True if task completed, False if max steps reached
44
+ """
45
+ # Get configuration from environment
46
+ api_key = os.environ.get("OAGI_API_KEY")
47
+ base_url = os.environ.get("OAGI_BASE_URL", DEFAULT_BASE_URL)
48
+
49
+ if not api_key:
50
+ raise ValueError("OAGI_API_KEY environment variable is required")
51
+
52
+ # Initialize clients and handlers
53
+ oagi_client = SyncClient(api_key=api_key, base_url=base_url)
54
+ openai_client = OpenAI(api_key=api_key, base_url=f"{base_url}/v1")
55
+ action_handler = PyautoguiActionHandler()
56
+ image_provider = ScreenshotMaker()
57
+
58
+ messages: list[dict] = []
59
+
60
+ print(f"Starting task: {task_description}")
61
+ print(f"Max steps: {max_steps}")
62
+ print("-" * 50)
63
+
64
+ try:
65
+ for step_num in range(max_steps):
66
+ # 1. Capture screenshot
67
+ screenshot = image_provider()
68
+
69
+ # 2. Upload to S3
70
+ upload_resp = oagi_client.put_s3_presigned_url(screenshot)
71
+ screenshot_url = upload_resp.download_url
72
+
73
+ # 3. Build message (with prompt on first step)
74
+ content = []
75
+ if step_num == 0:
76
+ content.append({"type": "text", "text": build_prompt(task_description)})
77
+ content.append({"type": "image_url", "image_url": {"url": screenshot_url}})
78
+ messages.append({"role": "user", "content": content})
79
+
80
+ # 4. Call OpenAI-compatible API
81
+ response = openai_client.chat.completions.create(
82
+ model=DEFAULT_MODEL,
83
+ messages=messages,
84
+ )
85
+ raw_output = response.choices[0].message.content or ""
86
+
87
+ # 5. Add assistant message to history
88
+ messages.append({"role": "assistant", "content": raw_output})
89
+
90
+ # 6. Parse output using oagi utility
91
+ step = parse_raw_output(raw_output)
92
+ print(f"Step {step_num}: {step.reason}")
93
+ print(f" Actions: {step.actions}")
94
+
95
+ # 7. Check for completion
96
+ if step.stop:
97
+ print("-" * 50)
98
+ print("Task completed!")
99
+ return True
100
+
101
+ # 8. Execute actions
102
+ action_handler(step.actions)
103
+
104
+ print("-" * 50)
105
+ print("Max steps reached without completion")
106
+ return False
107
+
108
+ finally:
109
+ oagi_client.close()
110
+ openai_client.close()
111
+
112
+
113
+ if __name__ == "__main__":
114
+ # Example task
115
+ task = "Find some shoes on amazon"
116
+
117
+ success = agent_loop(task, max_steps=20)
118
+ print(f"\nFinal result: {'Success' if success else 'Failed'}")
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "oagi"
7
- version = "0.10.3"
7
+ version = "0.12.0"
8
8
  description = "Official API of OpenAGI Foundation (metapackage with all features)"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -16,7 +16,7 @@ authors = [
16
16
  requires-python = ">= 3.10"
17
17
 
18
18
  dependencies = [
19
- "oagi-core[desktop,server]==0.10.3",
19
+ "oagi-core[desktop,server]==0.12.0",
20
20
  ]
21
21
 
22
22
  [project.urls]
@@ -397,27 +397,27 @@ sdist = { url = "https://files.pythonhosted.org/packages/28/fa/b2ba8229b9381e8f6
397
397
 
398
398
  [[package]]
399
399
  name = "oagi"
400
- version = "0.10.3"
400
+ version = "0.12.0"
401
401
  source = { editable = "." }
402
402
  dependencies = [
403
403
  { name = "oagi-core", extra = ["desktop", "server"] },
404
404
  ]
405
405
 
406
406
  [package.metadata]
407
- requires-dist = [{ name = "oagi-core", extras = ["desktop", "server"], specifier = "==0.10.2" }]
407
+ requires-dist = [{ name = "oagi-core", extras = ["desktop", "server"], specifier = "==0.11.0" }]
408
408
 
409
409
  [[package]]
410
410
  name = "oagi-core"
411
- version = "0.10.2"
411
+ version = "0.11.0"
412
412
  source = { registry = "https://pypi.org/simple" }
413
413
  dependencies = [
414
414
  { name = "httpx" },
415
415
  { name = "pydantic" },
416
416
  { name = "rich" },
417
417
  ]
418
- sdist = { url = "https://files.pythonhosted.org/packages/07/2f/11b7e37049b2faa1e1147a75624c024a93c32287f243c213ca96fc096452/oagi_core-0.10.2.tar.gz", hash = "sha256:2d7fb47031cdc2155ea5ea9c06b4b58c0d70091de95a36fa4dedf5d710a09862", size = 267130, upload-time = "2025-11-26T13:50:36.977Z" }
418
+ sdist = { url = "https://files.pythonhosted.org/packages/aa/ea/dab8d3e9eb7cf98de7aa5cc993a76ee3bd082e9ba78c09256f6f2a1e06ae/oagi_core-0.11.0.tar.gz", hash = "sha256:b8e0a78b7d6253ba969ffc8256d6f5cbea226d0fedc28935664875c12b8a391a", size = 273296, upload-time = "2025-12-01T09:33:52.654Z" }
419
419
  wheels = [
420
- { url = "https://files.pythonhosted.org/packages/d0/c8/a1d95327afe6237eaf474d74ba66461e51baaf5948d458cb12be62dbf8a8/oagi_core-0.10.2-py3-none-any.whl", hash = "sha256:3b9dd3ade24a1c605d671ed7f35efcd00f729be603a63173c7f92f8177d56750", size = 87220, upload-time = "2025-11-26T13:50:35.872Z" },
420
+ { url = "https://files.pythonhosted.org/packages/5a/b8/6c9a2f0d5295c66875d2c7dd5d3057c6d71b468baea3737a3a7c1153e0f6/oagi_core-0.11.0-py3-none-any.whl", hash = "sha256:59e47e6e6f2fff30665d748dcf0afde5a84c8da1529ed4da4e3d96803d4005d6", size = 94638, upload-time = "2025-12-01T09:33:51.435Z" },
421
421
  ]
422
422
 
423
423
  [package.optional-dependencies]
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "oagi-core"
7
- version = "0.10.3"
7
+ version = "0.12.0"
8
8
  description = "Official API of OpenAGI Foundation"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -15,9 +15,10 @@ authors = [
15
15
  requires-python = ">= 3.10"
16
16
 
17
17
  dependencies = [
18
- "httpx>=0.28.0",
18
+ "httpx>=0.24.0",
19
+ "openai>=1.3.0",
19
20
  "pydantic>=2.0.0",
20
- "rich>=13.0.0",
21
+ "rich>=10.0.0",
21
22
  ]
22
23
 
23
24
  [project.urls]
@@ -28,15 +29,15 @@ oagi = "oagi.cli.main:main"
28
29
 
29
30
  [project.optional-dependencies]
30
31
  desktop = [
31
- "pillow>=11.3.0",
32
+ "pillow>=9.0.0",
32
33
  "pyautogui>=0.9.54",
33
- "pyobjc-framework-Quartz>=9.0; sys_platform == 'darwin'",
34
- "pyobjc-framework-ApplicationServices>=9.0; sys_platform == 'darwin'",
34
+ "pyobjc-framework-Quartz>=8.0; sys_platform == 'darwin'",
35
+ "pyobjc-framework-ApplicationServices>=8.0; sys_platform == 'darwin'",
35
36
  ]
36
37
  server = [
37
- "fastapi[standard]>=0.115.0",
38
- "uvicorn[standard]>=0.32.0",
39
- "python-socketio>=5.11.0",
38
+ "fastapi[standard]>=0.100.0",
39
+ "uvicorn[standard]>=0.20.0",
40
+ "python-socketio>=5.5.0",
40
41
  "pydantic-settings>=2.0.0",
41
42
  ]
42
43
 
@@ -8,6 +8,7 @@
8
8
  import importlib
9
9
  from typing import TYPE_CHECKING
10
10
 
11
+ from oagi.actor import Actor, AsyncActor, AsyncShortTask, AsyncTask, ShortTask, Task
11
12
  from oagi.client import AsyncClient, SyncClient
12
13
  from oagi.exceptions import (
13
14
  APIError,
@@ -22,13 +23,11 @@ from oagi.exceptions import (
22
23
  ValidationError,
23
24
  check_optional_dependency,
24
25
  )
25
- from oagi.task import Actor, AsyncActor, AsyncShortTask, AsyncTask, ShortTask, Task
26
26
  from oagi.types import ImageConfig
27
27
  from oagi.types.models import (
28
28
  ErrorDetail,
29
29
  ErrorResponse,
30
30
  GenerateResponse,
31
- LLMResponse,
32
31
  UploadFileResponse,
33
32
  )
34
33
 
@@ -116,7 +115,6 @@ __all__ = [
116
115
  # Configuration
117
116
  "ImageConfig",
118
117
  # Response models
119
- "LLMResponse",
120
118
  "GenerateResponse",
121
119
  "UploadFileResponse",
122
120
  "ErrorResponse",