athena-intelligence 0.1.118__py3-none-any.whl → 0.1.120__py3-none-any.whl

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 (44) hide show
  1. athena/__init__.py +38 -1
  2. athena/agents/__init__.py +5 -0
  3. athena/agents/client.py +169 -0
  4. athena/agents/drive/__init__.py +2 -0
  5. athena/agents/drive/client.py +134 -0
  6. athena/agents/general/__init__.py +2 -0
  7. athena/agents/general/client.py +397 -0
  8. athena/agents/research/__init__.py +2 -0
  9. athena/agents/research/client.py +134 -0
  10. athena/agents/sql/__init__.py +2 -0
  11. athena/agents/sql/client.py +134 -0
  12. athena/base_client.py +3 -0
  13. athena/core/client_wrapper.py +1 -1
  14. athena/tools/__init__.py +2 -1
  15. athena/tools/calendar/__init__.py +2 -0
  16. athena/tools/calendar/client.py +155 -0
  17. athena/tools/client.py +12 -0
  18. athena/tools/email/__init__.py +2 -0
  19. athena/tools/email/client.py +223 -0
  20. athena/tools/structured_data_extractor/__init__.py +2 -0
  21. athena/tools/structured_data_extractor/client.py +150 -0
  22. athena/tools/tasks/__init__.py +2 -0
  23. athena/tools/tasks/client.py +87 -0
  24. athena/types/__init__.py +40 -0
  25. athena/types/custom_agent_response.py +32 -0
  26. athena/types/drive_agent_response.py +32 -0
  27. athena/types/general_agent_config.py +36 -0
  28. athena/types/general_agent_config_enabled_tools_item.py +7 -0
  29. athena/types/general_agent_request.py +39 -0
  30. athena/types/general_agent_request_messages_item.py +32 -0
  31. athena/types/general_agent_request_messages_item_content.py +7 -0
  32. athena/types/general_agent_request_messages_item_content_item.py +60 -0
  33. athena/types/general_agent_request_messages_item_content_item_image_url.py +29 -0
  34. athena/types/general_agent_request_messages_item_content_item_text.py +29 -0
  35. athena/types/general_agent_request_messages_item_type.py +25 -0
  36. athena/types/general_agent_response.py +33 -0
  37. athena/types/research_agent_response.py +32 -0
  38. athena/types/sql_agent_response.py +37 -0
  39. athena/types/structured_data_extractor_reponse.py +36 -0
  40. athena/types/tool.py +17 -0
  41. {athena_intelligence-0.1.118.dist-info → athena_intelligence-0.1.120.dist-info}/METADATA +1 -1
  42. athena_intelligence-0.1.120.dist-info/RECORD +82 -0
  43. athena_intelligence-0.1.118.dist-info/RECORD +0 -48
  44. {athena_intelligence-0.1.118.dist-info → athena_intelligence-0.1.120.dist-info}/WHEEL +0 -0
athena/__init__.py CHANGED
@@ -2,16 +2,34 @@
2
2
 
3
3
  from .types import (
4
4
  AssetNotFoundError,
5
+ CustomAgentResponse,
5
6
  DataFrameRequestOut,
6
7
  DataFrameRequestOutColumnsItem,
7
8
  DataFrameRequestOutDataItemItem,
8
9
  DataFrameRequestOutIndexItem,
9
10
  DataFrameUnknownFormatError,
10
11
  DocumentChunk,
12
+ DriveAgentResponse,
11
13
  FileChunkRequestOut,
12
14
  FileTooLargeError,
15
+ GeneralAgentConfig,
16
+ GeneralAgentConfigEnabledToolsItem,
17
+ GeneralAgentRequest,
18
+ GeneralAgentRequestMessagesItem,
19
+ GeneralAgentRequestMessagesItemContent,
20
+ GeneralAgentRequestMessagesItemContentItem,
21
+ GeneralAgentRequestMessagesItemContentItemImageUrl,
22
+ GeneralAgentRequestMessagesItemContentItemText,
23
+ GeneralAgentRequestMessagesItemContentItem_ImageUrl,
24
+ GeneralAgentRequestMessagesItemContentItem_Text,
25
+ GeneralAgentRequestMessagesItemType,
26
+ GeneralAgentResponse,
13
27
  ParentFolderError,
28
+ ResearchAgentResponse,
14
29
  SaveAssetRequestOut,
30
+ SqlAgentResponse,
31
+ StructuredDataExtractorReponse,
32
+ Tool,
15
33
  )
