summitsdk 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.
- summitsdk-0.1.0/LICENSE +30 -0
- summitsdk-0.1.0/MANIFEST.in +6 -0
- summitsdk-0.1.0/PKG-INFO +71 -0
- summitsdk-0.1.0/README.md +43 -0
- summitsdk-0.1.0/marlsdk/__init__.py +5 -0
- summitsdk-0.1.0/marlsdk/exporters/__init__.py +3 -0
- summitsdk-0.1.0/marlsdk/exporters/local.py +24 -0
- summitsdk-0.1.0/marlsdk/schema.py +37 -0
- summitsdk-0.1.0/marlsdk/tracer.py +36 -0
- summitsdk-0.1.0/marlsdk/wrappers/__init__.py +0 -0
- summitsdk-0.1.0/marlsdk/wrappers/anthropic_wrapper.py +55 -0
- summitsdk-0.1.0/marlsdk/wrappers/openai_wrapper.py +58 -0
- summitsdk-0.1.0/setup.cfg +4 -0
- summitsdk-0.1.0/setup.py +29 -0
- summitsdk-0.1.0/summitsdk.egg-info/PKG-INFO +71 -0
- summitsdk-0.1.0/summitsdk.egg-info/SOURCES.txt +17 -0
- summitsdk-0.1.0/summitsdk.egg-info/dependency_links.txt +1 -0
- summitsdk-0.1.0/summitsdk.egg-info/requires.txt +4 -0
- summitsdk-0.1.0/summitsdk.egg-info/top_level.txt +1 -0
summitsdk-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaz Hussain
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge,
|
|
6
|
+
to any person obtaining a copy of this software
|
|
7
|
+
and associated documentation files (the
|
|
8
|
+
"Software"), to deal in the Software without
|
|
9
|
+
restriction, including without limitation the
|
|
10
|
+
rights to use, copy, modify, merge, publish,
|
|
11
|
+
distribute, sublicense, and/or sell copies of
|
|
12
|
+
the Software, and to permit persons to whom the
|
|
13
|
+
Software is furnished to do so, subject to the
|
|
14
|
+
following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission
|
|
17
|
+
notice shall be included in all copies or
|
|
18
|
+
substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT
|
|
21
|
+
WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
22
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
23
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
24
|
+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
25
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
|
26
|
+
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
27
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
28
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
29
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
summitsdk-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: summitsdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Instrumentation layer for multi-agent AI pipelines
|
|
5
|
+
Home-page: https://cronys.xyz/summit
|
|
6
|
+
Author: Shaz Hussain
|
|
7
|
+
Author-email: shaz@cronys.xyz
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: anthropic
|
|
15
|
+
Provides-Extra: openai
|
|
16
|
+
Requires-Dist: openai; extra == "openai"
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
Dynamic: provides-extra
|
|
25
|
+
Dynamic: requires-dist
|
|
26
|
+
Dynamic: requires-python
|
|
27
|
+
Dynamic: summary
|
|
28
|
+
|
|
29
|
+
# MARL
|
|
30
|
+
|
|
31
|
+
Simulation and evaluation environment for
|
|
32
|
+
Summit by Cronys.
|
|
33
|
+
|
|
34
|
+
## Structure
|
|
35
|
+
|
|
36
|
+
sim/ Planner, Worker, Judge agents
|
|
37
|
+
eval/ Reward model evaluator
|
|
38
|
+
improve.py Single-pass improvement loop
|
|
39
|
+
cycle.py Automated multi-cycle runner
|
|
40
|
+
marlsdk/ summitsdk package source
|
|
41
|
+
data/ Traces and evaluation results
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from anthropic import Anthropic
|
|
47
|
+
from marlsdk.tracer import Tracer
|
|
48
|
+
from marlsdk.exporters.local import LocalExporter
|
|
49
|
+
|
|
50
|
+
exporter = LocalExporter(output_dir="traces/")
|
|
51
|
+
tracer = Tracer(exporter=exporter)
|
|
52
|
+
|
|
53
|
+
client = Anthropic()
|
|
54
|
+
wrapped = tracer.wrap_anthropic(
|
|
55
|
+
client,
|
|
56
|
+
from_agent="planner",
|
|
57
|
+
to_agent="worker",
|
|
58
|
+
task_id="task-001",
|
|
59
|
+
round_trip=1
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
response = wrapped.messages.create(
|
|
63
|
+
model="claude-sonnet-4-20250514",
|
|
64
|
+
max_tokens=1024,
|
|
65
|
+
messages=[{"role": "user", "content": "your prompt"}]
|
|
66
|
+
)
|
|
67
|
+
# trace written automatically to traces/
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
OpenAI: use tracer.wrap_openai(client, ...)
|
|
71
|
+
with the same arguments.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# MARL
|
|
2
|
+
|
|
3
|
+
Simulation and evaluation environment for
|
|
4
|
+
Summit by Cronys.
|
|
5
|
+
|
|
6
|
+
## Structure
|
|
7
|
+
|
|
8
|
+
sim/ Planner, Worker, Judge agents
|
|
9
|
+
eval/ Reward model evaluator
|
|
10
|
+
improve.py Single-pass improvement loop
|
|
11
|
+
cycle.py Automated multi-cycle runner
|
|
12
|
+
marlsdk/ summitsdk package source
|
|
13
|
+
data/ Traces and evaluation results
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from anthropic import Anthropic
|
|
19
|
+
from marlsdk.tracer import Tracer
|
|
20
|
+
from marlsdk.exporters.local import LocalExporter
|
|
21
|
+
|
|
22
|
+
exporter = LocalExporter(output_dir="traces/")
|
|
23
|
+
tracer = Tracer(exporter=exporter)
|
|
24
|
+
|
|
25
|
+
client = Anthropic()
|
|
26
|
+
wrapped = tracer.wrap_anthropic(
|
|
27
|
+
client,
|
|
28
|
+
from_agent="planner",
|
|
29
|
+
to_agent="worker",
|
|
30
|
+
task_id="task-001",
|
|
31
|
+
round_trip=1
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
response = wrapped.messages.create(
|
|
35
|
+
model="claude-sonnet-4-20250514",
|
|
36
|
+
max_tokens=1024,
|
|
37
|
+
messages=[{"role": "user", "content": "your prompt"}]
|
|
38
|
+
)
|
|
39
|
+
# trace written automatically to traces/
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
OpenAI: use tracer.wrap_openai(client, ...)
|
|
43
|
+
with the same arguments.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
3
|
+
from marlsdk.schema import InteractionTrace
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class LocalExporter:
|
|
7
|
+
def __init__(self, output_dir: str = "data/traces"):
|
|
8
|
+
self.output_dir = output_dir
|
|
9
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
10
|
+
|
|
11
|
+
def export(self, trace: InteractionTrace) -> str:
|
|
12
|
+
filename = (
|
|
13
|
+
f"{trace.task_id}_{trace.from_agent}_to_{trace.to_agent}"
|
|
14
|
+
f"_r{trace.round_trip}_{trace.trace_id[:6]}.json"
|
|
15
|
+
)
|
|
16
|
+
filepath = os.path.join(self.output_dir, filename)
|
|
17
|
+
with open(filepath, "w") as f:
|
|
18
|
+
json.dump(trace.to_dict(), f, indent=2)
|
|
19
|
+
return filepath
|
|
20
|
+
|
|
21
|
+
def list_traces(self) -> list:
|
|
22
|
+
if not os.path.exists(self.output_dir):
|
|
23
|
+
return []
|
|
24
|
+
return sorted(f for f in os.listdir(self.output_dir) if f.endswith(".json"))
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from datetime import datetime, timezone
|
|
3
|
+
import uuid
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@dataclass
|
|
7
|
+
class InteractionTrace:
|
|
8
|
+
task_id: str
|
|
9
|
+
from_agent: str
|
|
10
|
+
to_agent: str
|
|
11
|
+
content: str
|
|
12
|
+
model: str
|
|
13
|
+
input_tokens: int
|
|
14
|
+
output_tokens: int
|
|
15
|
+
round_trip: int
|
|
16
|
+
framework: str = "unknown"
|
|
17
|
+
trace_id: str = field(default_factory=lambda: str(uuid.uuid4()))
|
|
18
|
+
timestamp: str = field(
|
|
19
|
+
default_factory=lambda: datetime.now(timezone.utc).isoformat()
|
|
20
|
+
)
|
|
21
|
+
metadata: dict = field(default_factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> dict:
|
|
24
|
+
return {
|
|
25
|
+
"trace_id": self.trace_id,
|
|
26
|
+
"task_id": self.task_id,
|
|
27
|
+
"from_agent": self.from_agent,
|
|
28
|
+
"to_agent": self.to_agent,
|
|
29
|
+
"content": self.content,
|
|
30
|
+
"model": self.model,
|
|
31
|
+
"input_tokens": self.input_tokens,
|
|
32
|
+
"output_tokens": self.output_tokens,
|
|
33
|
+
"round_trip": self.round_trip,
|
|
34
|
+
"timestamp": self.timestamp,
|
|
35
|
+
"framework": self.framework,
|
|
36
|
+
"metadata": self.metadata,
|
|
37
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from marlsdk.schema import InteractionTrace
|
|
2
|
+
from marlsdk.exporters.local import LocalExporter
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Tracer:
|
|
6
|
+
def __init__(self, exporter=None):
|
|
7
|
+
self.exporter = exporter or LocalExporter()
|
|
8
|
+
|
|
9
|
+
def record(self, trace: InteractionTrace) -> None:
|
|
10
|
+
try:
|
|
11
|
+
self.exporter.export(trace)
|
|
12
|
+
except Exception as e:
|
|
13
|
+
import sys
|
|
14
|
+
print(
|
|
15
|
+
f"[summitsdk] Warning: export failed"
|
|
16
|
+
f" for trace {trace.trace_id}:"
|
|
17
|
+
f" {type(e).__name__}: {e}",
|
|
18
|
+
file=sys.stderr,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
def wrap_anthropic(self, client, from_agent, to_agent, task_id, round_trip):
|
|
22
|
+
from marlsdk.wrappers.anthropic_wrapper import WrappedAnthropicMessages
|
|
23
|
+
client.messages = WrappedAnthropicMessages(
|
|
24
|
+
client.messages, self, from_agent, to_agent, task_id, round_trip
|
|
25
|
+
)
|
|
26
|
+
return client
|
|
27
|
+
|
|
28
|
+
def wrap_openai(self, client, from_agent, to_agent, task_id, round_trip):
|
|
29
|
+
try:
|
|
30
|
+
from marlsdk.wrappers.openai_wrapper import WrappedOpenAICompletions
|
|
31
|
+
client.chat.completions = WrappedOpenAICompletions(
|
|
32
|
+
client.chat.completions, self, from_agent, to_agent, task_id, round_trip
|
|
33
|
+
)
|
|
34
|
+
except (ImportError, AttributeError):
|
|
35
|
+
pass
|
|
36
|
+
return client
|
|
File without changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
from marlsdk.schema import InteractionTrace
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class WrappedAnthropicMessages:
|
|
5
|
+
def __init__(self, original, tracer, from_agent, to_agent, task_id, round_trip):
|
|
6
|
+
self._original = original
|
|
7
|
+
self._tracer = tracer
|
|
8
|
+
self._from_agent = from_agent
|
|
9
|
+
self._to_agent = to_agent
|
|
10
|
+
self._task_id = task_id
|
|
11
|
+
self._round_trip = round_trip
|
|
12
|
+
|
|
13
|
+
def create(self, *args, **kwargs):
|
|
14
|
+
response = self._original.create(*args, **kwargs)
|
|
15
|
+
try:
|
|
16
|
+
content = ""
|
|
17
|
+
if response.content:
|
|
18
|
+
for block in response.content:
|
|
19
|
+
if hasattr(block, "text"):
|
|
20
|
+
content = block.text
|
|
21
|
+
break
|
|
22
|
+
input_tokens = getattr(response.usage, "input_tokens", 0) or 0
|
|
23
|
+
output_tokens = getattr(response.usage, "output_tokens", 0) or 0
|
|
24
|
+
model = getattr(response, "model", "unknown")
|
|
25
|
+
trace = InteractionTrace(
|
|
26
|
+
task_id=self._task_id,
|
|
27
|
+
from_agent=self._from_agent,
|
|
28
|
+
to_agent=self._to_agent,
|
|
29
|
+
content=content,
|
|
30
|
+
model=model,
|
|
31
|
+
input_tokens=input_tokens,
|
|
32
|
+
output_tokens=output_tokens,
|
|
33
|
+
round_trip=self._round_trip,
|
|
34
|
+
framework="anthropic",
|
|
35
|
+
)
|
|
36
|
+
self._tracer.record(trace)
|
|
37
|
+
except Exception as e:
|
|
38
|
+
import sys
|
|
39
|
+
print(
|
|
40
|
+
f"[summitsdk] Warning: trace recording failed"
|
|
41
|
+
f" for {self._from_agent}->{self._to_agent}:"
|
|
42
|
+
f" {type(e).__name__}: {e}",
|
|
43
|
+
file=sys.stderr,
|
|
44
|
+
)
|
|
45
|
+
return response
|
|
46
|
+
|
|
47
|
+
def stream(self, *args, **kwargs):
|
|
48
|
+
raise NotImplementedError(
|
|
49
|
+
"summitsdk does not support streaming. "
|
|
50
|
+
"Use client.messages.create() instead. "
|
|
51
|
+
"Streaming calls will not produce traces."
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
def __getattr__(self, name):
|
|
55
|
+
return getattr(self._original, name)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from marlsdk.schema import InteractionTrace
|
|
3
|
+
|
|
4
|
+
class WrappedOpenAICompletions:
|
|
5
|
+
def __init__(self, original, tracer, from_agent, to_agent, task_id, round_trip):
|
|
6
|
+
self._original = original
|
|
7
|
+
self._tracer = tracer
|
|
8
|
+
self._from_agent = from_agent
|
|
9
|
+
self._to_agent = to_agent
|
|
10
|
+
self._task_id = task_id
|
|
11
|
+
self._round_trip = round_trip
|
|
12
|
+
|
|
13
|
+
def create(self, *args, **kwargs):
|
|
14
|
+
response = self._original.create(*args, **kwargs)
|
|
15
|
+
try:
|
|
16
|
+
choices = getattr(response, "choices", None) or []
|
|
17
|
+
content = ""
|
|
18
|
+
if choices:
|
|
19
|
+
msg = getattr(choices[0], "message", None)
|
|
20
|
+
content = getattr(msg, "content", "") or ""
|
|
21
|
+
usage = getattr(response, "usage", None)
|
|
22
|
+
input_tokens = getattr(usage, "prompt_tokens", 0) or 0
|
|
23
|
+
output_tokens = getattr(usage, "completion_tokens", 0) or 0
|
|
24
|
+
model = getattr(response, "model", "unknown")
|
|
25
|
+
trace = InteractionTrace(
|
|
26
|
+
task_id=self._task_id,
|
|
27
|
+
from_agent=self._from_agent,
|
|
28
|
+
to_agent=self._to_agent,
|
|
29
|
+
content=content,
|
|
30
|
+
model=model,
|
|
31
|
+
input_tokens=input_tokens,
|
|
32
|
+
output_tokens=output_tokens,
|
|
33
|
+
round_trip=self._round_trip,
|
|
34
|
+
framework="openai",
|
|
35
|
+
)
|
|
36
|
+
self._tracer.record(trace)
|
|
37
|
+
except Exception as e:
|
|
38
|
+
import sys
|
|
39
|
+
print(
|
|
40
|
+
f"[summitsdk] Warning: trace recording failed"
|
|
41
|
+
f" for {self._from_agent}->{self._to_agent}:"
|
|
42
|
+
f" {type(e).__name__}: {e}",
|
|
43
|
+
file=sys.stderr,
|
|
44
|
+
)
|
|
45
|
+
return response
|
|
46
|
+
|
|
47
|
+
def stream(self, *args, **kwargs):
|
|
48
|
+
raise NotImplementedError(
|
|
49
|
+
"summitsdk does not support streaming. "
|
|
50
|
+
"Use client.chat.completions.create() instead. "
|
|
51
|
+
"Streaming calls will not produce traces."
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
def __getattr__(self, name):
|
|
55
|
+
return getattr(self._original, name)
|
|
56
|
+
|
|
57
|
+
except ImportError:
|
|
58
|
+
pass
|
summitsdk-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from setuptools import setup
|
|
3
|
+
|
|
4
|
+
with open('README.md', encoding='utf-8') as f:
|
|
5
|
+
long_description = f.read()
|
|
6
|
+
|
|
7
|
+
setup(
|
|
8
|
+
name='summitsdk',
|
|
9
|
+
version='0.1.0',
|
|
10
|
+
author='Shaz Hussain',
|
|
11
|
+
author_email='shaz@cronys.xyz',
|
|
12
|
+
description='Instrumentation layer for multi-agent AI pipelines',
|
|
13
|
+
long_description=long_description,
|
|
14
|
+
long_description_content_type='text/markdown',
|
|
15
|
+
url='https://cronys.xyz/summit',
|
|
16
|
+
packages=['marlsdk', 'marlsdk.wrappers', 'marlsdk.exporters'],
|
|
17
|
+
python_requires='>=3.8',
|
|
18
|
+
install_requires=[
|
|
19
|
+
'anthropic',
|
|
20
|
+
],
|
|
21
|
+
extras_require={
|
|
22
|
+
'openai': ['openai'],
|
|
23
|
+
},
|
|
24
|
+
classifiers=[
|
|
25
|
+
'Programming Language :: Python :: 3',
|
|
26
|
+
'License :: OSI Approved :: MIT License',
|
|
27
|
+
'Operating System :: OS Independent',
|
|
28
|
+
],
|
|
29
|
+
)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: summitsdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Instrumentation layer for multi-agent AI pipelines
|
|
5
|
+
Home-page: https://cronys.xyz/summit
|
|
6
|
+
Author: Shaz Hussain
|
|
7
|
+
Author-email: shaz@cronys.xyz
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: anthropic
|
|
15
|
+
Provides-Extra: openai
|
|
16
|
+
Requires-Dist: openai; extra == "openai"
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
Dynamic: provides-extra
|
|
25
|
+
Dynamic: requires-dist
|
|
26
|
+
Dynamic: requires-python
|
|
27
|
+
Dynamic: summary
|
|
28
|
+
|
|
29
|
+
# MARL
|
|
30
|
+
|
|
31
|
+
Simulation and evaluation environment for
|
|
32
|
+
Summit by Cronys.
|
|
33
|
+
|
|
34
|
+
## Structure
|
|
35
|
+
|
|
36
|
+
sim/ Planner, Worker, Judge agents
|
|
37
|
+
eval/ Reward model evaluator
|
|
38
|
+
improve.py Single-pass improvement loop
|
|
39
|
+
cycle.py Automated multi-cycle runner
|
|
40
|
+
marlsdk/ summitsdk package source
|
|
41
|
+
data/ Traces and evaluation results
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from anthropic import Anthropic
|
|
47
|
+
from marlsdk.tracer import Tracer
|
|
48
|
+
from marlsdk.exporters.local import LocalExporter
|
|
49
|
+
|
|
50
|
+
exporter = LocalExporter(output_dir="traces/")
|
|
51
|
+
tracer = Tracer(exporter=exporter)
|
|
52
|
+
|
|
53
|
+
client = Anthropic()
|
|
54
|
+
wrapped = tracer.wrap_anthropic(
|
|
55
|
+
client,
|
|
56
|
+
from_agent="planner",
|
|
57
|
+
to_agent="worker",
|
|
58
|
+
task_id="task-001",
|
|
59
|
+
round_trip=1
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
response = wrapped.messages.create(
|
|
63
|
+
model="claude-sonnet-4-20250514",
|
|
64
|
+
max_tokens=1024,
|
|
65
|
+
messages=[{"role": "user", "content": "your prompt"}]
|
|
66
|
+
)
|
|
67
|
+
# trace written automatically to traces/
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
OpenAI: use tracer.wrap_openai(client, ...)
|
|
71
|
+
with the same arguments.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
setup.py
|
|
5
|
+
marlsdk/__init__.py
|
|
6
|
+
marlsdk/schema.py
|
|
7
|
+
marlsdk/tracer.py
|
|
8
|
+
marlsdk/exporters/__init__.py
|
|
9
|
+
marlsdk/exporters/local.py
|
|
10
|
+
marlsdk/wrappers/__init__.py
|
|
11
|
+
marlsdk/wrappers/anthropic_wrapper.py
|
|
12
|
+
marlsdk/wrappers/openai_wrapper.py
|
|
13
|
+
summitsdk.egg-info/PKG-INFO
|
|
14
|
+
summitsdk.egg-info/SOURCES.txt
|
|
15
|
+
summitsdk.egg-info/dependency_links.txt
|
|
16
|
+
summitsdk.egg-info/requires.txt
|
|
17
|
+
summitsdk.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
marlsdk
|