nimble_python 0.15.0__tar.gz → 0.16.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 (143) hide show
  1. nimble_python-0.16.0/.release-please-manifest.json +3 -0
  2. {nimble_python-0.15.0 → nimble_python-0.16.0}/CHANGELOG.md +12 -0
  3. {nimble_python-0.15.0 → nimble_python-0.16.0}/PKG-INFO +1 -1
  4. {nimble_python-0.15.0 → nimble_python-0.16.0}/api.md +6 -0
  5. {nimble_python-0.15.0 → nimble_python-0.16.0}/pyproject.toml +1 -1
  6. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_version.py +1 -1
  7. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/resources/agent.py +381 -7
  8. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/__init__.py +5 -0
  9. nimble_python-0.16.0/src/nimble_python/types/agent_generate_params.py +31 -0
  10. nimble_python-0.16.0/src/nimble_python/types/agent_generate_response.py +32 -0
  11. nimble_python-0.16.0/src/nimble_python/types/agent_get_generation_response.py +32 -0
  12. nimble_python-0.16.0/src/nimble_python/types/agent_publish_params.py +11 -0
  13. nimble_python-0.16.0/src/nimble_python/types/agent_publish_response.py +11 -0
  14. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/api_resources/test_agent.py +359 -0
  15. nimble_python-0.15.0/.release-please-manifest.json +0 -3
  16. {nimble_python-0.15.0 → nimble_python-0.16.0}/.gitignore +0 -0
  17. {nimble_python-0.15.0 → nimble_python-0.16.0}/CONTRIBUTING.md +0 -0
  18. {nimble_python-0.15.0 → nimble_python-0.16.0}/LICENSE +0 -0
  19. {nimble_python-0.15.0 → nimble_python-0.16.0}/README.md +0 -0
  20. {nimble_python-0.15.0 → nimble_python-0.16.0}/SECURITY.md +0 -0
  21. {nimble_python-0.15.0 → nimble_python-0.16.0}/bin/check-release-environment +0 -0
  22. {nimble_python-0.15.0 → nimble_python-0.16.0}/bin/publish-pypi +0 -0
  23. {nimble_python-0.15.0 → nimble_python-0.16.0}/examples/.keep +0 -0
  24. {nimble_python-0.15.0 → nimble_python-0.16.0}/release-please-config.json +0 -0
  25. {nimble_python-0.15.0 → nimble_python-0.16.0}/requirements-dev.lock +0 -0
  26. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/__init__.py +0 -0
  27. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_base_client.py +0 -0
  28. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_client.py +0 -0
  29. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_compat.py +0 -0
  30. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_constants.py +0 -0
  31. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_exceptions.py +0 -0
  32. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_files.py +0 -0
  33. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_models.py +0 -0
  34. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_qs.py +0 -0
  35. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_resource.py +0 -0
  36. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_response.py +0 -0
  37. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_streaming.py +0 -0
  38. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_types.py +0 -0
  39. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/__init__.py +0 -0
  40. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_compat.py +0 -0
  41. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_datetime_parse.py +0 -0
  42. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_json.py +0 -0
  43. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_logs.py +0 -0
  44. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_path.py +0 -0
  45. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_proxy.py +0 -0
  46. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_reflection.py +0 -0
  47. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_resources_proxy.py +0 -0
  48. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_streams.py +0 -0
  49. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_sync.py +0 -0
  50. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_transform.py +0 -0
  51. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_typing.py +0 -0
  52. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/_utils/_utils.py +0 -0
  53. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/lib/.keep +0 -0
  54. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/py.typed +0 -0
  55. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/resources/__init__.py +0 -0
  56. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/resources/batches.py +0 -0
  57. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/resources/crawl.py +0 -0
  58. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/resources/tasks.py +0 -0
  59. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_get_response.py +0 -0
  60. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_list_params.py +0 -0
  61. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_list_response.py +0 -0
  62. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_run_async_params.py +0 -0
  63. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_run_async_response.py +0 -0
  64. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_run_batch_params.py +0 -0
  65. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_run_batch_response.py +0 -0
  66. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_run_params.py +0 -0
  67. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/agent_run_response.py +0 -0
  68. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/batch_get_response.py +0 -0
  69. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/batch_progress_response.py +0 -0
  70. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/client_extract_async_params.py +0 -0
  71. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/client_extract_batch_params.py +0 -0
  72. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/client_extract_params.py +0 -0
  73. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/client_map_params.py +0 -0
  74. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/client_search_params.py +0 -0
  75. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/crawl_list_params.py +0 -0
  76. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/crawl_list_response.py +0 -0
  77. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/crawl_run_params.py +0 -0
  78. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/crawl_run_response.py +0 -0
  79. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/crawl_status_response.py +0 -0
  80. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/crawl_terminate_response.py +0 -0
  81. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/extract_async_response.py +0 -0
  82. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/extract_batch_response.py +0 -0
  83. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/extract_response.py +0 -0
  84. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/map_response.py +0 -0
  85. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/search_response.py +0 -0
  86. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/__init__.py +0 -0
  87. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/auto_scroll_action.py +0 -0
  88. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/click_action.py +0 -0
  89. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/eval_action.py +0 -0
  90. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/fetch_action.py +0 -0
  91. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/fill_action.py +0 -0
  92. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/get_cookies_action.py +0 -0
  93. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/goto_action.py +0 -0
  94. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/press_action.py +0 -0
  95. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/screenshot_action.py +0 -0
  96. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/scroll_action.py +0 -0
  97. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/wait_action.py +0 -0
  98. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/wait_for_element_action.py +0 -0
  99. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared/wait_for_navigation_action.py +0 -0
  100. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/__init__.py +0 -0
  101. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/auto_scroll_action.py +0 -0
  102. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/click_action.py +0 -0
  103. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/eval_action.py +0 -0
  104. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/fetch_action.py +0 -0
  105. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/fill_action.py +0 -0
  106. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/get_cookies_action.py +0 -0
  107. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/goto_action.py +0 -0
  108. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/press_action.py +0 -0
  109. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/screenshot_action.py +0 -0
  110. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/scroll_action.py +0 -0
  111. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/wait_action.py +0 -0
  112. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/wait_for_element_action.py +0 -0
  113. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/shared_params/wait_for_navigation_action.py +0 -0
  114. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/task_get_response.py +0 -0
  115. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/task_list_params.py +0 -0
  116. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/task_list_response.py +0 -0
  117. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimble_python/types/task_results_response.py +0 -0
  118. {nimble_python-0.15.0 → nimble_python-0.16.0}/src/nimbleway/lib/.keep +0 -0
  119. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/__init__.py +0 -0
  120. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/api_resources/__init__.py +0 -0
  121. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/api_resources/test_batches.py +0 -0
  122. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/api_resources/test_client.py +0 -0
  123. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/api_resources/test_crawl.py +0 -0
  124. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/api_resources/test_tasks.py +0 -0
  125. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/conftest.py +0 -0
  126. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/sample_file.txt +0 -0
  127. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_client.py +0 -0
  128. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_deepcopy.py +0 -0
  129. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_extract_files.py +0 -0
  130. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_files.py +0 -0
  131. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_models.py +0 -0
  132. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_qs.py +0 -0
  133. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_required_args.py +0 -0
  134. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_response.py +0 -0
  135. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_streaming.py +0 -0
  136. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_transform.py +0 -0
  137. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_utils/test_datetime_parse.py +0 -0
  138. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_utils/test_json.py +0 -0
  139. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_utils/test_path.py +0 -0
  140. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_utils/test_proxy.py +0 -0
  141. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/test_utils/test_typing.py +0 -0
  142. {nimble_python-0.15.0 → nimble_python-0.16.0}/tests/utils.py +0 -0
  143. {nimble_python-0.15.0 → nimble_python-0.16.0}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.16.0"