16
34
  from .errors import (
17
35
  BadRequestError,
@@ -22,7 +40,7 @@ from .errors import (
22
40
  UnprocessableEntityError,
23
41
  UnsupportedMediaTypeError,
24
42
  )
25
- from . import query, tools
43
+ from . import agents, query, tools
26
44
  from .environment import AthenaEnvironment
27
45
  from .query import QueryExecuteRequestDatabaseAssetIds
28
46
  from .tools import ToolsDataFrameRequestColumnsItem
@@ -33,24 +51,43 @@ __all__ = [
33
51
  "AthenaEnvironment",
34
52
  "BadRequestError",
35
53
  "ContentTooLargeError",
54
+ "CustomAgentResponse",
36
55
  "DataFrameRequestOut",
37
56
  "DataFrameRequestOutColumnsItem",
38
57
  "DataFrameRequestOutDataItemItem",
39
58
  "DataFrameRequestOutIndexItem",
40
59
  "DataFrameUnknownFormatError",
41
60
  "DocumentChunk",
61
+ "DriveAgentResponse",
42
62
  "FileChunkRequestOut",
43
63
  "FileTooLargeError",
64
+ "GeneralAgentConfig",
65
+ "GeneralAgentConfigEnabledToolsItem",
66
+ "GeneralAgentRequest",
67
+ "GeneralAgentRequestMessagesItem",
68
+ "GeneralAgentRequestMessagesItemContent",
69
+ "GeneralAgentRequestMessagesItemContentItem",
70
+ "GeneralAgentRequestMessagesItemContentItemImageUrl",
71
+ "GeneralAgentRequestMessagesItemContentItemText",
72
+ "GeneralAgentRequestMessagesItemContentItem_ImageUrl",
73
+ "GeneralAgentRequestMessagesItemContentItem_Text",
74
+ "GeneralAgentRequestMessagesItemType",
75
+ "GeneralAgentResponse",
44
76
  "InternalServerError",
45
77
  "NotFoundError",
46
78
  "ParentFolderError",
47
79
  "QueryExecuteRequestDatabaseAssetIds",
80
+ "ResearchAgentResponse",
48
81
  "SaveAssetRequestOut",
82
+ "SqlAgentResponse",
83
+ "StructuredDataExtractorReponse",
84
+ "Tool",
49
85
  "ToolsDataFrameRequestColumnsItem",
50
86
  "UnauthorizedError",
51
87
  "UnprocessableEntityError",
52
88
  "UnsupportedMediaTypeError",
53
89
  "__version__",
90
+ "agents",
54
91
  "query",
55
92
  "tools",
56
93
  ]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from . import drive, general, research, sql
4
+
5
+ __all__ = ["drive", "general", "research", "sql"]
@@ -0,0 +1,169 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ..core.api_error import ApiError
7
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ..core.jsonable_encoder import jsonable_encoder
9
+ from ..core.pydantic_utilities import pydantic_v1
10
+ from ..core.request_options import RequestOptions
11
+ from ..errors.unprocessable_entity_error import UnprocessableEntityError
12
+ from ..types.custom_agent_response import CustomAgentResponse
13
+ from .drive.client import AsyncDriveClient, DriveClient
14
+ from .general.client import AsyncGeneralClient, GeneralClient
15
+ from .research.client import AsyncResearchClient, ResearchClient
16
+ from .sql.client import AsyncSqlClient, SqlClient
17
+
18
+ # this is used as the default value for optional parameters
19
+ OMIT = typing.cast(typing.Any, ...)
20
+
21
+
22
+ class AgentsClient:
23
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
24
+ self._client_wrapper = client_wrapper
25
+ self.drive = DriveClient(client_wrapper=self._client_wrapper)
26
+ self.general = GeneralClient(client_wrapper=self._client_wrapper)
27
+ self.research = ResearchClient(client_wrapper=self._client_wrapper)
28
+ self.sql = SqlClient(client_wrapper=self._client_wrapper)
29
+
30
+ def invoke_by_id(
31
+ self,
32
+ agent_id: str,
33
+ *,
34
+ config: typing.Dict[str, typing.Any],
35
+ messages: typing.Sequence[typing.Dict[str, typing.Any]],
36
+ request_options: typing.Optional[RequestOptions] = None,
37
+ ) -> CustomAgentResponse:
38
+ """
39
+ Coming soon!
40
+
41
+ Invoke a custom agent created in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
42
+
43
+ Custom agents can be created and configured in spaces to perform specialized tasks.
44
+ Refer to the specific agent's documentation for details on configuration options
45
+ and expected responses.
46
+
47
+ Parameters
48
+ ----------
49
+ agent_id : str
50
+ The ID of the custom agent to invoke. Create custom agents in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
51
+
52
+ config : typing.Dict[str, typing.Any]
53
+ Configuration for the custom agent. See the agent's documentation for specific configuration options.
54
+
55
+ messages : typing.Sequence[typing.Dict[str, typing.Any]]
56
+ The messages to send to the custom agent
57
+
58
+ request_options : typing.Optional[RequestOptions]
59
+ Request-specific configuration.
60
+
61
+ Returns
62
+ -------
63
+ CustomAgentResponse
64
+ Successful Response
65
+
66
+ Examples
67
+ --------
68
+ from athena.client import Athena
69
+
70
+ client = Athena(
71
+ api_key="YOUR_API_KEY",
72
+ )
73
+ client.agents.invoke_by_id(
74
+ agent_id="agent_id",
75
+ config={"key": "value"},
76
+ messages=[{"key": "value"}],
77
+ )
78
+ """
79
+ _response = self._client_wrapper.httpx_client.request(
80
+ f"api/v0/agents/{jsonable_encoder(agent_id)}/invoke",
81
+ method="POST",
82
+ json={"config": config, "messages": messages},
83
+ request_options=request_options,
84
+ omit=OMIT,
85
+ )
86
+ if 200 <= _response.status_code < 300:
87
+ return pydantic_v1.parse_obj_as(CustomAgentResponse, _response.json()) # type: ignore
88
+ if _response.status_code == 422:
89
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
90
+ try:
91
+ _response_json = _response.json()
92
+ except JSONDecodeError:
93
+ raise ApiError(status_code=_response.status_code, body=_response.text)
94
+ raise ApiError(status_code=_response.status_code, body=_response_json)
95
+
96
+
97
+ class AsyncAgentsClient:
98
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
99
+ self._client_wrapper = client_wrapper
100
+ self.drive = AsyncDriveClient(client_wrapper=self._client_wrapper)
101
+ self.general = AsyncGeneralClient(client_wrapper=self._client_wrapper)
102
+ self.research = AsyncResearchClient(client_wrapper=self._client_wrapper)
103
+ self.sql = AsyncSqlClient(client_wrapper=self._client_wrapper)
104
+
105
+ async def invoke_by_id(
106
+ self,
107
+ agent_id: str,
108
+ *,
109
+ config: typing.Dict[str, typing.Any],
110
+ messages: typing.Sequence[typing.Dict[str, typing.Any]],
111
+ request_options: typing.Optional[RequestOptions] = None,
112
+ ) -> CustomAgentResponse:
113
+ """
114
+ Coming soon!
115
+
116
+ Invoke a custom agent created in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
117
+
118
+ Custom agents can be created and configured in spaces to perform specialized tasks.
119
+ Refer to the specific agent's documentation for details on configuration options
120
+ and expected responses.
121
+
122
+ Parameters
123
+ ----------
124
+ agent_id : str
125
+ The ID of the custom agent to invoke. Create custom agents in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
126
+
127
+ config : typing.Dict[str, typing.Any]
128
+ Configuration for the custom agent. See the agent's documentation for specific configuration options.
129
+
130
+ messages : typing.Sequence[typing.Dict[str, typing.Any]]
131
+ The messages to send to the custom agent
132
+
133
+ request_options : typing.Optional[RequestOptions]
134
+ Request-specific configuration.
135
+
136
+ Returns
137
+ -------
138
+ CustomAgentResponse
139
+ Successful Response
140
+
141
+ Examples
142
+ --------
143
+ from athena.client import AsyncAthena
144
+
145
+ client = AsyncAthena(
146
+ api_key="YOUR_API_KEY",
147
+ )
148
+ await client.agents.invoke_by_id(
149
+ agent_id="agent_id",
150
+ config={"key": "value"},
151
+ messages=[{"key": "value"}],
152
+ )
153
+ """
154
+ _response = await self._client_wrapper.httpx_client.request(
155
+ f"api/v0/agents/{jsonable_encoder(agent_id)}/invoke",
156
+ method="POST",
157
+ json={"config": config, "messages": messages},
158
+ request_options=request_options,
159
+ omit=OMIT,
160
+ )
161
+ if 200 <= _response.status_code < 300:
162
+ return pydantic_v1.parse_obj_as(CustomAgentResponse, _response.json()) # type: ignore
163
+ if _response.status_code == 422:
164
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
165
+ try:
166
+ _response_json = _response.json()
167
+ except JSONDecodeError:
168
+ raise ApiError(status_code=_response.status_code, body=_response.text)
169
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,134 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ...core.api_error import ApiError
7
+ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ...core.pydantic_utilities import pydantic_v1
9
+ from ...core.request_options import RequestOptions
10
+ from ...errors.unprocessable_entity_error import UnprocessableEntityError
11
+ from ...types.drive_agent_response import DriveAgentResponse
12
+
13
+ # this is used as the default value for optional parameters
14
+ OMIT = typing.cast(typing.Any, ...)
15
+
16
+
17
+ class DriveClient:
18
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
19
+ self._client_wrapper = client_wrapper
20
+
21
+ def invoke(
22
+ self,
23
+ *,
24
+ config: typing.Dict[str, typing.Any],
25
+ messages: typing.Sequence[typing.Dict[str, typing.Any]],
26
+ request_options: typing.Optional[RequestOptions] = None
27
+ ) -> DriveAgentResponse:
28
+ """
29
+ Coming soon! Manage folders and search for files in the internal drive.
30
+
31
+ Parameters
32
+ ----------
33
+ config : typing.Dict[str, typing.Any]
34
+ Configuration for the drive agent including folder paths and search parameters
35
+
36
+ messages : typing.Sequence[typing.Dict[str, typing.Any]]
37
+ The messages to send to the drive agent
38
+
39
+ request_options : typing.Optional[RequestOptions]
40
+ Request-specific configuration.
41
+
42
+ Returns
43
+ -------
44
+ DriveAgentResponse
45
+ Successful Response
46
+
47
+ Examples
48
+ --------
49
+ from athena.client import Athena
50
+
51
+ client = Athena(
52
+ api_key="YOUR_API_KEY",
53
+ )
54
+ client.agents.drive.invoke(
55
+ config={"key": "value"},
56
+ messages=[{"key": "value"}],
57
+ )
58
+ """
59
+ _response = self._client_wrapper.httpx_client.request(
60
+ "api/v0/agents/drive/invoke",
61
+ method="POST",
62
+ json={"config": config, "messages": messages},
63
+ request_options=request_options,
64
+ omit=OMIT,
65
+ )
66
+ if 200 <= _response.status_code < 300:
67
+ return pydantic_v1.parse_obj_as(DriveAgentResponse, _response.json()) # type: ignore
68
+ if _response.status_code == 422:
69
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
70
+ try:
71
+ _response_json = _response.json()
72
+ except JSONDecodeError:
73
+ raise ApiError(status_code=_response.status_code, body=_response.text)
74
+ raise ApiError(status_code=_response.status_code, body=_response_json)
75
+
76
+
77
+ class AsyncDriveClient:
78
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
79
+ self._client_wrapper = client_wrapper
80
+
81
+ async def invoke(
82
+ self,
83
+ *,
84
+ config: typing.Dict[str, typing.Any],
85
+ messages: typing.Sequence[typing.Dict[str, typing.Any]],
86
+ request_options: typing.Optional[RequestOptions] = None
87
+ ) -> DriveAgentResponse:
88
+ """
89
+ Coming soon! Manage folders and search for files in the internal drive.
90
+
91
+ Parameters
92
+ ----------
93
+ config : typing.Dict[str, typing.Any]
94
+ Configuration for the drive agent including folder paths and search parameters
95
+
96
+ messages : typing.Sequence[typing.Dict[str, typing.Any]]
97
+ The messages to send to the drive agent
98
+
99
+ request_options : typing.Optional[RequestOptions]
100
+ Request-specific configuration.
101
+
102
+ Returns
103
+ -------
104
+ DriveAgentResponse
105
+ Successful Response
106
+
107
+ Examples
108
+ --------
109
+ from athena.client import AsyncAthena
110
+
111
+ client = AsyncAthena(
112
+ api_key="YOUR_API_KEY",
113
+ )
114
+ await client.agents.drive.invoke(
115
+ config={"key": "value"},
116
+ messages=[{"key": "value"}],
117
+ )
118
+ """
119
+ _response = await self._client_wrapper.httpx_client.request(
120
+ "api/v0/agents/drive/invoke",
121
+ method="POST",
122
+ json={"config": config, "messages": messages},
123
+ request_options=request_options,
124
+ omit=OMIT,
125
+ )
126
+ if 200 <= _response.status_code < 300:
127
+ return pydantic_v1.parse_obj_as(DriveAgentResponse, _response.json()) # type: ignore
128
+ if _response.status_code == 422:
129
+ raise UnprocessableEntityError(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
130
+ try:
131
+ _response_json = _response.json()
132
+ except JSONDecodeError:
133
+ raise ApiError(status_code=_response.status_code, body=_response.text)
134
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+