robosystems-client 0.1.15__py3-none-any.whl → 0.1.17__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.
Potentially problematic release.
This version of robosystems-client might be problematic. Click here for more details.
- robosystems_client/api/agent/auto_select_agent.py +246 -0
- robosystems_client/api/agent/batch_process_queries.py +261 -0
- robosystems_client/api/agent/execute_specific_agent.py +258 -0
- robosystems_client/api/agent/get_agent_metadata.py +238 -0
- robosystems_client/api/agent/list_agents.py +246 -0
- robosystems_client/api/agent/recommend_agent.py +255 -0
- robosystems_client/api/auth/forgot_password.py +191 -0
- robosystems_client/api/auth/generate_sso_token.py +18 -0
- robosystems_client/api/auth/get_current_auth_user.py +4 -22
- robosystems_client/api/auth/logout_user.py +17 -17
- robosystems_client/api/auth/{refresh_session.py → refresh_auth_session.py} +21 -21
- robosystems_client/api/auth/resend_verification_email.py +222 -0
- robosystems_client/api/auth/reset_password.py +177 -0
- robosystems_client/api/auth/validate_reset_token.py +171 -0
- robosystems_client/api/auth/verify_email.py +177 -0
- robosystems_client/api/backup/create_backup.py +0 -18
- robosystems_client/api/backup/export_backup.py +0 -18
- robosystems_client/api/backup/get_backup_download_url.py +0 -18
- robosystems_client/api/backup/get_backup_stats.py +0 -18
- robosystems_client/api/backup/list_backups.py +0 -18
- robosystems_client/api/backup/restore_backup.py +0 -18
- robosystems_client/api/connections/create_connection.py +0 -18
- robosystems_client/api/connections/create_link_token.py +0 -18
- robosystems_client/api/connections/delete_connection.py +0 -18
- robosystems_client/api/connections/exchange_link_token.py +0 -18
- robosystems_client/api/connections/get_connection.py +0 -18
- robosystems_client/api/connections/get_connection_options.py +0 -18
- robosystems_client/api/connections/init_o_auth.py +0 -18
- robosystems_client/api/connections/list_connections.py +0 -18
- robosystems_client/api/connections/oauth_callback.py +4 -22
- robosystems_client/api/connections/sync_connection.py +0 -18
- robosystems_client/api/copy/copy_data_to_graph.py +0 -18
- robosystems_client/api/create/create_graph.py +0 -18
- robosystems_client/api/graph_analytics/get_graph_metrics.py +0 -18
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -18
- robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -18
- robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -18
- robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -18
- robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -18
- robosystems_client/api/graph_credits/check_credit_balance.py +14 -28
- robosystems_client/api/graph_credits/check_storage_limits.py +0 -18
- robosystems_client/api/graph_credits/get_credit_summary.py +0 -18
- robosystems_client/api/graph_credits/get_storage_usage.py +0 -18
- robosystems_client/api/graph_credits/list_credit_transactions.py +0 -18
- robosystems_client/api/graph_health/get_database_health.py +0 -18
- robosystems_client/api/graph_info/get_database_info.py +0 -18
- robosystems_client/api/graph_limits/get_graph_limits.py +0 -18
- robosystems_client/api/mcp/call_mcp_tool.py +0 -18
- robosystems_client/api/mcp/list_mcp_tools.py +0 -18
- robosystems_client/api/operations/cancel_operation.py +0 -18
- robosystems_client/api/operations/get_operation_status.py +0 -18
- robosystems_client/api/operations/stream_operation_events.py +0 -18
- robosystems_client/api/query/execute_cypher_query.py +0 -18
- robosystems_client/api/schema/export_graph_schema.py +0 -18
- robosystems_client/api/schema/get_graph_schema_info.py +0 -18
- robosystems_client/api/schema/list_schema_extensions.py +0 -18
- robosystems_client/api/schema/validate_schema.py +0 -18
- robosystems_client/api/subgraphs/create_subgraph.py +0 -18
- robosystems_client/api/subgraphs/delete_subgraph.py +0 -18
- robosystems_client/api/subgraphs/get_subgraph_info.py +0 -18
- robosystems_client/api/subgraphs/get_subgraph_quota.py +0 -18
- robosystems_client/api/subgraphs/list_subgraphs.py +0 -18
- robosystems_client/api/user/create_user_api_key.py +0 -18
- robosystems_client/api/user/get_all_credit_summaries.py +0 -18
- robosystems_client/api/user/get_current_user.py +0 -18
- robosystems_client/api/user/get_user_graphs.py +0 -18
- robosystems_client/api/user/list_user_api_keys.py +0 -18
- robosystems_client/api/user/revoke_user_api_key.py +0 -18
- robosystems_client/api/user/select_user_graph.py +0 -18
- robosystems_client/api/user/update_user.py +0 -18
- robosystems_client/api/user/update_user_api_key.py +0 -18
- robosystems_client/api/user/update_user_password.py +0 -18
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -18
- robosystems_client/api/user_analytics/get_user_usage_overview.py +0 -18
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +0 -18
- robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -18
- robosystems_client/api/user_limits/get_user_limits.py +0 -18
- robosystems_client/api/user_limits/get_user_usage.py +0 -18
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +0 -18
- robosystems_client/api/user_subscriptions/get_repository_credits.py +0 -18
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +0 -18
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -18
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +0 -18
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +0 -18
- robosystems_client/models/__init__.py +51 -3
- robosystems_client/models/agent_list_response.py +74 -0
- robosystems_client/models/agent_list_response_agents.py +67 -0
- robosystems_client/models/{credits_summary_response_credits_by_addon_item.py → agent_list_response_agents_additional_property.py} +5 -5
- robosystems_client/models/agent_message.py +35 -1
- robosystems_client/models/agent_metadata_response.py +133 -0
- robosystems_client/models/agent_mode.py +11 -0
- robosystems_client/models/agent_recommendation.py +106 -0
- robosystems_client/models/agent_recommendation_request.py +108 -0
- robosystems_client/models/agent_recommendation_request_context_type_0.py +44 -0
- robosystems_client/models/agent_recommendation_response.py +82 -0
- robosystems_client/models/agent_request.py +110 -6
- robosystems_client/models/agent_response.py +161 -11
- robosystems_client/models/agent_response_error_details_type_0.py +44 -0
- robosystems_client/models/agent_response_tokens_used_type_0.py +44 -0
- robosystems_client/models/auth_response.py +20 -6
- robosystems_client/models/batch_agent_request.py +85 -0
- robosystems_client/models/batch_agent_response.py +90 -0
- robosystems_client/models/credit_summary.py +35 -9
- robosystems_client/models/credits_summary_response.py +47 -21
- robosystems_client/models/credits_summary_response_credits_by_addon_type_0_item.py +44 -0
- robosystems_client/models/custom_schema_definition.py +7 -14
- robosystems_client/models/custom_schema_definition_metadata.py +1 -6
- robosystems_client/models/database_health_response.py +11 -11
- robosystems_client/models/database_info_response.py +13 -14
- robosystems_client/models/email_verification_request.py +60 -0
- robosystems_client/models/error_response.py +4 -8
- robosystems_client/models/forgot_password_request.py +60 -0
- robosystems_client/models/forgot_password_response_forgotpassword.py +44 -0
- robosystems_client/models/graph_metadata.py +4 -5
- robosystems_client/models/health_status.py +2 -2
- robosystems_client/models/repository_credits_response.py +43 -16
- robosystems_client/models/resend_verification_email_response_resendverificationemail.py +44 -0
- robosystems_client/models/reset_password_request.py +68 -0
- robosystems_client/models/reset_password_validate_response.py +82 -0
- robosystems_client/models/schema_export_response.py +5 -8
- robosystems_client/models/schema_validation_request.py +3 -5
- robosystems_client/models/schema_validation_response.py +5 -5
- robosystems_client/models/selection_criteria.py +122 -0
- robosystems_client/models/success_response.py +1 -1
- robosystems_client-0.1.17.dist-info/METADATA +89 -0
- {robosystems_client-0.1.15.dist-info → robosystems_client-0.1.17.dist-info}/RECORD +128 -97
- robosystems_client-0.1.17.dist-info/licenses/LICENSE +21 -0
- robosystems_client/api/agent/query_financial_agent.py +0 -423
- robosystems_client-0.1.15.dist-info/METADATA +0 -302
- {robosystems_client-0.1.15.dist-info → robosystems_client-0.1.17.dist-info}/WHEEL +0 -0
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Optional, Union
|
|
3
|
-
|
|
4
|
-
import httpx
|
|
5
|
-
|
|
6
|
-
from ... import errors
|
|
7
|
-
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.agent_request import AgentRequest
|
|
9
|
-
from ...models.agent_response import AgentResponse
|
|
10
|
-
from ...models.error_response import ErrorResponse
|
|
11
|
-
from ...models.http_validation_error import HTTPValidationError
|
|
12
|
-
from ...types import UNSET, Response, Unset
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def _get_kwargs(
|
|
16
|
-
graph_id: str,
|
|
17
|
-
*,
|
|
18
|
-
body: AgentRequest,
|
|
19
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
20
|
-
auth_token: Union[None, Unset, str] = UNSET,
|
|
21
|
-
) -> dict[str, Any]:
|
|
22
|
-
headers: dict[str, Any] = {}
|
|
23
|
-
if not isinstance(authorization, Unset):
|
|
24
|
-
headers["authorization"] = authorization
|
|
25
|
-
|
|
26
|
-
cookies = {}
|
|
27
|
-
if auth_token is not UNSET:
|
|
28
|
-
cookies["auth-token"] = auth_token
|
|
29
|
-
|
|
30
|
-
_kwargs: dict[str, Any] = {
|
|
31
|
-
"method": "post",
|
|
32
|
-
"url": f"/v1/{graph_id}/agent",
|
|
33
|
-
"cookies": cookies,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
_kwargs["json"] = body.to_dict()
|
|
37
|
-
|
|
38
|
-
headers["Content-Type"] = "application/json"
|
|
39
|
-
|
|
40
|
-
_kwargs["headers"] = headers
|
|
41
|
-
return _kwargs
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def _parse_response(
|
|
45
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
46
|
-
) -> Optional[Union[AgentResponse, ErrorResponse, HTTPValidationError]]:
|
|
47
|
-
if response.status_code == 200:
|
|
48
|
-
response_200 = AgentResponse.from_dict(response.json())
|
|
49
|
-
|
|
50
|
-
return response_200
|
|
51
|
-
if response.status_code == 400:
|
|
52
|
-
response_400 = ErrorResponse.from_dict(response.json())
|
|
53
|
-
|
|
54
|
-
return response_400
|
|
55
|
-
if response.status_code == 402:
|
|
56
|
-
response_402 = ErrorResponse.from_dict(response.json())
|
|
57
|
-
|
|
58
|
-
return response_402
|
|
59
|
-
if response.status_code == 403:
|
|
60
|
-
response_403 = ErrorResponse.from_dict(response.json())
|
|
61
|
-
|
|
62
|
-
return response_403
|
|
63
|
-
if response.status_code == 500:
|
|
64
|
-
response_500 = ErrorResponse.from_dict(response.json())
|
|
65
|
-
|
|
66
|
-
return response_500
|
|
67
|
-
if response.status_code == 422:
|
|
68
|
-
response_422 = HTTPValidationError.from_dict(response.json())
|
|
69
|
-
|
|
70
|
-
return response_422
|
|
71
|
-
if client.raise_on_unexpected_status:
|
|
72
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
73
|
-
else:
|
|
74
|
-
return None
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
def _build_response(
|
|
78
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
79
|
-
) -> Response[Union[AgentResponse, ErrorResponse, HTTPValidationError]]:
|
|
80
|
-
return Response(
|
|
81
|
-
status_code=HTTPStatus(response.status_code),
|
|
82
|
-
content=response.content,
|
|
83
|
-
headers=response.headers,
|
|
84
|
-
parsed=_parse_response(client=client, response=response),
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
def sync_detailed(
|
|
89
|
-
graph_id: str,
|
|
90
|
-
*,
|
|
91
|
-
client: AuthenticatedClient,
|
|
92
|
-
body: AgentRequest,
|
|
93
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
94
|
-
auth_token: Union[None, Unset, str] = UNSET,
|
|
95
|
-
) -> Response[Union[AgentResponse, ErrorResponse, HTTPValidationError]]:
|
|
96
|
-
"""Query Financial Agent
|
|
97
|
-
|
|
98
|
-
AI-powered financial analysis with direct access to graph data.
|
|
99
|
-
|
|
100
|
-
This endpoint provides intelligent financial analysis using an AI agent that can:
|
|
101
|
-
- Analyze entity financial statements and SEC filings
|
|
102
|
-
- Review QuickBooks transactions and accounting data
|
|
103
|
-
- Perform multi-period trend analysis
|
|
104
|
-
- Generate insights from balance sheets and income statements
|
|
105
|
-
- Answer complex financial queries with contextual understanding
|
|
106
|
-
|
|
107
|
-
**Execution Modes:**
|
|
108
|
-
- **Quick Analysis** (default): Synchronous responses for simple queries (1-2 tool calls)
|
|
109
|
-
- **Extended Analysis**: Asynchronous processing for complex research (returns operation_id for SSE
|
|
110
|
-
monitoring)
|
|
111
|
-
|
|
112
|
-
**Extended Analysis Monitoring:**
|
|
113
|
-
For complex queries, connect to the SSE stream for real-time progress:
|
|
114
|
-
```javascript
|
|
115
|
-
const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
116
|
-
eventSource.onmessage = (event) => {
|
|
117
|
-
const data = JSON.parse(event.data);
|
|
118
|
-
console.log('Analysis:', data.message);
|
|
119
|
-
};
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**SSE Connection Limits:**
|
|
123
|
-
- Maximum 5 concurrent SSE connections per user
|
|
124
|
-
- Rate limited to 10 new connections per minute
|
|
125
|
-
- Automatic circuit breaker for Redis failures
|
|
126
|
-
- Graceful degradation with fallback to polling if SSE unavailable
|
|
127
|
-
|
|
128
|
-
**Events Emitted:**
|
|
129
|
-
- `operation_started`: Analysis begins
|
|
130
|
-
- `operation_progress`: Tool calls, analysis steps
|
|
131
|
-
- `operation_completed`: Final comprehensive analysis
|
|
132
|
-
- `operation_error`: Analysis failed
|
|
133
|
-
|
|
134
|
-
**Error Handling:**
|
|
135
|
-
- `429 Too Many Requests`: SSE connection limit exceeded
|
|
136
|
-
- `503 Service Unavailable`: SSE system temporarily disabled
|
|
137
|
-
- Fallback to status polling endpoint if SSE unavailable
|
|
138
|
-
|
|
139
|
-
**Credit Consumption:**
|
|
140
|
-
- AI operations consume credits based on actual token usage
|
|
141
|
-
- Claude 4/4.1 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens
|
|
142
|
-
- Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens
|
|
143
|
-
- Credits are consumed after operation completes based on actual usage
|
|
144
|
-
|
|
145
|
-
The agent automatically determines query complexity or you can force extended analysis.
|
|
146
|
-
|
|
147
|
-
Args:
|
|
148
|
-
graph_id (str):
|
|
149
|
-
authorization (Union[None, Unset, str]):
|
|
150
|
-
auth_token (Union[None, Unset, str]):
|
|
151
|
-
body (AgentRequest): Request model for financial agent interactions.
|
|
152
|
-
|
|
153
|
-
Raises:
|
|
154
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
155
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
156
|
-
|
|
157
|
-
Returns:
|
|
158
|
-
Response[Union[AgentResponse, ErrorResponse, HTTPValidationError]]
|
|
159
|
-
"""
|
|
160
|
-
|
|
161
|
-
kwargs = _get_kwargs(
|
|
162
|
-
graph_id=graph_id,
|
|
163
|
-
body=body,
|
|
164
|
-
authorization=authorization,
|
|
165
|
-
auth_token=auth_token,
|
|
166
|
-
)
|
|
167
|
-
|
|
168
|
-
response = client.get_httpx_client().request(
|
|
169
|
-
**kwargs,
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
return _build_response(client=client, response=response)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
def sync(
|
|
176
|
-
graph_id: str,
|
|
177
|
-
*,
|
|
178
|
-
client: AuthenticatedClient,
|
|
179
|
-
body: AgentRequest,
|
|
180
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
181
|
-
auth_token: Union[None, Unset, str] = UNSET,
|
|
182
|
-
) -> Optional[Union[AgentResponse, ErrorResponse, HTTPValidationError]]:
|
|
183
|
-
"""Query Financial Agent
|
|
184
|
-
|
|
185
|
-
AI-powered financial analysis with direct access to graph data.
|
|
186
|
-
|
|
187
|
-
This endpoint provides intelligent financial analysis using an AI agent that can:
|
|
188
|
-
- Analyze entity financial statements and SEC filings
|
|
189
|
-
- Review QuickBooks transactions and accounting data
|
|
190
|
-
- Perform multi-period trend analysis
|
|
191
|
-
- Generate insights from balance sheets and income statements
|
|
192
|
-
- Answer complex financial queries with contextual understanding
|
|
193
|
-
|
|
194
|
-
**Execution Modes:**
|
|
195
|
-
- **Quick Analysis** (default): Synchronous responses for simple queries (1-2 tool calls)
|
|
196
|
-
- **Extended Analysis**: Asynchronous processing for complex research (returns operation_id for SSE
|
|
197
|
-
monitoring)
|
|
198
|
-
|
|
199
|
-
**Extended Analysis Monitoring:**
|
|
200
|
-
For complex queries, connect to the SSE stream for real-time progress:
|
|
201
|
-
```javascript
|
|
202
|
-
const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
203
|
-
eventSource.onmessage = (event) => {
|
|
204
|
-
const data = JSON.parse(event.data);
|
|
205
|
-
console.log('Analysis:', data.message);
|
|
206
|
-
};
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
**SSE Connection Limits:**
|
|
210
|
-
- Maximum 5 concurrent SSE connections per user
|
|
211
|
-
- Rate limited to 10 new connections per minute
|
|
212
|
-
- Automatic circuit breaker for Redis failures
|
|
213
|
-
- Graceful degradation with fallback to polling if SSE unavailable
|
|
214
|
-
|
|
215
|
-
**Events Emitted:**
|
|
216
|
-
- `operation_started`: Analysis begins
|
|
217
|
-
- `operation_progress`: Tool calls, analysis steps
|
|
218
|
-
- `operation_completed`: Final comprehensive analysis
|
|
219
|
-
- `operation_error`: Analysis failed
|
|
220
|
-
|
|
221
|
-
**Error Handling:**
|
|
222
|
-
- `429 Too Many Requests`: SSE connection limit exceeded
|
|
223
|
-
- `503 Service Unavailable`: SSE system temporarily disabled
|
|
224
|
-
- Fallback to status polling endpoint if SSE unavailable
|
|
225
|
-
|
|
226
|
-
**Credit Consumption:**
|
|
227
|
-
- AI operations consume credits based on actual token usage
|
|
228
|
-
- Claude 4/4.1 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens
|
|
229
|
-
- Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens
|
|
230
|
-
- Credits are consumed after operation completes based on actual usage
|
|
231
|
-
|
|
232
|
-
The agent automatically determines query complexity or you can force extended analysis.
|
|
233
|
-
|
|
234
|
-
Args:
|
|
235
|
-
graph_id (str):
|
|
236
|
-
authorization (Union[None, Unset, str]):
|
|
237
|
-
auth_token (Union[None, Unset, str]):
|
|
238
|
-
body (AgentRequest): Request model for financial agent interactions.
|
|
239
|
-
|
|
240
|
-
Raises:
|
|
241
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
242
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
243
|
-
|
|
244
|
-
Returns:
|
|
245
|
-
Union[AgentResponse, ErrorResponse, HTTPValidationError]
|
|
246
|
-
"""
|
|
247
|
-
|
|
248
|
-
return sync_detailed(
|
|
249
|
-
graph_id=graph_id,
|
|
250
|
-
client=client,
|
|
251
|
-
body=body,
|
|
252
|
-
authorization=authorization,
|
|
253
|
-
auth_token=auth_token,
|
|
254
|
-
).parsed
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
async def asyncio_detailed(
|
|
258
|
-
graph_id: str,
|
|
259
|
-
*,
|
|
260
|
-
client: AuthenticatedClient,
|
|
261
|
-
body: AgentRequest,
|
|
262
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
263
|
-
auth_token: Union[None, Unset, str] = UNSET,
|
|
264
|
-
) -> Response[Union[AgentResponse, ErrorResponse, HTTPValidationError]]:
|
|
265
|
-
"""Query Financial Agent
|
|
266
|
-
|
|
267
|
-
AI-powered financial analysis with direct access to graph data.
|
|
268
|
-
|
|
269
|
-
This endpoint provides intelligent financial analysis using an AI agent that can:
|
|
270
|
-
- Analyze entity financial statements and SEC filings
|
|
271
|
-
- Review QuickBooks transactions and accounting data
|
|
272
|
-
- Perform multi-period trend analysis
|
|
273
|
-
- Generate insights from balance sheets and income statements
|
|
274
|
-
- Answer complex financial queries with contextual understanding
|
|
275
|
-
|
|
276
|
-
**Execution Modes:**
|
|
277
|
-
- **Quick Analysis** (default): Synchronous responses for simple queries (1-2 tool calls)
|
|
278
|
-
- **Extended Analysis**: Asynchronous processing for complex research (returns operation_id for SSE
|
|
279
|
-
monitoring)
|
|
280
|
-
|
|
281
|
-
**Extended Analysis Monitoring:**
|
|
282
|
-
For complex queries, connect to the SSE stream for real-time progress:
|
|
283
|
-
```javascript
|
|
284
|
-
const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
285
|
-
eventSource.onmessage = (event) => {
|
|
286
|
-
const data = JSON.parse(event.data);
|
|
287
|
-
console.log('Analysis:', data.message);
|
|
288
|
-
};
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**SSE Connection Limits:**
|
|
292
|
-
- Maximum 5 concurrent SSE connections per user
|
|
293
|
-
- Rate limited to 10 new connections per minute
|
|
294
|
-
- Automatic circuit breaker for Redis failures
|
|
295
|
-
- Graceful degradation with fallback to polling if SSE unavailable
|
|
296
|
-
|
|
297
|
-
**Events Emitted:**
|
|
298
|
-
- `operation_started`: Analysis begins
|
|
299
|
-
- `operation_progress`: Tool calls, analysis steps
|
|
300
|
-
- `operation_completed`: Final comprehensive analysis
|
|
301
|
-
- `operation_error`: Analysis failed
|
|
302
|
-
|
|
303
|
-
**Error Handling:**
|
|
304
|
-
- `429 Too Many Requests`: SSE connection limit exceeded
|
|
305
|
-
- `503 Service Unavailable`: SSE system temporarily disabled
|
|
306
|
-
- Fallback to status polling endpoint if SSE unavailable
|
|
307
|
-
|
|
308
|
-
**Credit Consumption:**
|
|
309
|
-
- AI operations consume credits based on actual token usage
|
|
310
|
-
- Claude 4/4.1 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens
|
|
311
|
-
- Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens
|
|
312
|
-
- Credits are consumed after operation completes based on actual usage
|
|
313
|
-
|
|
314
|
-
The agent automatically determines query complexity or you can force extended analysis.
|
|
315
|
-
|
|
316
|
-
Args:
|
|
317
|
-
graph_id (str):
|
|
318
|
-
authorization (Union[None, Unset, str]):
|
|
319
|
-
auth_token (Union[None, Unset, str]):
|
|
320
|
-
body (AgentRequest): Request model for financial agent interactions.
|
|
321
|
-
|
|
322
|
-
Raises:
|
|
323
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
324
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
325
|
-
|
|
326
|
-
Returns:
|
|
327
|
-
Response[Union[AgentResponse, ErrorResponse, HTTPValidationError]]
|
|
328
|
-
"""
|
|
329
|
-
|
|
330
|
-
kwargs = _get_kwargs(
|
|
331
|
-
graph_id=graph_id,
|
|
332
|
-
body=body,
|
|
333
|
-
authorization=authorization,
|
|
334
|
-
auth_token=auth_token,
|
|
335
|
-
)
|
|
336
|
-
|
|
337
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
338
|
-
|
|
339
|
-
return _build_response(client=client, response=response)
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
async def asyncio(
|
|
343
|
-
graph_id: str,
|
|
344
|
-
*,
|
|
345
|
-
client: AuthenticatedClient,
|
|
346
|
-
body: AgentRequest,
|
|
347
|
-
authorization: Union[None, Unset, str] = UNSET,
|
|
348
|
-
auth_token: Union[None, Unset, str] = UNSET,
|
|
349
|
-
) -> Optional[Union[AgentResponse, ErrorResponse, HTTPValidationError]]:
|
|
350
|
-
"""Query Financial Agent
|
|
351
|
-
|
|
352
|
-
AI-powered financial analysis with direct access to graph data.
|
|
353
|
-
|
|
354
|
-
This endpoint provides intelligent financial analysis using an AI agent that can:
|
|
355
|
-
- Analyze entity financial statements and SEC filings
|
|
356
|
-
- Review QuickBooks transactions and accounting data
|
|
357
|
-
- Perform multi-period trend analysis
|
|
358
|
-
- Generate insights from balance sheets and income statements
|
|
359
|
-
- Answer complex financial queries with contextual understanding
|
|
360
|
-
|
|
361
|
-
**Execution Modes:**
|
|
362
|
-
- **Quick Analysis** (default): Synchronous responses for simple queries (1-2 tool calls)
|
|
363
|
-
- **Extended Analysis**: Asynchronous processing for complex research (returns operation_id for SSE
|
|
364
|
-
monitoring)
|
|
365
|
-
|
|
366
|
-
**Extended Analysis Monitoring:**
|
|
367
|
-
For complex queries, connect to the SSE stream for real-time progress:
|
|
368
|
-
```javascript
|
|
369
|
-
const eventSource = new EventSource('/v1/operations/{operation_id}/stream');
|
|
370
|
-
eventSource.onmessage = (event) => {
|
|
371
|
-
const data = JSON.parse(event.data);
|
|
372
|
-
console.log('Analysis:', data.message);
|
|
373
|
-
};
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
**SSE Connection Limits:**
|
|
377
|
-
- Maximum 5 concurrent SSE connections per user
|
|
378
|
-
- Rate limited to 10 new connections per minute
|
|
379
|
-
- Automatic circuit breaker for Redis failures
|
|
380
|
-
- Graceful degradation with fallback to polling if SSE unavailable
|
|
381
|
-
|
|
382
|
-
**Events Emitted:**
|
|
383
|
-
- `operation_started`: Analysis begins
|
|
384
|
-
- `operation_progress`: Tool calls, analysis steps
|
|
385
|
-
- `operation_completed`: Final comprehensive analysis
|
|
386
|
-
- `operation_error`: Analysis failed
|
|
387
|
-
|
|
388
|
-
**Error Handling:**
|
|
389
|
-
- `429 Too Many Requests`: SSE connection limit exceeded
|
|
390
|
-
- `503 Service Unavailable`: SSE system temporarily disabled
|
|
391
|
-
- Fallback to status polling endpoint if SSE unavailable
|
|
392
|
-
|
|
393
|
-
**Credit Consumption:**
|
|
394
|
-
- AI operations consume credits based on actual token usage
|
|
395
|
-
- Claude 4/4.1 Opus: ~15 credits per 1K input tokens, ~75 credits per 1K output tokens
|
|
396
|
-
- Claude 4 Sonnet: ~3 credits per 1K input tokens, ~15 credits per 1K output tokens
|
|
397
|
-
- Credits are consumed after operation completes based on actual usage
|
|
398
|
-
|
|
399
|
-
The agent automatically determines query complexity or you can force extended analysis.
|
|
400
|
-
|
|
401
|
-
Args:
|
|
402
|
-
graph_id (str):
|
|
403
|
-
authorization (Union[None, Unset, str]):
|
|
404
|
-
auth_token (Union[None, Unset, str]):
|
|
405
|
-
body (AgentRequest): Request model for financial agent interactions.
|
|
406
|
-
|
|
407
|
-
Raises:
|
|
408
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
409
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
410
|
-
|
|
411
|
-
Returns:
|
|
412
|
-
Union[AgentResponse, ErrorResponse, HTTPValidationError]
|
|
413
|
-
"""
|
|
414
|
-
|
|
415
|
-
return (
|
|
416
|
-
await asyncio_detailed(
|
|
417
|
-
graph_id=graph_id,
|
|
418
|
-
client=client,
|
|
419
|
-
body=body,
|
|
420
|
-
authorization=authorization,
|
|
421
|
-
auth_token=auth_token,
|
|
422
|
-
)
|
|
423
|
-
).parsed
|