3
+ }
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.0 (2026-03-30)
4
+
5
+ Full Changelog: [v0.15.0...v0.16.0](https://github.com/Nimbleway/nimble-python/compare/v0.15.0...v0.16.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([3eace9f](https://github.com/Nimbleway/nimble-python/commit/3eace9fa853d589ff0753ed4b4964484dfb7405a))
10
+ * **api:** manual updates ([13646ce](https://github.com/Nimbleway/nimble-python/commit/13646ce53a4cc507d221f5d74d85a83727c2853a))
11
+ * **api:** manual updates ([fa62b16](https://github.com/Nimbleway/nimble-python/commit/fa62b167efb6f2804bfa6d26f01af01d196e1f30))
12
+ * **api:** manual updates ([0be811a](https://github.com/Nimbleway/nimble-python/commit/0be811afd90cf2325bd1e707081fc7a778b75aed))
13
+ * **api:** rename agent resource -> agents ([161e3fb](https://github.com/Nimbleway/nimble-python/commit/161e3fb98d9329b6c33f10c9eb0a9548130e00cd))
14
+
3
15
  ## 0.15.0 (2026-03-29)
4
16
 
5
17
  Full Changelog: [v0.14.0...v0.15.0](https://github.com/Nimbleway/nimble-python/compare/v0.14.0...v0.15.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nimble_python
3
- Version: 0.15.0
3
+ Version: 0.16.0
4
4
  Summary: The official Python library for the nimble API
5
5
  Project-URL: Homepage, https://github.com/Nimbleway/nimble-python
6
6
  Project-URL: Repository, https://github.com/Nimbleway/nimble-python
@@ -47,7 +47,10 @@ Types:
47
47
  ```python
48
48
  from nimble_python.types import (
49
49
  AgentListResponse,
50
+ AgentGenerateResponse,
50
51
  AgentGetResponse,
52
+ AgentGetGenerationResponse,
53
+ AgentPublishResponse,
51
54
  AgentRunResponse,
52
55
  AgentRunAsyncResponse,
53
56
  AgentRunBatchResponse,
@@ -57,7 +60,10 @@ from nimble_python.types import (
57
60
  Methods:
58
61
 
59
62
  - <code title="get /v1/agents">client.agent.<a href="./src/nimble_python/resources/agent.py">list</a>(\*\*<a href="src/nimble_python/types/agent_list_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_list_response.py">AgentListResponse</a></code>
63
+ - <code title="post /v1/agents/generations">client.agent.<a href="./src/nimble_python/resources/agent.py">generate</a>(\*\*<a href="src/nimble_python/types/agent_generate_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_generate_response.py">AgentGenerateResponse</a></code>
60
64
  - <code title="get /v1/agents/{template_name}">client.agent.<a href="./src/nimble_python/resources/agent.py">get</a>(template_name) -> <a href="./src/nimble_python/types/agent_get_response.py">AgentGetResponse</a></code>
65
+ - <code title="get /v1/agents/generations/{generation_id}">client.agent.<a href="./src/nimble_python/resources/agent.py">get_generation</a>(generation_id) -> <a href="./src/nimble_python/types/agent_get_generation_response.py">AgentGetGenerationResponse</a></code>
66
+ - <code title="post /v1/agents/{agent_name}/publish">client.agent.<a href="./src/nimble_python/resources/agent.py">publish</a>(agent_name, \*\*<a href="src/nimble_python/types/agent_publish_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_publish_response.py">AgentPublishResponse</a></code>
61
67
  - <code title="post /v1/agents/run">client.agent.<a href="./src/nimble_python/resources/agent.py">run</a>(\*\*<a href="src/nimble_python/types/agent_run_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_run_response.py">AgentRunResponse</a></code>
62
68
  - <code title="post /v1/agents/async">client.agent.<a href="./src/nimble_python/resources/agent.py">run_async</a>(\*\*<a href="src/nimble_python/types/agent_run_async_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_run_async_response.py">AgentRunAsyncResponse</a></code>
63
69
  - <code title="post /v1/agents/batch">client.agent.<a href="./src/nimble_python/resources/agent.py">run_batch</a>(\*\*<a href="src/nimble_python/types/agent_run_batch_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_run_batch_response.py">AgentRunBatchResponse</a></code>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nimble_python"
3
- version = "0.15.0"
3
+ version = "0.16.0"
4
4
  description = "The official Python library for the nimble API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "nimble_python"
4
- __version__ = "0.15.0" # x-release-please-version
4
+ __version__ = "0.16.0" # x-release-please-version
@@ -3,13 +3,20 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Dict, List, Iterable, Optional
6
- from typing_extensions import Literal
6
+ from typing_extensions import Literal, overload
7
7
 
8
8
  import httpx
9
9
 
10
- from ..types import agent_run_params, agent_list_params, agent_run_async_params, agent_run_batch_params
10
+ from ..types import (
11
+ agent_run_params,
12
+ agent_list_params,
13
+ agent_publish_params,
14
+ agent_generate_params,
15
+ agent_run_async_params,
16
+ agent_run_batch_params,
17
+ )
11
18
  from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
12
- from .._utils import path_template, maybe_transform, async_maybe_transform
19
+ from .._utils import path_template, required_args, maybe_transform, async_maybe_transform
13
20
  from .._compat import cached_property
14
21
  from .._resource import SyncAPIResource, AsyncAPIResource
15
22
  from .._response import (
@@ -22,8 +29,11 @@ from .._base_client import make_request_options
22
29
  from ..types.agent_get_response import AgentGetResponse
23
30
  from ..types.agent_run_response import AgentRunResponse
24
31
  from ..types.agent_list_response import AgentListResponse
32
+ from ..types.agent_publish_response import AgentPublishResponse
33
+ from ..types.agent_generate_response import AgentGenerateResponse
25
34
  from ..types.agent_run_async_response import AgentRunAsyncResponse
26
35
  from ..types.agent_run_batch_response import AgentRunBatchResponse
36
+ from ..types.agent_get_generation_response import AgentGetGenerationResponse
27
37
 
28
38
  __all__ = ["AgentResource", "AsyncAgentResource"]
29
39
 
@@ -64,7 +74,7 @@ class AgentResource(SyncAPIResource):
64
74
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
65
75
  ) -> AgentListResponse:
66
76
  """
67
- List Templates
77
+ List Agent Templates
68
78
 
69
79
  Args:
70
80
  limit: Number of results per page
@@ -106,6 +116,102 @@ class AgentResource(SyncAPIResource):
106
116
  cast_to=AgentListResponse,
107
117
  )
108
118
 
119
+ @overload
120
+ def generate(
121
+ self,
122
+ *,
123
+ agent_name: str,
124
+ prompt: str,
125
+ url: str,
126
+ input_schema: object | Omit = omit,
127
+ metadata: Optional[object] | Omit = omit,
128
+ output_schema: object | Omit = omit,
129
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
130
+ # The extra values given here take precedence over values defined on the client or passed to this method.
131
+ extra_headers: Headers | None = None,
132
+ extra_query: Query | None = None,
133
+ extra_body: Body | None = None,
134
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
135
+ ) -> AgentGenerateResponse:
136
+ """
137
+ Create Agent Generation
138
+
139
+ Args:
140
+ extra_headers: Send extra headers
141
+
142
+ extra_query: Add additional query parameters to the request
143
+
144
+ extra_body: Add additional JSON properties to the request
145
+
146
+ timeout: Override the client-level default timeout for this request, in seconds
147
+ """
148
+ ...
149
+
150
+ @overload
151
+ def generate(
152
+ self,
153
+ *,
154
+ from_agent: str,
155
+ prompt: str,
156
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
157
+ # The extra values given here take precedence over values defined on the client or passed to this method.
158
+ extra_headers: Headers | None = None,
159
+ extra_query: Query | None = None,
160
+ extra_body: Body | None = None,
161
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
162
+ ) -> AgentGenerateResponse:
163
+ """
164
+ Create Agent Generation
165
+
166
+ Args:
167
+ extra_headers: Send extra headers
168
+
169
+ extra_query: Add additional query parameters to the request
170
+
171
+ extra_body: Add additional JSON properties to the request
172
+
173
+ timeout: Override the client-level default timeout for this request, in seconds
174
+ """
175
+ ...
176
+
177
+ @required_args(["agent_name", "prompt", "url"], ["from_agent", "prompt"])
178
+ def generate(
179
+ self,
180
+ *,
181
+ agent_name: str | Omit = omit,
182
+ prompt: str,
183
+ url: str | Omit = omit,
184
+ input_schema: object | Omit = omit,
185
+ metadata: Optional[object] | Omit = omit,
186
+ output_schema: object | Omit = omit,
187
+ from_agent: str | Omit = omit,
188
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
189
+ # The extra values given here take precedence over values defined on the client or passed to this method.
190
+ extra_headers: Headers | None = None,
191
+ extra_query: Query | None = None,
192
+ extra_body: Body | None = None,
193
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
194
+ ) -> AgentGenerateResponse:
195
+ return self._post(
196
+ "/v1/agents/generations",
197
+ body=maybe_transform(
198
+ {
199
+ "agent_name": agent_name,
200
+ "prompt": prompt,
201
+ "url": url,
202
+ "input_schema": input_schema,
203
+ "metadata": metadata,
204
+ "output_schema": output_schema,
205
+ "from_agent": from_agent,
206
+ },
207
+ agent_generate_params.AgentGenerateParams,
208
+ ),
209
+ options=make_request_options(
210
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
211
+ ),
212
+ cast_to=AgentGenerateResponse,
213
+ )
214
+
109
215
  def get(
110
216
  self,
111
217
  template_name: str,
@@ -118,7 +224,7 @@ class AgentResource(SyncAPIResource):
118
224
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
119
225
  ) -> AgentGetResponse:
120
226
  """
121
- Get Template
227
+ Get Agent Template
122
228
 
123
229
  Args:
124
230
  extra_headers: Send extra headers
@@ -139,6 +245,74 @@ class AgentResource(SyncAPIResource):
139
245
  cast_to=AgentGetResponse,
140
246
  )
141
247
 
248
+ def get_generation(
249
+ self,
250
+ generation_id: str,
251
+ *,
252
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
253
+ # The extra values given here take precedence over values defined on the client or passed to this method.
254
+ extra_headers: Headers | None = None,
255
+ extra_query: Query | None = None,
256
+ extra_body: Body | None = None,
257
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
258
+ ) -> AgentGetGenerationResponse:
259
+ """
260
+ Get Agent Generation
261
+
262
+ Args:
263
+ extra_headers: Send extra headers
264
+
265
+ extra_query: Add additional query parameters to the request
266
+
267
+ extra_body: Add additional JSON properties to the request
268
+
269
+ timeout: Override the client-level default timeout for this request, in seconds
270
+ """
271
+ if not generation_id:
272
+ raise ValueError(f"Expected a non-empty value for `generation_id` but received {generation_id!r}")
273
+ return self._get(
274
+ path_template("/v1/agents/generations/{generation_id}", generation_id=generation_id),
275
+ options=make_request_options(
276
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
277
+ ),
278
+ cast_to=AgentGetGenerationResponse,
279
+ )
280
+
281
+ def publish(
282
+ self,
283
+ agent_name: str,
284
+ *,
285
+ version_id: str,
286
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
287
+ # The extra values given here take precedence over values defined on the client or passed to this method.
288
+ extra_headers: Headers | None = None,
289
+ extra_query: Query | None = None,
290
+ extra_body: Body | None = None,
291
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
292
+ ) -> AgentPublishResponse:
293
+ """
294
+ Publish Agent Version
295
+
296
+ Args:
297
+ extra_headers: Send extra headers
298
+
299
+ extra_query: Add additional query parameters to the request
300
+
301
+ extra_body: Add additional JSON properties to the request
302
+
303
+ timeout: Override the client-level default timeout for this request, in seconds
304
+ """
305
+ if not agent_name:
306
+ raise ValueError(f"Expected a non-empty value for `agent_name` but received {agent_name!r}")
307
+ return self._post(
308
+ path_template("/v1/agents/{agent_name}/publish", agent_name=agent_name),
309
+ body=maybe_transform({"version_id": version_id}, agent_publish_params.AgentPublishParams),
310
+ options=make_request_options(
311
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
312
+ ),
313
+ cast_to=AgentPublishResponse,
314
+ )
315
+
142
316
  def run(
143
317
  self,
144
318
  *,
@@ -326,7 +500,7 @@ class AsyncAgentResource(AsyncAPIResource):
326
500
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
327
501
  ) -> AgentListResponse:
328
502
  """
329
- List Templates
503
+ List Agent Templates
330
504
 
331
505
  Args:
332
506
  limit: Number of results per page
@@ -368,6 +542,102 @@ class AsyncAgentResource(AsyncAPIResource):
368
542
  cast_to=AgentListResponse,
369
543
  )
370
544
 
545
+ @overload
546
+ async def generate(
547
+ self,
548
+ *,
549
+ agent_name: str,
550
+ prompt: str,
551
+ url: str,
552
+ input_schema: object | Omit = omit,
553
+ metadata: Optional[object] | Omit = omit,
554
+ output_schema: object | Omit = omit,
555
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
556
+ # The extra values given here take precedence over values defined on the client or passed to this method.
557
+ extra_headers: Headers | None = None,
558
+ extra_query: Query | None = None,
559
+ extra_body: Body | None = None,
560
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
561
+ ) -> AgentGenerateResponse:
562
+ """
563
+ Create Agent Generation
564
+
565
+ Args:
566
+ extra_headers: Send extra headers
567
+
568
+ extra_query: Add additional query parameters to the request
569
+
570
+ extra_body: Add additional JSON properties to the request
571
+
572
+ timeout: Override the client-level default timeout for this request, in seconds
573
+ """
574
+ ...
575
+
576
+ @overload
577
+ async def generate(
578
+ self,
579
+ *,
580
+ from_agent: str,
581
+ prompt: str,
582
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
583
+ # The extra values given here take precedence over values defined on the client or passed to this method.
584
+ extra_headers: Headers | None = None,
585
+ extra_query: Query | None = None,
586
+ extra_body: Body | None = None,
587
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
588
+ ) -> AgentGenerateResponse:
589
+ """
590
+ Create Agent Generation
591
+
592
+ Args:
593
+ extra_headers: Send extra headers
594
+
595
+ extra_query: Add additional query parameters to the request
596
+
597
+ extra_body: Add additional JSON properties to the request
598
+
599
+ timeout: Override the client-level default timeout for this request, in seconds
600
+ """
601
+ ...
602
+
603
+ @required_args(["agent_name", "prompt", "url"], ["from_agent", "prompt"])
604
+ async def generate(
605
+ self,
606
+ *,
607
+ agent_name: str | Omit = omit,
608
+ prompt: str,
609
+ url: str | Omit = omit,
610
+ input_schema: object | Omit = omit,
611
+ metadata: Optional[object] | Omit = omit,
612
+ output_schema: object | Omit = omit,
613
+ from_agent: str | Omit = omit,
614
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
615
+ # The extra values given here take precedence over values defined on the client or passed to this method.
616
+ extra_headers: Headers | None = None,
617
+ extra_query: Query | None = None,
618
+ extra_body: Body | None = None,
619
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
620
+ ) -> AgentGenerateResponse:
621
+ return await self._post(
622
+ "/v1/agents/generations",
623
+ body=await async_maybe_transform(
624
+ {
625
+ "agent_name": agent_name,
626
+ "prompt": prompt,
627
+ "url": url,
628
+ "input_schema": input_schema,
629
+ "metadata": metadata,
630
+ "output_schema": output_schema,
631
+ "from_agent": from_agent,
632
+ },
633
+ agent_generate_params.AgentGenerateParams,
634
+ ),
635
+ options=make_request_options(
636
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
637
+ ),
638
+ cast_to=AgentGenerateResponse,
639
+ )
640
+
371
641
  async def get(
372
642
  self,
373
643
  template_name: str,
@@ -380,7 +650,7 @@ class AsyncAgentResource(AsyncAPIResource):
380
650
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
381
651
  ) -> AgentGetResponse:
382
652
  """
383
- Get Template
653
+ Get Agent Template
384
654
 
385
655
  Args:
386
656
  extra_headers: Send extra headers
@@ -401,6 +671,74 @@ class AsyncAgentResource(AsyncAPIResource):
401
671
  cast_to=AgentGetResponse,
402
672
  )
403
673
 
674
+ async def get_generation(
675
+ self,
676
+ generation_id: str,
677
+ *,
678
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
679
+ # The extra values given here take precedence over values defined on the client or passed to this method.
680
+ extra_headers: Headers | None = None,
681
+ extra_query: Query | None = None,
682
+ extra_body: Body | None = None,
683
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
684
+ ) -> AgentGetGenerationResponse:
685
+ """
686
+ Get Agent Generation
687
+
688
+ Args:
689
+ extra_headers: Send extra headers
690
+
691
+ extra_query: Add additional query parameters to the request
692
+
693
+ extra_body: Add additional JSON properties to the request
694
+
695
+ timeout: Override the client-level default timeout for this request, in seconds
696
+ """
697
+ if not generation_id:
698
+ raise ValueError(f"Expected a non-empty value for `generation_id` but received {generation_id!r}")
699
+ return await self._get(
700
+ path_template("/v1/agents/generations/{generation_id}", generation_id=generation_id),
701
+ options=make_request_options(
702
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
703
+ ),
704
+ cast_to=AgentGetGenerationResponse,
705
+ )
706
+
707
+ async def publish(
708
+ self,
709
+ agent_name: str,
710
+ *,
711
+ version_id: str,
712
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
713
+ # The extra values given here take precedence over values defined on the client or passed to this method.
714
+ extra_headers: Headers | None = None,
715
+ extra_query: Query | None = None,
716
+ extra_body: Body | None = None,
717
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
718
+ ) -> AgentPublishResponse:
719
+ """
720
+ Publish Agent Version
721
+
722
+ Args:
723
+ extra_headers: Send extra headers
724
+
725
+ extra_query: Add additional query parameters to the request
726
+
727
+ extra_body: Add additional JSON properties to the request
728
+
729
+ timeout: Override the client-level default timeout for this request, in seconds
730
+ """
731
+ if not agent_name:
732
+ raise ValueError(f"Expected a non-empty value for `agent_name` but received {agent_name!r}")
733
+ return await self._post(
734
+ path_template("/v1/agents/{agent_name}/publish", agent_name=agent_name),
735
+ body=await async_maybe_transform({"version_id": version_id}, agent_publish_params.AgentPublishParams),
736
+ options=make_request_options(
737
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
738
+ ),
739
+ cast_to=AgentPublishResponse,
740
+ )
741
+
404
742
  async def run(
405
743
  self,
406
744
  *,
@@ -559,9 +897,18 @@ class AgentResourceWithRawResponse:
559
897
  self.list = to_raw_response_wrapper(
560
898
  agent.list,
561
899
  )
900
+ self.generate = to_raw_response_wrapper(
901
+ agent.generate,
902
+ )
562
903
  self.get = to_raw_response_wrapper(
563
904
  agent.get,
564
905
  )
906
+ self.get_generation = to_raw_response_wrapper(
907
+ agent.get_generation,
908
+ )
909
+ self.publish = to_raw_response_wrapper(
910
+ agent.publish,
911
+ )
565
912
  self.run = to_raw_response_wrapper(
566
913
  agent.run,
567
914
  )
@@ -580,9 +927,18 @@ class AsyncAgentResourceWithRawResponse:
580
927
  self.list = async_to_raw_response_wrapper(
581
928
  agent.list,
582
929
  )
930
+ self.generate = async_to_raw_response_wrapper(
931
+ agent.generate,
932
+ )
583
933
  self.get = async_to_raw_response_wrapper(
584
934
  agent.get,
585
935
  )
936
+ self.get_generation = async_to_raw_response_wrapper(
937
+ agent.get_generation,
938
+ )
939
+ self.publish = async_to_raw_response_wrapper(
940
+ agent.publish,
941
+ )
586
942
  self.run = async_to_raw_response_wrapper(
587
943
  agent.run,
588
944
  )
@@ -601,9 +957,18 @@ class AgentResourceWithStreamingResponse:
601
957
  self.list = to_streamed_response_wrapper(
602
958
  agent.list,
603
959
  )
960
+ self.generate = to_streamed_response_wrapper(
961
+ agent.generate,
962
+ )
604
963
  self.get = to_streamed_response_wrapper(
605
964
  agent.get,
606
965
  )
966
+ self.get_generation = to_streamed_response_wrapper(
967
+ agent.get_generation,
968
+ )
969
+ self.publish = to_streamed_response_wrapper(
970
+ agent.publish,
971
+ )
607
972
  self.run = to_streamed_response_wrapper(
608
973
  agent.run,
609
974
  )
@@ -622,9 +987,18 @@ class AsyncAgentResourceWithStreamingResponse:
622
987
  self.list = async_to_streamed_response_wrapper(
623
988
  agent.list,
624
989
  )
990
+ self.generate = async_to_streamed_response_wrapper(
991
+ agent.generate,
992
+ )
625
993
  self.get = async_to_streamed_response_wrapper(
626
994
  agent.get,
627
995
  )
996
+ self.get_generation = async_to_streamed_response_wrapper(
997
+ agent.get_generation,
998
+ )
999
+ self.publish = async_to_streamed_response_wrapper(
1000
+ agent.publish,
1001
+ )
628
1002
  self.run = async_to_streamed_response_wrapper(
629
1003
  agent.run,
630
1004
  )
@@ -34,17 +34,22 @@ from .crawl_run_response import CrawlRunResponse as CrawlRunResponse
34
34
  from .task_list_response import TaskListResponse as TaskListResponse
35
35
  from .agent_list_response import AgentListResponse as AgentListResponse
36
36
  from .crawl_list_response import CrawlListResponse as CrawlListResponse
37
+ from .agent_publish_params import AgentPublishParams as AgentPublishParams
37
38
  from .client_search_params import ClientSearchParams as ClientSearchParams
39
+ from .agent_generate_params import AgentGenerateParams as AgentGenerateParams
38
40
  from .client_extract_params import ClientExtractParams as ClientExtractParams
39
41
  from .crawl_status_response import CrawlStatusResponse as CrawlStatusResponse
40
42
  from .task_results_response import TaskResultsResponse as TaskResultsResponse
43
+ from .agent_publish_response import AgentPublishResponse as AgentPublishResponse
41
44
  from .agent_run_async_params import AgentRunAsyncParams as AgentRunAsyncParams
42
45
  from .agent_run_batch_params import AgentRunBatchParams as AgentRunBatchParams
43
46
  from .extract_async_response import ExtractAsyncResponse as ExtractAsyncResponse
44
47
  from .extract_batch_response import ExtractBatchResponse as ExtractBatchResponse
48
+ from .agent_generate_response import AgentGenerateResponse as AgentGenerateResponse
45
49
  from .batch_progress_response import BatchProgressResponse as BatchProgressResponse
46
50
  from .agent_run_async_response import AgentRunAsyncResponse as AgentRunAsyncResponse
47
51
  from .agent_run_batch_response import AgentRunBatchResponse as AgentRunBatchResponse
48
52
  from .crawl_terminate_response import CrawlTerminateResponse as CrawlTerminateResponse
49
53
  from .client_extract_async_params import ClientExtractAsyncParams as ClientExtractAsyncParams
50
54
  from .client_extract_batch_params import ClientExtractBatchParams as ClientExtractBatchParams
55
+ from .agent_get_generation_response import AgentGetGenerationResponse as AgentGetGenerationResponse
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Optional
6
+ from typing_extensions import Required, TypeAlias, TypedDict
7
+
8
+ __all__ = ["AgentGenerateParams", "CreateAgentGenerationRequest", "CreateAgentRefinementRequest"]
9
+
10
+
11
+ class CreateAgentGenerationRequest(TypedDict, total=False):
12
+ agent_name: Required[str]
13
+
14
+ prompt: Required[str]
15
+
16
+ url: Required[str]
17
+
18
+ input_schema: object
19
+
20
+ metadata: Optional[object]
21
+
22
+ output_schema: object
23
+
24
+
25
+ class CreateAgentRefinementRequest(TypedDict, total=False):
26
+ from_agent: Required[str]
27
+
28
+ prompt: Required[str]
29
+
30
+
31
+ AgentGenerateParams: TypeAlias = Union[CreateAgentGenerationRequest, CreateAgentRefinementRequest]
@@ -0,0 +1,32 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["AgentGenerateResponse"]
9
+
10
+
11
+ class AgentGenerateResponse(BaseModel):
12
+ id: str
13
+
14
+ status: str
15
+
16
+ agent_name: Optional[str] = None
17
+
18
+ completed_at: Optional[datetime] = None
19
+
20
+ created_at: Optional[datetime] = None
21
+
22
+ error: Optional[str] = None
23
+
24
+ generated_version: Optional[object] = None
25
+
26
+ generated_version_id: Optional[str] = None
27
+
28
+ source_version_id: Optional[str] = None
29
+
30
+ started_at: Optional[datetime] = None
31
+
32
+ summary: Optional[str] = None