theforge 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.
- theforge-0.1.0/PKG-INFO +36 -0
- theforge-0.1.0/README.md +20 -0
- theforge-0.1.0/pyproject.toml +21 -0
- theforge-0.1.0/setup.cfg +4 -0
- theforge-0.1.0/theforge/__init__.py +67 -0
- theforge-0.1.0/theforge/_core.py +1472 -0
- theforge-0.1.0/theforge/eval.py +473 -0
- theforge-0.1.0/theforge.egg-info/PKG-INFO +36 -0
- theforge-0.1.0/theforge.egg-info/SOURCES.txt +10 -0
- theforge-0.1.0/theforge.egg-info/dependency_links.txt +1 -0
- theforge-0.1.0/theforge.egg-info/requires.txt +12 -0
- theforge-0.1.0/theforge.egg-info/top_level.txt +1 -0
theforge-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: theforge
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: TheForge SDK — Observability for AI agents
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Provides-Extra: httpx
|
|
9
|
+
Requires-Dist: httpx>=0.24; extra == "httpx"
|
|
10
|
+
Provides-Extra: requests
|
|
11
|
+
Requires-Dist: requests>=2.28; extra == "requests"
|
|
12
|
+
Provides-Extra: fastapi
|
|
13
|
+
Requires-Dist: fastapi>=0.100; extra == "fastapi"
|
|
14
|
+
Provides-Extra: flask
|
|
15
|
+
Requires-Dist: flask>=2.3; extra == "flask"
|
|
16
|
+
|
|
17
|
+
# TheForge Python SDK
|
|
18
|
+
|
|
19
|
+
TheForge Python SDK provides tracing, observability, and local evaluation helpers for AI agents.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install theforge
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from theforge import observe
|
|
31
|
+
|
|
32
|
+
observe(
|
|
33
|
+
platform_url="https://your-forge-host",
|
|
34
|
+
api_key="your-api-key",
|
|
35
|
+
)
|
|
36
|
+
```
|
theforge-0.1.0/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# TheForge Python SDK
|
|
2
|
+
|
|
3
|
+
TheForge Python SDK provides tracing, observability, and local evaluation helpers for AI agents.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install theforge
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from theforge import observe
|
|
15
|
+
|
|
16
|
+
observe(
|
|
17
|
+
platform_url="https://your-forge-host",
|
|
18
|
+
api_key="your-api-key",
|
|
19
|
+
)
|
|
20
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "theforge"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "TheForge SDK — Observability for AI agents"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
dependencies = []
|
|
13
|
+
|
|
14
|
+
[project.optional-dependencies]
|
|
15
|
+
httpx = ["httpx>=0.24"]
|
|
16
|
+
requests = ["requests>=2.28"]
|
|
17
|
+
fastapi = ["fastapi>=0.100"]
|
|
18
|
+
flask = ["flask>=2.3"]
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.packages.find]
|
|
21
|
+
include = ["theforge*"]
|
theforge-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""TheForge SDK — Observability for AI agents.
|
|
2
|
+
|
|
3
|
+
MLflow-style tracing with automatic LLM call capture, parent-child span nesting,
|
|
4
|
+
and multi-framework support (Flask, FastAPI, Django, Starlette).
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
from theforge import trace, SpanType, observe
|
|
8
|
+
|
|
9
|
+
# Decorator — works at module level before observe() is called
|
|
10
|
+
@trace(span_type=SpanType.TOOL)
|
|
11
|
+
async def web_search(query: str) -> str:
|
|
12
|
+
...
|
|
13
|
+
|
|
14
|
+
# Start observability (call once at app startup)
|
|
15
|
+
observe(
|
|
16
|
+
name="My Agent",
|
|
17
|
+
app=app, # Flask/FastAPI/Starlette app
|
|
18
|
+
platform_url="http://localhost:8080",
|
|
19
|
+
api_key="your-api-key",
|
|
20
|
+
)
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from theforge._core import (
|
|
24
|
+
configure,
|
|
25
|
+
trace,
|
|
26
|
+
SpanType,
|
|
27
|
+
observe,
|
|
28
|
+
start_span,
|
|
29
|
+
with_span,
|
|
30
|
+
get_active_span,
|
|
31
|
+
get_prompt,
|
|
32
|
+
get_prompt_sync,
|
|
33
|
+
)
|
|
34
|
+
from theforge.eval import (
|
|
35
|
+
EvalDataset,
|
|
36
|
+
EvalAPIClient,
|
|
37
|
+
normalize_dataset,
|
|
38
|
+
run_eval_dataset,
|
|
39
|
+
call_agent_http,
|
|
40
|
+
score_exact_match,
|
|
41
|
+
score_contains,
|
|
42
|
+
score_precision_recall_f1,
|
|
43
|
+
score_json_structural_match,
|
|
44
|
+
score_cosine_similarity,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
__all__ = [
|
|
48
|
+
"configure",
|
|
49
|
+
"trace",
|
|
50
|
+
"SpanType",
|
|
51
|
+
"observe",
|
|
52
|
+
"start_span",
|
|
53
|
+
"with_span",
|
|
54
|
+
"get_active_span",
|
|
55
|
+
"get_prompt",
|
|
56
|
+
"get_prompt_sync",
|
|
57
|
+
"EvalDataset",
|
|
58
|
+
"EvalAPIClient",
|
|
59
|
+
"normalize_dataset",
|
|
60
|
+
"run_eval_dataset",
|
|
61
|
+
"call_agent_http",
|
|
62
|
+
"score_exact_match",
|
|
63
|
+
"score_contains",
|
|
64
|
+
"score_precision_recall_f1",
|
|
65
|
+
"score_json_structural_match",
|
|
66
|
+
"score_cosine_similarity",
|
|
67
|
+
]
|