agenteval-sdk 0.1.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.
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: agenteval-sdk
3
+ Version: 0.1.0
4
+ Summary: Enterprise AI Governance & Telemetry SDK
5
+ Author: Praveen Tumma
6
+ Author-email: praveentumma@gmail.com
7
+ Requires-Python: >=3.7
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: requests>=2.25.1
10
+ Dynamic: author
11
+ Dynamic: author-email
12
+ Dynamic: description
13
+ Dynamic: description-content-type
14
+ Dynamic: requires-dist
15
+ Dynamic: requires-python
16
+ Dynamic: summary
17
+
18
+ # AgentEval SDK - The standard for Enterprise AI Governance.
@@ -0,0 +1 @@
1
+ # AgentEval SDK - The standard for Enterprise AI Governance.
@@ -0,0 +1,54 @@
1
+ import os
2
+ import time
3
+ import requests
4
+ import uuid
5
+ from functools import wraps
6
+
7
+ class AgentEval:
8
+ def __init__(self, api_key=None, api_url=None):
9
+ self.api_key = api_key or os.getenv("AGENTEVAL_API_KEY")
10
+ self.api_url = api_url or os.getenv("AGENTEVAL_API_URL", "https://sandbox.agenteval.in/api")
11
+
12
+ if not self.api_key:
13
+ print("⚠️ [AgentEval] Warning: No API key provided. Traces will be rejected.")
14
+
15
+ def trace(self, agent_name="default_agent"):
16
+ """Decorator to capture execution telemetry of any agentic function."""
17
+ def decorator(func):
18
+ @wraps(func)
19
+ def wrapper(*args, **kwargs):
20
+ start_time = time.time()
21
+ try:
22
+ output_data = func(*args, **kwargs)
23
+ status = "success"
24
+ except Exception as e:
25
+ output_data = str(e)
26
+ status = "error"
27
+ raise e
28
+ finally:
29
+ end_time = time.time()
30
+ payload = {
31
+ "trace_id": str(uuid.uuid4()),
32
+ "agent_name": agent_name,
33
+ "input": str(args) + str(kwargs),
34
+ "output": str(output_data),
35
+ "start_time": start_time,
36
+ "end_time": end_time,
37
+ "status": status
38
+ }
39
+ try:
40
+ resp = requests.post(
41
+ f"{self.api_url}/trace",
42
+ json=payload,
43
+ headers={"X-AgentEval-API-Key": self.api_key, "Content-Type": "application/json"}
44
+ )
45
+ if resp.status_code == 403:
46
+ print(f"🛑 [AgentEval BLOCKED] {resp.text}")
47
+ except Exception:
48
+ pass # Fail silently so we don't crash the customer's agent
49
+ return output_data
50
+ return wrapper
51
+ return decorator
52
+
53
+ # Global instance for easy importing
54
+ client = AgentEval()
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: agenteval-sdk
3
+ Version: 0.1.0
4
+ Summary: Enterprise AI Governance & Telemetry SDK
5
+ Author: Praveen Tumma
6
+ Author-email: praveentumma@gmail.com
7
+ Requires-Python: >=3.7
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: requests>=2.25.1
10
+ Dynamic: author
11
+ Dynamic: author-email
12
+ Dynamic: description
13
+ Dynamic: description-content-type
14
+ Dynamic: requires-dist
15
+ Dynamic: requires-python
16
+ Dynamic: summary
17
+
18
+ # AgentEval SDK - The standard for Enterprise AI Governance.
@@ -0,0 +1,8 @@
1
+ README.md
2
+ setup.py
3
+ agenteval/__init__.py
4
+ agenteval_sdk.egg-info/PKG-INFO
5
+ agenteval_sdk.egg-info/SOURCES.txt
6
+ agenteval_sdk.egg-info/dependency_links.txt
7
+ agenteval_sdk.egg-info/requires.txt
8
+ agenteval_sdk.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ requests>=2.25.1
@@ -0,0 +1 @@
1
+ agenteval
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,16 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="agenteval-sdk", # If taken, try agenteval-core
5
+ version="0.1.0",
6
+ description="Enterprise AI Governance & Telemetry SDK",
7
+ long_description=open("README.md").read(),
8
+ long_description_content_type="text/markdown",
9
+ author="Praveen Tumma",
10
+ author_email="praveentumma@gmail.com",
11
+ packages=find_packages(),
12
+ install_requires=[
13
+ "requests>=2.25.1"
14
+ ],
15
+ python_requires=">=3.7",
16
+ )