langfuse-agent 2.3.3__tar.gz → 2.3.5__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.
- {langfuse_agent-2.3.3/langfuse_agent.egg-info → langfuse_agent-2.3.5}/PKG-INFO +3 -9
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/README.md +0 -2
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/__init__.py +15 -0
- langfuse_agent-2.3.5/langfuse_agent/__main__.py +4 -0
- langfuse_agent-2.3.5/langfuse_agent/connector_sources.py +180 -0
- langfuse_agent-2.3.5/langfuse_agent/mcp_server.py +37 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/ontology/certification.json +6 -9
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/ontology/langfuse.ttl +11 -17
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/ontology/mappings/source.yaml +1 -1
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/prompts/observability_specialist.json +0 -2
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5/langfuse_agent.egg-info}/PKG-INFO +3 -9
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent.egg-info/SOURCES.txt +1 -8
- langfuse_agent-2.3.5/langfuse_agent.egg-info/entry_points.txt +8 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent.egg-info/requires.txt +1 -7
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/pyproject.toml +16 -16
- langfuse_agent-2.3.5/requirements.txt +3 -0
- langfuse_agent-2.3.5/tests/test_api_parity_gate.py +49 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_fleet_name.py +3 -14
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_kg_ingest.py +3 -7
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_mcp_brute_force.py +0 -72
- langfuse_agent-2.3.5/tests/test_release_version.py +23 -0
- langfuse_agent-2.3.3/langfuse_agent/__main__.py +0 -6
- langfuse_agent-2.3.3/langfuse_agent/connectors/__init__.py +0 -0
- langfuse_agent-2.3.3/langfuse_agent/connectors/mcp_source_presets.json +0 -44
- langfuse_agent-2.3.3/langfuse_agent/connectors/tool_schema_fingerprints.json +0 -9
- langfuse_agent-2.3.3/langfuse_agent/mcp_server.py +0 -103
- langfuse_agent-2.3.3/langfuse_agent/prompts/__init__.py +0 -0
- langfuse_agent-2.3.3/langfuse_agent/skills/__init__.py +0 -0
- langfuse_agent-2.3.3/langfuse_agent.egg-info/entry_points.txt +0 -17
- langfuse_agent-2.3.3/requirements.txt +0 -3
- langfuse_agent-2.3.3/tests/test_api_parity_gate.py +0 -58
- langfuse_agent-2.3.3/tests/test_connector_presets.py +0 -53
- langfuse_agent-2.3.3/tests/test_default_content_surfaces.py +0 -43
- langfuse_agent-2.3.3/tests/test_mcp_server.py +0 -51
- langfuse_agent-2.3.3/tests/test_release_version.py +0 -38
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/LICENSE +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/MANIFEST.in +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/build_backend.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/api/__init__.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/api/api_client_annotation_queues.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/api/api_client_base.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/api/api_client_datasets.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/api/api_client_management.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/api/api_client_observability.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/api/api_client_prompts_models.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/api_client.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/auth.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/dependency-license-catalog.json +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/kg_ingest.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/langfuse_models.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/main_agent.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/mcp/__init__.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/mcp_config.json +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/ontology/__init__.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/ontology/fixtures/records.json +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/ontology/migrations/manifest.json +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/ontology/shapes/connector.shacl.ttl +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/runtime_posture.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-agent-operations/SKILL.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-agent-operations/agents/openai.yaml +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-agent-operations/references/catalog.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-eval-datasets/SKILL.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-eval-datasets/WORKFLOW.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-prompt-management/SKILL.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-prompt-management/WORKFLOW.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-trace-analytics/SKILL.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/skills/langfuse-trace-analytics/WORKFLOW.md +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/tools/__init__.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/tools/datasets.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/tools/kg.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/tools/management.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/tools/observability.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/tools/prompts.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/trace_projection.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent.egg-info/dependency_links.txt +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent.egg-info/top_level.txt +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/setup.cfg +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_auth.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_documentation_privacy.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_init.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_init_dynamics.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_kg_tool.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_langfuse_api.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_langfuse_models.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_placeholder.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_tools_dispatch_characterization.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_trace_projection.py +0 -0
- {langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/tests/test_wheel_privacy.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langfuse-agent
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.5
|
|
4
4
|
Summary: Agent for interacting with Langfuse Observability API
|
|
5
|
-
Author:
|
|
5
|
+
Author: Repository Maintainers
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Classifier: Development Status :: 4 - Beta
|
|
8
8
|
Classifier: Environment :: Console
|
|
@@ -11,13 +11,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Requires-Python: >=3.12
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: agent-connector-sdk[mcp]<
|
|
14
|
+
Requires-Dist: agent-connector-sdk[mcp]<0.6.0,>=0.5.4
|
|
15
15
|
Requires-Dist: langfuse<5,>=4
|
|
16
16
|
Requires-Dist: requests>=2.34.2
|
|
17
|
-
Provides-Extra: mcp
|
|
18
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.18; extra == "mcp"
|
|
19
|
-
Provides-Extra: all
|
|
20
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.18; extra == "all"
|
|
21
17
|
Provides-Extra: test
|
|
22
18
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
23
19
|
Requires-Dist: pytest>=9.1.1; extra == "test"
|
|
@@ -50,8 +46,6 @@ Dynamic: license-file
|
|
|
50
46
|

|
|
51
47
|

|
|
52
48
|
|
|
53
|
-
*Version: 2.3.3*
|
|
54
|
-
|
|
55
49
|
> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
|
|
56
50
|
> interfaces, and guidance for provisioning the Langfuse platform are maintained in
|
|
57
51
|
> the [official documentation](https://knuckles-team.github.io/langfuse-agent/).
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|

|
|
21
21
|

|
|
22
22
|
|
|
23
|
-
*Version: 2.3.3*
|
|
24
|
-
|
|
25
23
|
> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
|
|
26
24
|
> interfaces, and guidance for provisioning the Langfuse platform are maintained in
|
|
27
25
|
> the [official documentation](https://knuckles-team.github.io/langfuse-agent/).
|
|
@@ -91,3 +91,18 @@ def __getattr__(name: str) -> Any:
|
|
|
91
91
|
|
|
92
92
|
def __dir__() -> list[str]:
|
|
93
93
|
return sorted(list(globals().keys()) + __all__)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
from agent_connector_sdk.connector import Connector
|
|
97
|
+
|
|
98
|
+
from langfuse_agent.api_client import LangfuseApi
|
|
99
|
+
from langfuse_agent.auth import get_client
|
|
100
|
+
|
|
101
|
+
connector = Connector(
|
|
102
|
+
api=LangfuseApi,
|
|
103
|
+
get_client=get_client,
|
|
104
|
+
tools="langfuse_agent.mcp_server",
|
|
105
|
+
instructions="langfuse-agent MCP Server — Condensed Action-Routed Tools.",
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
__all__ = ["connector"]
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"""Data sources of this connector, declared by tool name (generated by connector-ontology-map migrate).
|
|
2
|
+
|
|
3
|
+
Served live as ``connector://resources``. Regenerate by editing the declarations, not the tools.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from agent_connector_sdk.ingest.live_declaration import source_meta
|
|
12
|
+
|
|
13
|
+
SOURCES: tuple[Any, ...] = (
|
|
14
|
+
source_meta(
|
|
15
|
+
tool="langfuse_sessions_list",
|
|
16
|
+
source_id="langfuse-sessions",
|
|
17
|
+
record_type="Session",
|
|
18
|
+
id_field="id",
|
|
19
|
+
cursor_field="createdAt",
|
|
20
|
+
page_param="page",
|
|
21
|
+
page_size_param="limit",
|
|
22
|
+
pagination="page",
|
|
23
|
+
preset={
|
|
24
|
+
"doc_type": "session",
|
|
25
|
+
"metadata_fields": [
|
|
26
|
+
"createdAt",
|
|
27
|
+
"environment",
|
|
28
|
+
],
|
|
29
|
+
"page_kind": "number",
|
|
30
|
+
"params_style": "args",
|
|
31
|
+
},
|
|
32
|
+
records_path="data",
|
|
33
|
+
server="langfuse-mcp",
|
|
34
|
+
text_field="id",
|
|
35
|
+
title_field="id",
|
|
36
|
+
),
|
|
37
|
+
source_meta(
|
|
38
|
+
tool="langfuse_trace_list",
|
|
39
|
+
source_id="langfuse-traces",
|
|
40
|
+
record_type="Trace",
|
|
41
|
+
id_field="id",
|
|
42
|
+
cursor_field="timestamp",
|
|
43
|
+
page_param="page",
|
|
44
|
+
page_size_param="limit",
|
|
45
|
+
pagination="page",
|
|
46
|
+
preset={
|
|
47
|
+
"doc_type": "trace",
|
|
48
|
+
"metadata_fields": [
|
|
49
|
+
"timestamp",
|
|
50
|
+
"release",
|
|
51
|
+
"version",
|
|
52
|
+
"environment",
|
|
53
|
+
"tags",
|
|
54
|
+
],
|
|
55
|
+
"page_kind": "number",
|
|
56
|
+
"params_style": "args",
|
|
57
|
+
},
|
|
58
|
+
records_path="data",
|
|
59
|
+
server="langfuse-mcp",
|
|
60
|
+
text_field="name",
|
|
61
|
+
title_field="name",
|
|
62
|
+
),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
SCHEMA_VERSION = 2
|
|
66
|
+
|
|
67
|
+
FIELD_SETS: dict[str, dict[str, str]] = {
|
|
68
|
+
"fields_1": {
|
|
69
|
+
"dataType": "xsd:string",
|
|
70
|
+
"endTime": "xsd:dateTime",
|
|
71
|
+
"environment": "xsd:string",
|
|
72
|
+
"latency": "xsd:decimal",
|
|
73
|
+
"level": "xsd:string",
|
|
74
|
+
"modelName": "xsd:string",
|
|
75
|
+
"observationType": "xsd:string",
|
|
76
|
+
"promptVersion": "xsd:integer",
|
|
77
|
+
"release": "xsd:string",
|
|
78
|
+
"scoreValue": "xsd:string",
|
|
79
|
+
"startTime": "xsd:dateTime",
|
|
80
|
+
"timestamp": "xsd:dateTime",
|
|
81
|
+
"totalCost": "xsd:decimal",
|
|
82
|
+
"totalTokens": "xsd:integer",
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
SCHEMA_MAPPINGS: dict[str, Any] = {
|
|
87
|
+
"Dataset": {
|
|
88
|
+
"field_sets": ["fields_1"],
|
|
89
|
+
"ontology_class": "Dataset",
|
|
90
|
+
},
|
|
91
|
+
"DatasetRun": {
|
|
92
|
+
"field_sets": ["fields_1"],
|
|
93
|
+
"ontology_class": "Dataset",
|
|
94
|
+
},
|
|
95
|
+
"Generation": {
|
|
96
|
+
"field_sets": ["fields_1"],
|
|
97
|
+
"ontology_class": "Observation",
|
|
98
|
+
},
|
|
99
|
+
"Model": {
|
|
100
|
+
"field_sets": ["fields_1"],
|
|
101
|
+
"ontology_class": None,
|
|
102
|
+
},
|
|
103
|
+
"Observation": {
|
|
104
|
+
"field_sets": ["fields_1"],
|
|
105
|
+
"ontology_class": None,
|
|
106
|
+
},
|
|
107
|
+
"Prompt": {
|
|
108
|
+
"field_sets": ["fields_1"],
|
|
109
|
+
"ontology_class": None,
|
|
110
|
+
},
|
|
111
|
+
"Score": {
|
|
112
|
+
"field_sets": ["fields_1"],
|
|
113
|
+
"ontology_class": None,
|
|
114
|
+
},
|
|
115
|
+
"ScoreConfig": {
|
|
116
|
+
"field_sets": ["fields_1"],
|
|
117
|
+
"ontology_class": None,
|
|
118
|
+
},
|
|
119
|
+
"Session": {
|
|
120
|
+
"field_sets": ["fields_1"],
|
|
121
|
+
"ontology_class": None,
|
|
122
|
+
},
|
|
123
|
+
"Trace": {
|
|
124
|
+
"field_sets": ["fields_1"],
|
|
125
|
+
"ontology_class": None,
|
|
126
|
+
},
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
RESOURCES: tuple[dict[str, str], ...] = (
|
|
130
|
+
{
|
|
131
|
+
"id_prefix": "dataset",
|
|
132
|
+
"label": "Dataset",
|
|
133
|
+
"name": "Dataset",
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id_prefix": "datasetrun",
|
|
137
|
+
"label": "Dataset Run",
|
|
138
|
+
"name": "DatasetRun",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id_prefix": "generation",
|
|
142
|
+
"label": "Generation",
|
|
143
|
+
"name": "Generation",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id_prefix": "model",
|
|
147
|
+
"label": "Model",
|
|
148
|
+
"name": "Model",
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id_prefix": "observation",
|
|
152
|
+
"label": "Observation",
|
|
153
|
+
"name": "Observation",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id_prefix": "prompt",
|
|
157
|
+
"label": "Prompt",
|
|
158
|
+
"name": "Prompt",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id_prefix": "score",
|
|
162
|
+
"label": "Score",
|
|
163
|
+
"name": "Score",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id_prefix": "scoreconfig",
|
|
167
|
+
"label": "Score Config",
|
|
168
|
+
"name": "ScoreConfig",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id_prefix": "session",
|
|
172
|
+
"label": "Session",
|
|
173
|
+
"name": "Session",
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id_prefix": "trace",
|
|
177
|
+
"label": "Trace",
|
|
178
|
+
"name": "Trace",
|
|
179
|
+
},
|
|
180
|
+
)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
"""Langfuse MCP Server.
|
|
3
|
+
|
|
4
|
+
_1.0 — Langfuse MCP Integration
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import warnings
|
|
8
|
+
|
|
9
|
+
# Filter RequestsDependencyWarning early to prevent log spam
|
|
10
|
+
with warnings.catch_warnings():
|
|
11
|
+
warnings.simplefilter("ignore")
|
|
12
|
+
try:
|
|
13
|
+
from requests.exceptions import RequestsDependencyWarning
|
|
14
|
+
|
|
15
|
+
warnings.filterwarnings("ignore", category=RequestsDependencyWarning)
|
|
16
|
+
except ImportError:
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
|
|
20
|
+
warnings.filterwarnings("ignore", message=".*urllib3.*or charset_normalizer.*")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
from langfuse_agent.tools.datasets import register_langfuse_datasets_tools
|
|
24
|
+
from langfuse_agent.tools.kg import register_langfuse_kg_tools
|
|
25
|
+
from langfuse_agent.tools.management import register_langfuse_management_tools
|
|
26
|
+
from langfuse_agent.tools.observability import register_langfuse_observability_tools
|
|
27
|
+
from langfuse_agent.tools.prompts import register_langfuse_prompts_models_tools
|
|
28
|
+
|
|
29
|
+
# Re-exported so register_tool_surface(tools_module=...) auto-discovers them as
|
|
30
|
+
# module attributes (and ruff treats the imports as used).
|
|
31
|
+
__all__ = [
|
|
32
|
+
"register_langfuse_datasets_tools",
|
|
33
|
+
"register_langfuse_kg_tools",
|
|
34
|
+
"register_langfuse_management_tools",
|
|
35
|
+
"register_langfuse_observability_tools",
|
|
36
|
+
"register_langfuse_prompts_models_tools",
|
|
37
|
+
]
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"api_version": "
|
|
2
|
+
"api_version": "graphos.io/v1",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"connector_manifest.yml": "c6ed5e467bb954bf5b979bc6d22c4461db43b5059e7aced966a079fb0147f270",
|
|
5
|
-
"langfuse_agent/connectors/mcp_source_presets.json": "475f1d9c5427e982c44397c52d5daf6195189fc7c1e61b59ff3c3fbe7cbfc222",
|
|
6
|
-
"langfuse_agent/connectors/tool_schema_fingerprints.json": "7035f790a5b3f47428c7a019e27606ac760bd37adc814f4d2e9275395218554e",
|
|
7
4
|
"langfuse_agent/ontology/fixtures/records.json": "45426db59590ddb6e6f72b2296ceefd87236209488199ca4ab36f700f5e08df2",
|
|
8
|
-
"langfuse_agent/ontology/langfuse.ttl": "
|
|
9
|
-
"langfuse_agent/ontology/mappings/source.yaml": "
|
|
5
|
+
"langfuse_agent/ontology/langfuse.ttl": "ccf067bee1e910b709617779e3e99313f30e3573b9c2a6f5df5e760565f6727e",
|
|
6
|
+
"langfuse_agent/ontology/mappings/source.yaml": "d9345cdf9d901dc3163519aff275d8fcb04168bd860b118f98ccdfc30d4877b6",
|
|
10
7
|
"langfuse_agent/ontology/migrations/manifest.json": "abb14bd6b4428d8365cc71c06dd61cb9ece43f0153d2a59b9b2285328bcf66b5",
|
|
11
8
|
"langfuse_agent/ontology/shapes/connector.shacl.ttl": "ca61d94426ce3e3e7d773f1dcb7f3086b0f9e5694f444721df1798e147a9ba01"
|
|
12
9
|
},
|
|
@@ -18,11 +15,11 @@
|
|
|
18
15
|
"synthetic_fixture_contract": "passed"
|
|
19
16
|
},
|
|
20
17
|
"compatibility": {
|
|
21
|
-
"
|
|
18
|
+
"agent_utilities": ">=2.5.0,<3",
|
|
22
19
|
"bundle_schema": "2",
|
|
23
20
|
"epistemic_graph": ">=2.27.0,<3"
|
|
24
21
|
},
|
|
25
|
-
"connector": "langfuse-
|
|
22
|
+
"connector": "langfuse-agent",
|
|
26
23
|
"kind": "ConnectorSourceAttestation",
|
|
27
24
|
"live_certified": false,
|
|
28
25
|
"mode": "offline-source",
|
|
@@ -32,5 +29,5 @@
|
|
|
32
29
|
"signer": "UNSIGNED-PREVIEW",
|
|
33
30
|
"signing_public_key": "",
|
|
34
31
|
"status": "source-validated",
|
|
35
|
-
"validated_at": "2026-
|
|
32
|
+
"validated_at": "2026-10-24T13:49:07Z"
|
|
36
33
|
}
|
|
@@ -19,18 +19,16 @@
|
|
|
19
19
|
rdfs:label "Trace" ;
|
|
20
20
|
rdfs:comment "A single top-level execution captured by Langfuse — the root of a tree of observations, attributed to a user and grouped into a session (langfuse_observability trace_list/trace_get)." .
|
|
21
21
|
|
|
22
|
-
:Observation a owl:Class
|
|
23
|
-
|
|
24
|
-
rdfs:comment "A node inside a trace's execution tree — a SPAN, EVENT or GENERATION with a start/end time, level and status (langfuse_observability observations_get_many)." .
|
|
22
|
+
:Observation a owl:Class .
|
|
23
|
+
|
|
25
24
|
|
|
26
25
|
:Generation a owl:Class ;
|
|
27
26
|
rdfs:subClassOf :Observation ;
|
|
28
27
|
rdfs:label "Generation" ;
|
|
29
28
|
rdfs:comment "An LLM generation observation (type=GENERATION): a model call carrying model name, model parameters, token usage and cost." .
|
|
30
29
|
|
|
31
|
-
:Session a owl:Class
|
|
32
|
-
|
|
33
|
-
rdfs:comment "A grouping of related traces representing one conversation or user session (langfuse_observability sessions_list/sessions_get)." .
|
|
30
|
+
:Session a owl:Class .
|
|
31
|
+
|
|
34
32
|
|
|
35
33
|
:Score a owl:Class ;
|
|
36
34
|
rdfs:label "Score" ;
|
|
@@ -40,21 +38,18 @@
|
|
|
40
38
|
rdfs:label "Score Config" ;
|
|
41
39
|
rdfs:comment "The schema/definition of a score: its name, data type and allowed range or categories (langfuse_observability score_configs_get)." .
|
|
42
40
|
|
|
43
|
-
:Dataset a owl:Class
|
|
44
|
-
|
|
45
|
-
rdfs:comment "A named collection of dataset items used as an evaluation/test set (langfuse_datasets datasets_list/datasets_get)." .
|
|
41
|
+
:Dataset a owl:Class .
|
|
42
|
+
|
|
46
43
|
|
|
47
44
|
:DatasetRun a owl:Class ;
|
|
48
45
|
rdfs:label "Dataset Run" ;
|
|
49
46
|
rdfs:comment "One execution of a dataset against a system under test, aggregating run items and their scores (langfuse_datasets datasets_get_runs)." .
|
|
50
47
|
|
|
51
|
-
:Prompt a owl:Class
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
:Prompt a owl:Class .
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
:Model a owl:Class .
|
|
54
52
|
|
|
55
|
-
:Model a owl:Class ;
|
|
56
|
-
rdfs:label "Model" ;
|
|
57
|
-
rdfs:comment "A model definition with a match pattern and unit/pricing used to compute generation cost (langfuse_prompts_models models_list/models_get)." .
|
|
58
53
|
|
|
59
54
|
# --- links (owl:ObjectProperty) ---
|
|
60
55
|
|
|
@@ -188,5 +183,4 @@
|
|
|
188
183
|
sessions, scores and score configs, datasets and dataset runs, prompts and models,
|
|
189
184
|
with their tree, attribution, evaluation and cost relationships — federated into the
|
|
190
185
|
agent-connector-sdk knowledge-graph hub. Reuses the shared :Person class for the end-user
|
|
191
|
-
a trace is attributed to."""
|
|
192
|
-
owl:imports <http://knuckles.team/kg> .
|
|
186
|
+
a trace is attributed to.""" .
|
{langfuse_agent-2.3.3 → langfuse_agent-2.3.5}/langfuse_agent/prompts/observability_specialist.json
RENAMED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
"schema_version": "1.0",
|
|
5
5
|
"prompt_version": "0.1.0",
|
|
6
6
|
"source": "langfuse-agent",
|
|
7
|
-
"extends": "agent-connector-sdk:base",
|
|
8
|
-
"compose": "append",
|
|
9
7
|
"description": "Langfuse LLM-observability specialist: trace analytics, evaluation datasets/scores, and the prompt registry over the langfuse-agent MCP server.",
|
|
10
8
|
"metadata": {
|
|
11
9
|
"topic": "Langfuse LLM Observability",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langfuse-agent
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.5
|
|
4
4
|
Summary: Agent for interacting with Langfuse Observability API
|
|
5
|
-
Author:
|
|
5
|
+
Author: Repository Maintainers
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Classifier: Development Status :: 4 - Beta
|
|
8
8
|
Classifier: Environment :: Console
|
|
@@ -11,13 +11,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Requires-Python: >=3.12
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: agent-connector-sdk[mcp]<
|
|
14
|
+
Requires-Dist: agent-connector-sdk[mcp]<0.6.0,>=0.5.4
|
|
15
15
|
Requires-Dist: langfuse<5,>=4
|
|
16
16
|
Requires-Dist: requests>=2.34.2
|
|
17
|
-
Provides-Extra: mcp
|
|
18
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.18; extra == "mcp"
|
|
19
|
-
Provides-Extra: all
|
|
20
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.18; extra == "all"
|
|
21
17
|
Provides-Extra: test
|
|
22
18
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
23
19
|
Requires-Dist: pytest>=9.1.1; extra == "test"
|
|
@@ -50,8 +46,6 @@ Dynamic: license-file
|
|
|
50
46
|

|
|
51
47
|

|
|
52
48
|
|
|
53
|
-
*Version: 2.3.3*
|
|
54
|
-
|
|
55
49
|
> **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
|
|
56
50
|
> interfaces, and guidance for provisioning the Langfuse platform are maintained in
|
|
57
51
|
> the [official documentation](https://knuckles-team.github.io/langfuse-agent/).
|
|
@@ -8,6 +8,7 @@ langfuse_agent/__init__.py
|
|
|
8
8
|
langfuse_agent/__main__.py
|
|
9
9
|
langfuse_agent/api_client.py
|
|
10
10
|
langfuse_agent/auth.py
|
|
11
|
+
langfuse_agent/connector_sources.py
|
|
11
12
|
langfuse_agent/dependency-license-catalog.json
|
|
12
13
|
langfuse_agent/kg_ingest.py
|
|
13
14
|
langfuse_agent/langfuse_models.py
|
|
@@ -29,9 +30,6 @@ langfuse_agent/api/api_client_datasets.py
|
|
|
29
30
|
langfuse_agent/api/api_client_management.py
|
|
30
31
|
langfuse_agent/api/api_client_observability.py
|
|
31
32
|
langfuse_agent/api/api_client_prompts_models.py
|
|
32
|
-
langfuse_agent/connectors/__init__.py
|
|
33
|
-
langfuse_agent/connectors/mcp_source_presets.json
|
|
34
|
-
langfuse_agent/connectors/tool_schema_fingerprints.json
|
|
35
33
|
langfuse_agent/mcp/__init__.py
|
|
36
34
|
langfuse_agent/ontology/__init__.py
|
|
37
35
|
langfuse_agent/ontology/certification.json
|
|
@@ -40,9 +38,7 @@ langfuse_agent/ontology/fixtures/records.json
|
|
|
40
38
|
langfuse_agent/ontology/mappings/source.yaml
|
|
41
39
|
langfuse_agent/ontology/migrations/manifest.json
|
|
42
40
|
langfuse_agent/ontology/shapes/connector.shacl.ttl
|
|
43
|
-
langfuse_agent/prompts/__init__.py
|
|
44
41
|
langfuse_agent/prompts/observability_specialist.json
|
|
45
|
-
langfuse_agent/skills/__init__.py
|
|
46
42
|
langfuse_agent/skills/langfuse-agent-operations/SKILL.md
|
|
47
43
|
langfuse_agent/skills/langfuse-agent-operations/agents/openai.yaml
|
|
48
44
|
langfuse_agent/skills/langfuse-agent-operations/references/catalog.md
|
|
@@ -60,8 +56,6 @@ langfuse_agent/tools/observability.py
|
|
|
60
56
|
langfuse_agent/tools/prompts.py
|
|
61
57
|
tests/test_api_parity_gate.py
|
|
62
58
|
tests/test_auth.py
|
|
63
|
-
tests/test_connector_presets.py
|
|
64
|
-
tests/test_default_content_surfaces.py
|
|
65
59
|
tests/test_documentation_privacy.py
|
|
66
60
|
tests/test_fleet_name.py
|
|
67
61
|
tests/test_init.py
|
|
@@ -71,7 +65,6 @@ tests/test_kg_tool.py
|
|
|
71
65
|
tests/test_langfuse_api.py
|
|
72
66
|
tests/test_langfuse_models.py
|
|
73
67
|
tests/test_mcp_brute_force.py
|
|
74
|
-
tests/test_mcp_server.py
|
|
75
68
|
tests/test_placeholder.py
|
|
76
69
|
tests/test_release_version.py
|
|
77
70
|
tests/test_tools_dispatch_characterization.py
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
agent-connector-sdk[mcp]<
|
|
1
|
+
agent-connector-sdk[mcp]<0.6.0,>=0.5.4
|
|
2
2
|
langfuse<5,>=4
|
|
3
3
|
requests>=2.34.2
|
|
4
4
|
|
|
5
|
-
[all]
|
|
6
|
-
agent-connector-sdk[mcp]<1.0.0,>=0.3.18
|
|
7
|
-
|
|
8
5
|
[docs]
|
|
9
6
|
mkdocs>=1.6.1
|
|
10
7
|
mkdocs-material>=9.7.7
|
|
11
8
|
|
|
12
|
-
[mcp]
|
|
13
|
-
agent-connector-sdk[mcp]<1.0.0,>=0.3.18
|
|
14
|
-
|
|
15
9
|
[test]
|
|
16
10
|
pytest-xdist>=3.8.0
|
|
17
11
|
pytest>=9.1.1
|
|
@@ -5,19 +5,17 @@ backend-path = ["."]
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "langfuse-agent"
|
|
8
|
-
version = "2.3.
|
|
8
|
+
version = "2.3.5"
|
|
9
9
|
description = "Agent for interacting with Langfuse Observability API"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
classifiers = [ "Development Status :: 4 - Beta", "Environment :: Console", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3",]
|
|
12
12
|
requires-python = ">=3.12"
|
|
13
|
-
dependencies = [ "agent-connector-sdk[mcp]>=0.
|
|
13
|
+
dependencies = [ "agent-connector-sdk[mcp]>=0.5.4,<0.6.0", "langfuse>=4,<5", "requests>=2.34.2",]
|
|
14
14
|
license = "MIT"
|
|
15
15
|
[[project.authors]]
|
|
16
|
-
name = "
|
|
16
|
+
name = "Repository Maintainers"
|
|
17
17
|
|
|
18
18
|
[project.optional-dependencies]
|
|
19
|
-
mcp = [ "agent-connector-sdk[mcp]>=0.3.18,<1.0.0",]
|
|
20
|
-
all = [ "agent-connector-sdk[mcp]>=0.3.18,<1.0.0",]
|
|
21
19
|
test = [
|
|
22
20
|
"pytest-xdist>=3.8.0", "pytest>=9.1.1", "pytest-asyncio>=1.4.0", "pytest-cov>=7.1.0",]
|
|
23
21
|
docs = [
|
|
@@ -26,23 +24,14 @@ docs = [
|
|
|
26
24
|
]
|
|
27
25
|
|
|
28
26
|
[project.scripts]
|
|
29
|
-
langfuse-mcp = "
|
|
30
|
-
|
|
31
|
-
[project.entry-points."agent_connector_sdk.skill_providers"]
|
|
32
|
-
langfuse-agent = "langfuse_agent.skills"
|
|
33
|
-
|
|
34
|
-
[project.entry-points."agent_connector_sdk.ontology_providers"]
|
|
35
|
-
langfuse-agent = "langfuse_agent.ontology"
|
|
36
|
-
|
|
37
|
-
[project.entry-points."agent_connector_sdk.source_connector_providers"]
|
|
38
|
-
langfuse-agent = "langfuse_agent.connectors"
|
|
27
|
+
langfuse-mcp = "agent_connector_sdk.cli:serve"
|
|
39
28
|
|
|
40
29
|
[project.entry-points."agent_connector_sdk.prompt_providers"]
|
|
41
30
|
langfuse-agent = "langfuse_agent.prompts"
|
|
42
31
|
|
|
43
32
|
# The one declared connector identity: the fleet name (SDK-CONNECTOR-CONTROL-R071).
|
|
44
33
|
[project.entry-points."agent_connector_sdk.connector"]
|
|
45
|
-
langfuse-mcp = "langfuse_agent"
|
|
34
|
+
langfuse-mcp = "langfuse_agent:connector"
|
|
46
35
|
|
|
47
36
|
[tool.uv.workspace]
|
|
48
37
|
members = ["."]
|
|
@@ -51,6 +40,7 @@ members = ["."]
|
|
|
51
40
|
include-package-data = true
|
|
52
41
|
|
|
53
42
|
[tool.ruff]
|
|
43
|
+
extend-exclude = ["tests", "scripts"]
|
|
54
44
|
line-length = 88
|
|
55
45
|
target-version = "py312"
|
|
56
46
|
|
|
@@ -89,3 +79,13 @@ override-dependencies = [
|
|
|
89
79
|
|
|
90
80
|
[tool.pipelines_hooks.ste]
|
|
91
81
|
exempt = ["specs/*", "specs/**/*"]
|
|
82
|
+
|
|
83
|
+
[tool.pipelines.container]
|
|
84
|
+
port = 8004
|
|
85
|
+
debug_apt = ["default-jre", "ripgrep", "tree", "fd-find", "curl", "nano", "build-essential", "cmake", "libssl-dev", "libcurl4-openssl-dev", "pkg-config", "cargo", "rustc"]
|
|
86
|
+
limits = {"mcp" = {"memory_limit_env" = "AGENT_CONTAINER_MEMORY_LIMIT", "memory_limit" = "4g", "cpu_limit_env" = "AGENT_CONTAINER_CPU_LIMIT", "cpu_limit" = "2.0"}}
|
|
87
|
+
compose_env = ["LANGFUSE_HOST", "LANGFUSE_PUBLIC_KEY", "LANGFUSE_SECRET_KEY", "REQUESTS_CA_BUNDLE", "SSL_CERT_FILE"]
|
|
88
|
+
|
|
89
|
+
[tool.pipelines.security]
|
|
90
|
+
license_allowed = ["CDLA-Permissive-2.0", "LGPL-3.0-only", "LGPL-3.0-or-later", "MIT-CMU", "PSF-2.0", "W3C-20150513", "zlib-acknowledgement"]
|
|
91
|
+
license_denied = ["AGPL-1.0-only", "AGPL-1.0-or-later", "GPL-1.0-only", "GPL-1.0-or-later", "GPL-2.0-only", "GPL-2.0-or-later"]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""Fail-closed coverage for the Langfuse API-to-MCP surface, measured on the served tools.
|
|
2
|
+
|
|
3
|
+
The connector surface comes from the SDK declaration (``Connector(api=LangfuseApi, ...)``); these tests build the server
|
|
4
|
+
the way the console script does and compare its tools with the public methods of the API client.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import asyncio
|
|
10
|
+
import inspect
|
|
11
|
+
|
|
12
|
+
import pytest
|
|
13
|
+
from agent_connector_sdk.connector import build_server
|
|
14
|
+
from fastmcp import Client
|
|
15
|
+
|
|
16
|
+
from langfuse_agent.api_client import LangfuseApi
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _served_tool_names() -> list[str]:
|
|
20
|
+
_, mcp = build_server("langfuse_agent", command_args=["--transport", "stdio"])
|
|
21
|
+
|
|
22
|
+
async def _list() -> list[str]:
|
|
23
|
+
async with Client(mcp) as client:
|
|
24
|
+
return [tool.name for tool in await client.list_tools()]
|
|
25
|
+
|
|
26
|
+
return asyncio.run(_list())
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_current_composed_client_is_fully_bound_to_mcp() -> None:
|
|
30
|
+
names = _served_tool_names()
|
|
31
|
+
methods = [n for n, _f in inspect.getmembers(LangfuseApi, inspect.isfunction) if not n.startswith("_")]
|
|
32
|
+
|
|
33
|
+
assert methods
|
|
34
|
+
unbound = [m for m in methods if not any(name.endswith(m) for name in names)]
|
|
35
|
+
assert not unbound, f"API methods with no served tool: {unbound}"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def test_the_served_surface_is_built_instead_of_skipped() -> None:
|
|
39
|
+
names = _served_tool_names()
|
|
40
|
+
|
|
41
|
+
assert len(names) > 0
|
|
42
|
+
assert all(name.startswith("langfuse_") for name in names)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def test_building_a_server_fails_closed_without_a_surface() -> None:
|
|
46
|
+
with pytest.raises(Exception) as raised: # noqa: PT011 - any failure to build counts, none may serve an empty surface
|
|
47
|
+
build_server("no_such_connector_package", command_args=["--transport", "stdio"])
|
|
48
|
+
|
|
49
|
+
assert raised.value is not None
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from agent_connector_sdk.connector_identity import connector_name
|
|
5
6
|
import ast
|
|
6
|
-
import json
|
|
7
|
-
import re
|
|
8
7
|
import tomllib
|
|
9
8
|
from pathlib import Path
|
|
10
9
|
|
|
@@ -36,18 +35,8 @@ def _call_connectors(path: Path) -> list[str]:
|
|
|
36
35
|
def test_connector_name_is_the_fleet_name() -> None:
|
|
37
36
|
pyproject = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))
|
|
38
37
|
assert pyproject["project"]["entry-points"]["agent_connector_sdk.connector"] == {
|
|
39
|
-
FLEET: "langfuse_agent"
|
|
38
|
+
FLEET: "langfuse_agent:connector"
|
|
40
39
|
}
|
|
41
|
-
|
|
42
|
-
if not manifest_path.is_file():
|
|
43
|
-
manifest_path = ROOT / "connector_manifest.yml"
|
|
44
|
-
manifest = manifest_path.read_text(encoding="utf-8")
|
|
45
|
-
match = re.search(r'^\s*"?connector"?\s*:\s*"?([^"\s,]+)', manifest, re.MULTILINE)
|
|
46
|
-
assert match is not None and match.group(1) == FLEET
|
|
47
|
-
fingerprints = PACKAGE / "connectors" / "tool_schema_fingerprints.json"
|
|
48
|
-
if fingerprints.is_file():
|
|
49
|
-
assert (
|
|
50
|
-
json.loads(fingerprints.read_text(encoding="utf-8"))["connector"] == FLEET
|
|
51
|
-
)
|
|
40
|
+
assert connector_name("langfuse_agent") == FLEET
|
|
52
41
|
for module in sorted(PACKAGE.glob("*.py")):
|
|
53
42
|
assert all(name == FLEET for name in _call_connectors(module)), module.name
|