agenttrace-io 0.1.9__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,66 @@
1
+ Metadata-Version: 2.4
2
+ Name: agenttrace-io
3
+ Version: 0.1.9
4
+ Summary: AgentTrace Python SDK - Drop-in tracing for any AI agent
5
+ Author: Klepsiphron
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Klepsiphron/agenttrace
8
+ Project-URL: Repository, https://github.com/Klepsiphron/agenttrace
9
+ Keywords: ai,agents,observability,tracing,llm
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
22
+
23
+ # agenttrace-io (Python SDK)
24
+
25
+ Drop-in tracing for any AI agent. Local SQLite storage, zero dependencies, zero cloud.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pip install agenttrace-io
31
+ ```
32
+
33
+ Requires Python 3.10+.
34
+
35
+ ## Quickstart
36
+
37
+ ```python
38
+ from agenttrace import init, trace
39
+
40
+ agent = init(db_path="./traces.db")
41
+
42
+ # Trace a callable
43
+ result = agent.trace("my-op", lambda: 42 * 2)
44
+
45
+ # Use as decorator
46
+ @trace("greet")
47
+ def greet(name: str) -> str:
48
+ return f"Hello, {name}"
49
+
50
+ # Use as context manager
51
+ with agent.trace("context-op") as t:
52
+ value = "computed"
53
+ t.set_output(value)
54
+
55
+ # Query and export
56
+ traces = agent.get_traces()
57
+ stats = agent.get_stats()
58
+ agent.export("json")
59
+ agent.close()
60
+ ```
61
+
62
+ See the [full README](https://github.com/Klepsiphron/agenttrace#python-sdk) for more.
63
+
64
+ ## License
65
+
66
+ MIT © Klepsiphron
@@ -0,0 +1,44 @@
1
+ # agenttrace-io (Python SDK)
2
+
3
+ Drop-in tracing for any AI agent. Local SQLite storage, zero dependencies, zero cloud.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install agenttrace-io
9
+ ```
10
+
11
+ Requires Python 3.10+.
12
+
13
+ ## Quickstart
14
+
15
+ ```python
16
+ from agenttrace import init, trace
17
+
18
+ agent = init(db_path="./traces.db")
19
+
20
+ # Trace a callable
21
+ result = agent.trace("my-op", lambda: 42 * 2)
22
+
23
+ # Use as decorator
24
+ @trace("greet")
25
+ def greet(name: str) -> str:
26
+ return f"Hello, {name}"
27
+
28
+ # Use as context manager
29
+ with agent.trace("context-op") as t:
30
+ value = "computed"
31
+ t.set_output(value)
32
+
33
+ # Query and export
34
+ traces = agent.get_traces()
35
+ stats = agent.get_stats()
36
+ agent.export("json")
37
+ agent.close()
38
+ ```
39
+
40
+ See the [full README](https://github.com/Klepsiphron/agenttrace#python-sdk) for more.
41
+
42
+ ## License
43
+
44
+ MIT © Klepsiphron
@@ -0,0 +1,45 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "agenttrace-io"
7
+ version = "0.1.9"
8
+ description = "AgentTrace Python SDK - Drop-in tracing for any AI agent"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Klepsiphron" }
14
+ ]
15
+ keywords = ["ai", "agents", "observability", "tracing", "llm"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ ]
26
+ dependencies = []
27
+
28
+ [project.optional-dependencies]
29
+ dev = [
30
+ "pytest>=8.0.0",
31
+ ]
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/Klepsiphron/agenttrace"
35
+ Repository = "https://github.com/Klepsiphron/agenttrace"
36
+
37
+ [tool.setuptools.packages.find]
38
+ where = ["src"]
39
+
40
+ [tool.pytest.ini_options]
41
+ testpaths = ["tests"]
42
+ python_files = ["test_*.py"]
43
+ python_classes = ["Test*"]
44
+ python_functions = ["test_*"]
45
+ addopts = "-v --tb=short"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,68 @@
1
+ """
2
+ AgentTrace Python SDK
3
+ Drop-in tracing and observability for AI agents.
4
+ """
5
+
6
+ from .core import (
7
+ AgentTrace,
8
+ AgentUsageTracker,
9
+ VERSION,
10
+ PACKAGE_NAME,
11
+ init,
12
+ get_agent_trace,
13
+ trace,
14
+ score,
15
+ evaluate,
16
+ evaluate_trace,
17
+ )
18
+ from .storage import TraceStorage
19
+ from .types import (
20
+ AgentUsageFilter,
21
+ AgentUsageRecord,
22
+ CostBreakdown,
23
+ EvaluateOptions,
24
+ ExportFormat,
25
+ Run,
26
+ RunStatus,
27
+ Scorer,
28
+ ScorerResult,
29
+ TokenUsage,
30
+ ToolCall,
31
+ Trace,
32
+ TraceConfig,
33
+ TraceFilter,
34
+ TraceStats,
35
+ UsageStats,
36
+ )
37
+
38
+ __all__ = [
39
+ # Core public API exports
40
+ "AgentTrace",
41
+ "TraceStorage",
42
+ "Run",
43
+ "Trace",
44
+ "TokenUsage",
45
+ "ToolCall",
46
+ "TraceConfig",
47
+ "TraceFilter",
48
+ "TraceStats",
49
+ "ExportFormat",
50
+ "Scorer",
51
+ "ScorerResult",
52
+ "CostBreakdown",
53
+ "AgentUsageRecord",
54
+ "AgentUsageFilter",
55
+ "UsageStats",
56
+ "RunStatus",
57
+ # Additional public surface (module helpers + tracker)
58
+ "AgentUsageTracker",
59
+ "init",
60
+ "trace",
61
+ "get_agent_trace",
62
+ "score",
63
+ "evaluate",
64
+ "evaluate_trace",
65
+ "VERSION",
66
+ "PACKAGE_NAME",
67
+ "EvaluateOptions",
68
+ ]