quraite 0.0.2__py3-none-any.whl → 0.1.0__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 (48) hide show
  1. quraite/__init__.py +3 -3
  2. quraite/adapters/__init__.py +134 -134
  3. quraite/adapters/agno_adapter.py +159 -159
  4. quraite/adapters/base.py +123 -123
  5. quraite/adapters/bedrock_agents_adapter.py +343 -343
  6. quraite/adapters/flowise_adapter.py +275 -275
  7. quraite/adapters/google_adk_adapter.py +209 -209
  8. quraite/adapters/http_adapter.py +239 -239
  9. quraite/adapters/langflow_adapter.py +192 -192
  10. quraite/adapters/langgraph_adapter.py +304 -304
  11. quraite/adapters/langgraph_server_adapter.py +252 -252
  12. quraite/adapters/n8n_adapter.py +220 -220
  13. quraite/adapters/openai_agents_adapter.py +269 -269
  14. quraite/adapters/pydantic_ai_adapter.py +312 -312
  15. quraite/adapters/smolagents_adapter.py +152 -152
  16. quraite/logger.py +61 -64
  17. quraite/schema/message.py +91 -54
  18. quraite/schema/response.py +16 -16
  19. quraite/serve/__init__.py +1 -1
  20. quraite/serve/cloudflared.py +210 -210
  21. quraite/serve/local_agent.py +360 -360
  22. quraite/tracing/__init__.py +24 -24
  23. quraite/tracing/constants.py +16 -16
  24. quraite/tracing/span_exporter.py +115 -115
  25. quraite/tracing/span_processor.py +49 -49
  26. quraite/tracing/tool_extractors.py +290 -290
  27. quraite/tracing/trace.py +564 -494
  28. quraite/tracing/types.py +179 -179
  29. quraite/tracing/utils.py +170 -170
  30. quraite/utils/json_utils.py +269 -269
  31. {quraite-0.0.2.dist-info → quraite-0.1.0.dist-info}/METADATA +9 -9
  32. quraite-0.1.0.dist-info/RECORD +35 -0
  33. {quraite-0.0.2.dist-info → quraite-0.1.0.dist-info}/WHEEL +1 -1
  34. quraite/traces/traces_adk_openinference.json +0 -379
  35. quraite/traces/traces_agno_multi_agent.json +0 -669
  36. quraite/traces/traces_agno_openinference.json +0 -321
  37. quraite/traces/traces_crewai_openinference.json +0 -155
  38. quraite/traces/traces_langgraph_openinference.json +0 -349
  39. quraite/traces/traces_langgraph_openinference_multi_agent.json +0 -2705
  40. quraite/traces/traces_langgraph_traceloop.json +0 -510
  41. quraite/traces/traces_openai_agents_multi_agent_1.json +0 -402
  42. quraite/traces/traces_openai_agents_openinference.json +0 -341
  43. quraite/traces/traces_pydantic_openinference.json +0 -286
  44. quraite/traces/traces_pydantic_openinference_multi_agent_1.json +0 -399
  45. quraite/traces/traces_pydantic_openinference_multi_agent_2.json +0 -398
  46. quraite/traces/traces_smol_agents_openinference.json +0 -397
  47. quraite/traces/traces_smol_agents_tool_calling_openinference.json +0 -704
  48. quraite-0.0.2.dist-info/RECORD +0 -49
@@ -1,286 +0,0 @@
1
- [
2
- {
3
- "trace_id": "a3e52f78",
4
- "spans": [
5
- {
6
- "name": "chat gpt-4o",
7
- "context": {
8
- "trace_id": "0xa3e52f785db409849af192040d33e59d",
9
- "span_id": "0xcf2353b547890870",
10
- "trace_state": "[]"
11
- },
12
- "kind": "SpanKind.INTERNAL",
13
- "parent_id": "0x9b6fa2671ac8a9c7",
14
- "start_time": "2025-11-26T07:08:06.869838Z",
15
- "end_time": "2025-11-26T07:08:07.719219Z",
16
- "status": {
17
- "status_code": "UNSET"
18
- },
19
- "attributes": {
20
- "gen_ai.operation.name": "chat",
21
- "gen_ai.system": "openai",
22
- "gen_ai.request.model": "gpt-4o",
23
- "server.address": "api.openai.com",
24
- "model_request_parameters": "{\"function_tools\": [{\"name\": \"customer_balance\", \"parameters_json_schema\": {\"additionalProperties\": false, \"properties\": {\"include_pending\": {\"description\": \"Whether to include pending transactions\", \"type\": \"boolean\"}}, \"required\": [\"include_pending\"], \"type\": \"object\"}, \"description\": \"<summary>Tool to retrieve the customer's current account balance.\\n\\nThis function provides the agent with the ability to look up\\nbalance information when needed to answer customer queries.</summary>\\n<returns>\\n<description>A formatted string with the customer's balance</description>\\n</returns>\", \"outer_typed_dict_key\": null, \"strict\": true, \"sequential\": false, \"kind\": \"function\", \"metadata\": null}], \"builtin_tools\": [], \"output_mode\": \"tool\", \"output_object\": null, \"output_tools\": [{\"name\": \"final_result\", \"parameters_json_schema\": {\"properties\": {\"support_advice\": {\"description\": \"Personalized advice and information for the customer\", \"type\": \"string\"}, \"block_card\": {\"description\": \"Whether the customer's card should be blocked as a security measure\", \"type\": \"boolean\"}, \"risk\": {\"description\": \"Risk assessment level of the query (0-10)\", \"maximum\": 10, \"minimum\": 0, \"type\": \"integer\"}}, \"required\": [\"support_advice\", \"block_card\", \"risk\"], \"type\": \"object\", \"additionalProperties\": false}, \"description\": \"Structured output format for the support agent responses.\", \"outer_typed_dict_key\": null, \"strict\": true, \"sequential\": false, \"kind\": \"output\", \"metadata\": null}], \"prompted_output_template\": null, \"allow_text_output\": false, \"allow_image_output\": false}",
25
- "gen_ai.input.messages": "[{\"role\": \"system\", \"parts\": [{\"type\": \"text\", \"content\": \"You are a support agent for Secure Banking Inc. Your role is to provide helpful support to customers while assessing the security risk of their queries. Always be professional, concise, and empathetic in your responses.\"}, {\"type\": \"text\", \"content\": \"The customer's name is John Smith. Address them by name in your response.\"}]}, {\"role\": \"user\", \"parts\": [{\"type\": \"text\", \"content\": \"What is my current account balance?\"}]}]",
26
- "gen_ai.output.messages": "[{\"role\": \"assistant\", \"parts\": [{\"type\": \"tool_call\", \"id\": \"call_heRVWOYzwcZpXdUgY4NQaD1C\", \"name\": \"customer_balance\", \"arguments\": \"{\\\"include_pending\\\":true}\"}], \"finish_reason\": \"tool_call\"}]",
27
- "logfire.json_schema": "{\"type\": \"object\", \"properties\": {\"gen_ai.input.messages\": {\"type\": \"array\"}, \"gen_ai.output.messages\": {\"type\": \"array\"}, \"model_request_parameters\": {\"type\": \"object\"}}}",
28
- "gen_ai.usage.input_tokens": 243,
29
- "gen_ai.usage.output_tokens": 15,
30
- "gen_ai.response.model": "gpt-4o-2024-08-06",
31
- "operation.cost": 0.0007575,
32
- "gen_ai.response.id": "chatcmpl-Cg3vDtrKHmxOKYrfIH7KoORZy0p9o",
33
- "gen_ai.response.finish_reasons": [
34
- "tool_call"
35
- ],
36
- "openinference.span.kind": "LLM",
37
- "llm.system": "openai",
38
- "llm.model_name": "gpt-4o",
39
- "llm.token_count.prompt": 243,
40
- "llm.token_count.completion": 15,
41
- "llm.token_count.total": 258,
42
- "llm.tools.0.tool.name": "final_result",
43
- "llm.tools.0.tool.description": "Structured output format for the support agent responses.",
44
- "llm.input_messages.0.message.content": "The customer's name is John Smith. Address them by name in your response.",
45
- "llm.input_messages.0.message.role": "system",
46
- "llm.input_messages.1.message.content": "What is my current account balance?",
47
- "llm.input_messages.1.message.role": "user",
48
- "input.value": "What is my current account balance?",
49
- "llm.output_messages.0.message.role": "assistant",
50
- "llm.output_messages.0.message.tool_calls.0.tool_call.function.name": "customer_balance",
51
- "llm.output_messages.0.message.tool_calls.0.tool_call.function.arguments": "{\"include_pending\":true}",
52
- "llm.output_messages.0.message.tool_calls.0.tool_call.id": "call_heRVWOYzwcZpXdUgY4NQaD1C"
53
- },
54
- "events": [],
55
- "links": [],
56
- "resource": {
57
- "attributes": {
58
- "telemetry.sdk.language": "python",
59
- "telemetry.sdk.name": "opentelemetry",
60
- "telemetry.sdk.version": "1.38.0",
61
- "service.name": "banking-support-agent",
62
- "service.version": "1.0.0",
63
- "openinference.project.name": "banking-support-agent"
64
- },
65
- "schema_url": ""
66
- }
67
- },
68
- {
69
- "name": "running tool",
70
- "context": {
71
- "trace_id": "0xa3e52f785db409849af192040d33e59d",
72
- "span_id": "0x22af1e9b88fa1e34",
73
- "trace_state": "[]"
74
- },
75
- "kind": "SpanKind.INTERNAL",
76
- "parent_id": "0x12c3299cdfd28715",
77
- "start_time": "2025-11-26T07:08:07.719930Z",
78
- "end_time": "2025-11-26T07:08:07.720001Z",
79
- "status": {
80
- "status_code": "UNSET"
81
- },
82
- "attributes": {
83
- "gen_ai.tool.name": "customer_balance",
84
- "gen_ai.tool.call.id": "call_heRVWOYzwcZpXdUgY4NQaD1C",
85
- "tool_arguments": "{\"include_pending\":true}",
86
- "logfire.msg": "running tool: customer_balance",
87
- "logfire.json_schema": "{\"type\": \"object\", \"properties\": {\"tool_arguments\": {\"type\": \"object\"}, \"tool_response\": {\"type\": \"object\"}, \"gen_ai.tool.name\": {}, \"gen_ai.tool.call.id\": {}}}",
88
- "tool_response": "$123.45",
89
- "openinference.span.kind": "TOOL",
90
- "tool.name": "customer_balance",
91
- "tool_call.id": "call_heRVWOYzwcZpXdUgY4NQaD1C"
92
- },
93
- "events": [],
94
- "links": [],
95
- "resource": {
96
- "attributes": {
97
- "telemetry.sdk.language": "python",
98
- "telemetry.sdk.name": "opentelemetry",
99
- "telemetry.sdk.version": "1.38.0",
100
- "service.name": "banking-support-agent",
101
- "service.version": "1.0.0",
102
- "openinference.project.name": "banking-support-agent"
103
- },
104
- "schema_url": ""
105
- }
106
- },
107
- {
108
- "name": "running tools",
109
- "context": {
110
- "trace_id": "0xa3e52f785db409849af192040d33e59d",
111
- "span_id": "0x12c3299cdfd28715",
112
- "trace_state": "[]"
113
- },
114
- "kind": "SpanKind.INTERNAL",
115
- "parent_id": "0x9b6fa2671ac8a9c7",
116
- "start_time": "2025-11-26T07:08:07.719834Z",
117
- "end_time": "2025-11-26T07:08:07.720098Z",
118
- "status": {
119
- "status_code": "UNSET"
120
- },
121
- "attributes": {
122
- "tools": [
123
- "customer_balance"
124
- ],
125
- "logfire.msg": "running 1 tool",
126
- "openinference.span.kind": "CHAIN"
127
- },
128
- "events": [],
129
- "links": [],
130
- "resource": {
131
- "attributes": {
132
- "telemetry.sdk.language": "python",
133
- "telemetry.sdk.name": "opentelemetry",
134
- "telemetry.sdk.version": "1.38.0",
135
- "service.name": "banking-support-agent",
136
- "service.version": "1.0.0",
137
- "openinference.project.name": "banking-support-agent"
138
- },
139
- "schema_url": ""
140
- }
141
- },
142
- {
143
- "name": "chat gpt-4o",
144
- "context": {
145
- "trace_id": "0xa3e52f785db409849af192040d33e59d",
146
- "span_id": "0xe12831971c359237",
147
- "trace_state": "[]"
148
- },
149
- "kind": "SpanKind.INTERNAL",
150
- "parent_id": "0x9b6fa2671ac8a9c7",
151
- "start_time": "2025-11-26T07:08:07.720596Z",
152
- "end_time": "2025-11-26T07:08:09.225907Z",
153
- "status": {
154
- "status_code": "UNSET"
155
- },
156
- "attributes": {
157
- "gen_ai.operation.name": "chat",
158
- "gen_ai.system": "openai",
159
- "gen_ai.request.model": "gpt-4o",
160
- "server.address": "api.openai.com",
161
- "model_request_parameters": "{\"function_tools\": [{\"name\": \"customer_balance\", \"parameters_json_schema\": {\"additionalProperties\": false, \"properties\": {\"include_pending\": {\"description\": \"Whether to include pending transactions\", \"type\": \"boolean\"}}, \"required\": [\"include_pending\"], \"type\": \"object\"}, \"description\": \"<summary>Tool to retrieve the customer's current account balance.\\n\\nThis function provides the agent with the ability to look up\\nbalance information when needed to answer customer queries.</summary>\\n<returns>\\n<description>A formatted string with the customer's balance</description>\\n</returns>\", \"outer_typed_dict_key\": null, \"strict\": true, \"sequential\": false, \"kind\": \"function\", \"metadata\": null}], \"builtin_tools\": [], \"output_mode\": \"tool\", \"output_object\": null, \"output_tools\": [{\"name\": \"final_result\", \"parameters_json_schema\": {\"properties\": {\"support_advice\": {\"description\": \"Personalized advice and information for the customer\", \"type\": \"string\"}, \"block_card\": {\"description\": \"Whether the customer's card should be blocked as a security measure\", \"type\": \"boolean\"}, \"risk\": {\"description\": \"Risk assessment level of the query (0-10)\", \"maximum\": 10, \"minimum\": 0, \"type\": \"integer\"}}, \"required\": [\"support_advice\", \"block_card\", \"risk\"], \"type\": \"object\", \"additionalProperties\": false}, \"description\": \"Structured output format for the support agent responses.\", \"outer_typed_dict_key\": null, \"strict\": true, \"sequential\": false, \"kind\": \"output\", \"metadata\": null}], \"prompted_output_template\": null, \"allow_text_output\": false, \"allow_image_output\": false}",
162
- "gen_ai.input.messages": "[{\"role\": \"system\", \"parts\": [{\"type\": \"text\", \"content\": \"You are a support agent for Secure Banking Inc. Your role is to provide helpful support to customers while assessing the security risk of their queries. Always be professional, concise, and empathetic in your responses.\"}, {\"type\": \"text\", \"content\": \"The customer's name is John Smith. Address them by name in your response.\"}]}, {\"role\": \"user\", \"parts\": [{\"type\": \"text\", \"content\": \"What is my current account balance?\"}]}, {\"role\": \"assistant\", \"parts\": [{\"type\": \"tool_call\", \"id\": \"call_heRVWOYzwcZpXdUgY4NQaD1C\", \"name\": \"customer_balance\", \"arguments\": \"{\\\"include_pending\\\":true}\"}], \"finish_reason\": \"tool_call\"}, {\"role\": \"user\", \"parts\": [{\"type\": \"tool_call_response\", \"id\": \"call_heRVWOYzwcZpXdUgY4NQaD1C\", \"name\": \"customer_balance\", \"result\": \"$123.45\"}]}]",
163
- "gen_ai.output.messages": "[{\"role\": \"assistant\", \"parts\": [{\"type\": \"tool_call\", \"id\": \"call_9OfyhtQa6F7jFZc9AumDiWYD\", \"name\": \"final_result\", \"arguments\": \"{\\\"support_advice\\\":\\\"Hello John, your current account balance, including pending transactions, is $123.45. If you have any further questions or need assistance with anything else, feel free to ask!\\\",\\\"block_card\\\":false,\\\"risk\\\":1}\"}], \"finish_reason\": \"tool_call\"}]",
164
- "logfire.json_schema": "{\"type\": \"object\", \"properties\": {\"gen_ai.input.messages\": {\"type\": \"array\"}, \"gen_ai.output.messages\": {\"type\": \"array\"}, \"model_request_parameters\": {\"type\": \"object\"}}}",
165
- "gen_ai.usage.input_tokens": 270,
166
- "gen_ai.usage.output_tokens": 60,
167
- "gen_ai.response.model": "gpt-4o-2024-08-06",
168
- "operation.cost": 0.001275,
169
- "gen_ai.response.id": "chatcmpl-Cg3vEAvfT3PFYv8rTjBBg6kPXTyDI",
170
- "gen_ai.response.finish_reasons": [
171
- "tool_call"
172
- ],
173
- "openinference.span.kind": "LLM",
174
- "llm.system": "openai",
175
- "llm.model_name": "gpt-4o",
176
- "llm.token_count.prompt": 270,
177
- "llm.token_count.completion": 60,
178
- "llm.token_count.total": 330,
179
- "llm.tools.0.tool.name": "final_result",
180
- "llm.tools.0.tool.description": "Structured output format for the support agent responses.",
181
- "llm.input_messages.0.message.content": "The customer's name is John Smith. Address them by name in your response.",
182
- "llm.input_messages.0.message.role": "system",
183
- "llm.input_messages.1.message.content": "What is my current account balance?",
184
- "llm.input_messages.1.message.role": "user",
185
- "llm.input_messages.2.message.tool_calls.0.tool_call.function.name": "customer_balance",
186
- "llm.input_messages.2.message.tool_calls.0.tool_call.function.arguments": "{\"include_pending\":true}",
187
- "llm.input_messages.2.message.tool_calls.0.tool_call.id": "call_heRVWOYzwcZpXdUgY4NQaD1C",
188
- "llm.input_messages.2.message.role": "assistant",
189
- "llm.input_messages.3.message.content": "$123.45",
190
- "llm.input_messages.3.message.tool_call_id": "call_heRVWOYzwcZpXdUgY4NQaD1C",
191
- "llm.input_messages.3.message.role": "tool",
192
- "input.value": "What is my current account balance?",
193
- "llm.output_messages.0.message.role": "assistant",
194
- "llm.output_messages.0.message.tool_calls.0.tool_call.function.name": "final_result",
195
- "llm.output_messages.0.message.tool_calls.0.tool_call.function.arguments": "{\"support_advice\":\"Hello John, your current account balance, including pending transactions, is $123.45. If you have any further questions or need assistance with anything else, feel free to ask!\",\"block_card\":false,\"risk\":1}",
196
- "llm.output_messages.0.message.tool_calls.0.tool_call.id": "call_9OfyhtQa6F7jFZc9AumDiWYD",
197
- "output.value": "{\"support_advice\":\"Hello John, your current account balance, including pending transactions, is $123.45. If you have any further questions or need assistance with anything else, feel free to ask!\",\"block_card\":false,\"risk\":1}"
198
- },
199
- "events": [],
200
- "links": [],
201
- "resource": {
202
- "attributes": {
203
- "telemetry.sdk.language": "python",
204
- "telemetry.sdk.name": "opentelemetry",
205
- "telemetry.sdk.version": "1.38.0",
206
- "service.name": "banking-support-agent",
207
- "service.version": "1.0.0",
208
- "openinference.project.name": "banking-support-agent"
209
- },
210
- "schema_url": ""
211
- }
212
- },
213
- {
214
- "name": "agent run",
215
- "context": {
216
- "trace_id": "0xa3e52f785db409849af192040d33e59d",
217
- "span_id": "0x9b6fa2671ac8a9c7",
218
- "trace_state": "[]"
219
- },
220
- "kind": "SpanKind.INTERNAL",
221
- "parent_id": "0xdd6fed47e17158a2",
222
- "start_time": "2025-11-26T07:08:06.858903Z",
223
- "end_time": "2025-11-26T07:08:09.227176Z",
224
- "status": {
225
- "status_code": "UNSET"
226
- },
227
- "attributes": {
228
- "model_name": "gpt-4o",
229
- "agent_name": "support_agent",
230
- "gen_ai.agent.name": "support_agent",
231
- "logfire.msg": "support_agent run",
232
- "final_result": "{\"support_advice\": \"Hello John, your current account balance, including pending transactions, is $123.45. If you have any further questions or need assistance with anything else, feel free to ask!\", \"block_card\": false, \"risk\": 1}",
233
- "gen_ai.usage.input_tokens": 513,
234
- "gen_ai.usage.output_tokens": 75,
235
- "pydantic_ai.all_messages": "[{\"role\": \"system\", \"parts\": [{\"type\": \"text\", \"content\": \"You are a support agent for Secure Banking Inc. Your role is to provide helpful support to customers while assessing the security risk of their queries. Always be professional, concise, and empathetic in your responses.\"}, {\"type\": \"text\", \"content\": \"The customer's name is John Smith. Address them by name in your response.\"}]}, {\"role\": \"user\", \"parts\": [{\"type\": \"text\", \"content\": \"What is my current account balance?\"}]}, {\"role\": \"assistant\", \"parts\": [{\"type\": \"tool_call\", \"id\": \"call_heRVWOYzwcZpXdUgY4NQaD1C\", \"name\": \"customer_balance\", \"arguments\": \"{\\\"include_pending\\\":true}\"}], \"finish_reason\": \"tool_call\"}, {\"role\": \"user\", \"parts\": [{\"type\": \"tool_call_response\", \"id\": \"call_heRVWOYzwcZpXdUgY4NQaD1C\", \"name\": \"customer_balance\", \"result\": \"$123.45\"}]}, {\"role\": \"assistant\", \"parts\": [{\"type\": \"tool_call\", \"id\": \"call_9OfyhtQa6F7jFZc9AumDiWYD\", \"name\": \"final_result\", \"arguments\": \"{\\\"support_advice\\\":\\\"Hello John, your current account balance, including pending transactions, is $123.45. If you have any further questions or need assistance with anything else, feel free to ask!\\\",\\\"block_card\\\":false,\\\"risk\\\":1}\"}], \"finish_reason\": \"tool_call\"}, {\"role\": \"user\", \"parts\": [{\"type\": \"tool_call_response\", \"id\": \"call_9OfyhtQa6F7jFZc9AumDiWYD\", \"name\": \"final_result\", \"result\": \"Final result processed.\"}]}]",
236
- "logfire.json_schema": "{\"type\": \"object\", \"properties\": {\"pydantic_ai.all_messages\": {\"type\": \"array\"}, \"final_result\": {\"type\": \"object\"}}}",
237
- "output.value": "{\"support_advice\": \"Hello John, your current account balance, including pending transactions, is $123.45. If you have any further questions or need assistance with anything else, feel free to ask!\", \"block_card\": false, \"risk\": 1}",
238
- "input.value": "What is my current account balance?",
239
- "openinference.span.kind": "AGENT"
240
- },
241
- "events": [],
242
- "links": [],
243
- "resource": {
244
- "attributes": {
245
- "telemetry.sdk.language": "python",
246
- "telemetry.sdk.name": "opentelemetry",
247
- "telemetry.sdk.version": "1.38.0",
248
- "service.name": "banking-support-agent",
249
- "service.version": "1.0.0",
250
- "openinference.project.name": "banking-support-agent"
251
- },
252
- "schema_url": ""
253
- }
254
- },
255
- {
256
- "name": "quraite/testcase-1",
257
- "context": {
258
- "trace_id": "0xa3e52f785db409849af192040d33e59d",
259
- "span_id": "0xdd6fed47e17158a2",
260
- "trace_state": "[]"
261
- },
262
- "kind": "SpanKind.INTERNAL",
263
- "parent_id": null,
264
- "start_time": "2025-11-26T07:08:06.858303Z",
265
- "end_time": "2025-11-26T07:08:09.227232Z",
266
- "status": {
267
- "status_code": "UNSET"
268
- },
269
- "attributes": {},
270
- "events": [],
271
- "links": [],
272
- "resource": {
273
- "attributes": {
274
- "telemetry.sdk.language": "python",
275
- "telemetry.sdk.name": "opentelemetry",
276
- "telemetry.sdk.version": "1.38.0",
277
- "service.name": "banking-support-agent",
278
- "service.version": "1.0.0",
279
- "openinference.project.name": "banking-support-agent"
280
- },
281
- "schema_url": ""
282
- }
283
- }
284
- ]
285
- }
286
- ]