evolution-sdk 0.8.0__tar.gz → 0.8.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.
- {evolution_sdk-0.8.0/evolution_sdk.egg-info → evolution_sdk-0.8.5}/PKG-INFO +260 -240
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/README.md +34 -14
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/__init__.py +1 -1
- evolution_sdk-0.8.5/evolution/__main__.py +9 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/adapters/crewai.py +6 -2
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/adapters/direct.py +8 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/adapters/langchain.py +4 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/adapters/llamaindex.py +6 -2
- evolution_sdk-0.8.5/evolution/cli.py +272 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/repository.py +18 -4
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5/evolution_sdk.egg-info}/PKG-INFO +260 -240
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution_sdk.egg-info/SOURCES.txt +4 -0
- evolution_sdk-0.8.5/evolution_sdk.egg-info/entry_points.txt +3 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/pyproject.toml +5 -1
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/setup.cfg +4 -4
- evolution_sdk-0.8.5/tests/test_cli.py +74 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/LICENSE +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/adapters/__init__.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/adapters/base.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/capture/__init__.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/capture/introspect.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/capture/recorder.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/capture/tracker.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/evaluators.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/exceptions.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/models/__init__.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/models/artifacts.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/models/evaluation.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/models/execution.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/models/manifest.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution/validator.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution_sdk.egg-info/dependency_links.txt +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution_sdk.egg-info/requires.txt +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/evolution_sdk.egg-info/top_level.txt +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/tests/test_adapters.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/tests/test_artifacts.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/tests/test_capture.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/tests/test_evaluator.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/tests/test_manifest.py +0 -0
- {evolution_sdk-0.8.0 → evolution_sdk-0.8.5}/tests/test_repository.py +0 -0
|
@@ -1,240 +1,260 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: evolution-sdk
|
|
3
|
-
Version: 0.8.
|
|
4
|
-
Summary: Python SDK for Evolution — AI-Native Version Control Platform
|
|
5
|
-
Author-email: "Urvish.A.Prajapati" <prajapatiurvish712@gmail.com>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/Urvish0/Evolution
|
|
8
|
-
Project-URL: Repository, https://github.com/Urvish0/Evolution
|
|
9
|
-
Project-URL: Specification, https://github.com/Urvish0/Evolution/blob/main/spec/intelligence-manifest-v1.0.md
|
|
10
|
-
Keywords: ai,version-control,llm,manifest,evaluation,langchain,llamaindex
|
|
11
|
-
Classifier: Development Status :: 4 - Beta
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
14
|
-
Classifier: Topic :: Software Development :: Version Control
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
Requires-Python: >=3.10
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
License-File: LICENSE
|
|
23
|
-
Provides-Extra: dev
|
|
24
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
25
|
-
Dynamic: license-file
|
|
26
|
-
|
|
27
|
-
# Evolution Python SDK (`evolution-sdk`)
|
|
28
|
-
|
|
29
|
-
> **"Version Intelligence, Not Code."**
|
|
30
|
-
|
|
31
|
-
[](https://pypi.org/project/evolution-sdk/)
|
|
32
|
-
[](https://pypi.org/project/evolution-sdk/)
|
|
33
|
-
[](https://github.com/Urvish0/Evolution/blob/main/LICENSE)
|
|
34
|
-
[](#features)
|
|
35
|
-
|
|
36
|
-
The official Python SDK for **[Evolution](https://github.com/Urvish0/Evolution)** — an open-source, AI-native version control platform.
|
|
37
|
-
|
|
38
|
-
While traditional version control systems (like Git) track line-by-line changes to text files, **Evolution tracks and versions Intelligence**: the complete operational state of an AI system (system prompts, sampling parameters, memory strategies, vector store retrieval configurations, tool schemas, and guardrails).
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
##
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
Install `evolution-sdk` via `pip` or `uv`:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
pip install evolution-sdk
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Or using `uv`:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
uv add evolution-sdk
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
##
|
|
70
|
-
|
|
71
|
-
### 1. Initialize or Open an Evolution Repository
|
|
72
|
-
|
|
73
|
-
```python
|
|
74
|
-
import evolution as evo
|
|
75
|
-
|
|
76
|
-
# Initialize a new Evolution repository in the current directory
|
|
77
|
-
repo = evo.Repository.init("./my_ai_agent")
|
|
78
|
-
|
|
79
|
-
# Or open an existing repository
|
|
80
|
-
# repo = evo.Repository.open("./my_ai_agent")
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
### 2. Automatic Intelligence Tracking with `@evo.track`
|
|
86
|
-
|
|
87
|
-
Decorate your AI agent functions. Evolution automatically extracts the docstring as the system prompt, registers model configs, measures latency, and logs execution tokens without modifying your business logic:
|
|
88
|
-
|
|
89
|
-
```python
|
|
90
|
-
from openai import OpenAI
|
|
91
|
-
import evolution as evo
|
|
92
|
-
|
|
93
|
-
client = OpenAI()
|
|
94
|
-
repo = evo.Repository.init("./my_agent")
|
|
95
|
-
|
|
96
|
-
@evo.track(
|
|
97
|
-
repo=repo,
|
|
98
|
-
name="customer-support-agent",
|
|
99
|
-
model="gpt-4o",
|
|
100
|
-
temperature=0.2,
|
|
101
|
-
)
|
|
102
|
-
def handle_customer_inquiry(user_message: str):
|
|
103
|
-
"""Senior Customer Support Specialist. Always maintain professional tone and provide step-by-step guidance."""
|
|
104
|
-
response = client.chat.completions.create(
|
|
105
|
-
model="gpt-4o",
|
|
106
|
-
temperature=0.2,
|
|
107
|
-
messages=[
|
|
108
|
-
{"role": "system", "content": "You are a Senior Customer Support Specialist."},
|
|
109
|
-
{"role": "user", "content": user_message}
|
|
110
|
-
]
|
|
111
|
-
)
|
|
112
|
-
return response
|
|
113
|
-
|
|
114
|
-
# Run your agent
|
|
115
|
-
result = handle_customer_inquiry("How do I reset my API key?")
|
|
116
|
-
|
|
117
|
-
# Commit the captured intelligence snapshot
|
|
118
|
-
repo.commit("feat: initial customer support intelligence snapshot")
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
### 3. Precision Latency & Execution Recording with `record()`
|
|
124
|
-
|
|
125
|
-
For fine-grained telemetry or manual pipelines, use the `record` context manager:
|
|
126
|
-
|
|
127
|
-
```python
|
|
128
|
-
import evolution as evo
|
|
129
|
-
|
|
130
|
-
repo = evo.Repository.open(".")
|
|
131
|
-
|
|
132
|
-
with evo.record(repo, metadata={"phase": "testing"}) as ctx:
|
|
133
|
-
# Set inputs
|
|
134
|
-
ctx.set_inputs("User asked: Explain Merkle trees.")
|
|
135
|
-
|
|
136
|
-
# Execute your LLM call
|
|
137
|
-
response_text = "A Merkle tree is a cryptographic tree structure..."
|
|
138
|
-
|
|
139
|
-
# Record outputs and token metrics
|
|
140
|
-
ctx.set_outputs(response_text)
|
|
141
|
-
ctx.set_tokens(prompt_tokens=42, completion_tokens=128)
|
|
142
|
-
|
|
143
|
-
print(f"Recorded execution with duration: {ctx.execution.duration_ms} ms")
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
manifest
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: evolution-sdk
|
|
3
|
+
Version: 0.8.5
|
|
4
|
+
Summary: Python SDK for Evolution — AI-Native Version Control Platform
|
|
5
|
+
Author-email: "Urvish.A.Prajapati" <prajapatiurvish712@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Urvish0/Evolution
|
|
8
|
+
Project-URL: Repository, https://github.com/Urvish0/Evolution
|
|
9
|
+
Project-URL: Specification, https://github.com/Urvish0/Evolution/blob/main/spec/intelligence-manifest-v1.0.md
|
|
10
|
+
Keywords: ai,version-control,llm,manifest,evaluation,langchain,llamaindex
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
14
|
+
Classifier: Topic :: Software Development :: Version Control
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# Evolution Python SDK (`evolution-sdk`)
|
|
28
|
+
|
|
29
|
+
> **"Version Intelligence, Not Code."**
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/evolution-sdk/)
|
|
32
|
+
[](https://pypi.org/project/evolution-sdk/)
|
|
33
|
+
[](https://github.com/Urvish0/Evolution/blob/main/LICENSE)
|
|
34
|
+
[](#features)
|
|
35
|
+
|
|
36
|
+
The official Python SDK for **[Evolution](https://github.com/Urvish0/Evolution)** — an open-source, AI-native version control platform.
|
|
37
|
+
|
|
38
|
+
While traditional version control systems (like Git) track line-by-line changes to text files, **Evolution tracks and versions Intelligence**: the complete operational state of an AI system (system prompts, sampling parameters, memory strategies, vector store retrieval configurations, tool schemas, and guardrails).
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Key Features
|
|
43
|
+
|
|
44
|
+
- **Zero Runtime Dependencies**: Pure Python implementation with zero third-party dependencies. Ultra-fast, lightweight, and won't conflict with your environment.
|
|
45
|
+
- **Automatic Intelligence Capture**: Use the `@evolution.track` decorator to automatically extract docstring prompts, model hyperparameters, token consumption, and latency.
|
|
46
|
+
- **Precision Execution Telemetry**: Record execution traces, inputs, outputs, and hardware latency using `@track` or the `evolution.record` context manager.
|
|
47
|
+
- **Universal Framework Adapters**: Seamlessly introspect and export standard Intelligence Manifests from **LangChain**, **LlamaIndex**, **CrewAI**, and direct OpenAI / Anthropic client calls.
|
|
48
|
+
- **Git-Compatible CAS Blobs**: Content-Addressable Storage with auto-computed SHA-256 Merkle hashes.
|
|
49
|
+
- **Intelligence Manifest Spec v1.0 Compliant**: Native support for creating, validating, and saving standard `evolution.manifest.json` schemas.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
Install `evolution-sdk` via `pip` or `uv`:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install evolution-sdk
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Or using `uv`:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
uv add evolution-sdk
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Quickstart in 30 Seconds
|
|
70
|
+
|
|
71
|
+
### 1. Initialize or Open an Evolution Repository
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
import evolution as evo
|
|
75
|
+
|
|
76
|
+
# Initialize a new Evolution repository in the current directory
|
|
77
|
+
repo = evo.Repository.init("./my_ai_agent")
|
|
78
|
+
|
|
79
|
+
# Or open an existing repository
|
|
80
|
+
# repo = evo.Repository.open("./my_ai_agent")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### 2. Automatic Intelligence Tracking with `@evo.track`
|
|
86
|
+
|
|
87
|
+
Decorate your AI agent functions. Evolution automatically extracts the docstring as the system prompt, registers model configs, measures latency, and logs execution tokens without modifying your business logic:
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
from openai import OpenAI
|
|
91
|
+
import evolution as evo
|
|
92
|
+
|
|
93
|
+
client = OpenAI()
|
|
94
|
+
repo = evo.Repository.init("./my_agent")
|
|
95
|
+
|
|
96
|
+
@evo.track(
|
|
97
|
+
repo=repo,
|
|
98
|
+
name="customer-support-agent",
|
|
99
|
+
model="gpt-4o",
|
|
100
|
+
temperature=0.2,
|
|
101
|
+
)
|
|
102
|
+
def handle_customer_inquiry(user_message: str):
|
|
103
|
+
"""Senior Customer Support Specialist. Always maintain professional tone and provide step-by-step guidance."""
|
|
104
|
+
response = client.chat.completions.create(
|
|
105
|
+
model="gpt-4o",
|
|
106
|
+
temperature=0.2,
|
|
107
|
+
messages=[
|
|
108
|
+
{"role": "system", "content": "You are a Senior Customer Support Specialist."},
|
|
109
|
+
{"role": "user", "content": user_message}
|
|
110
|
+
]
|
|
111
|
+
)
|
|
112
|
+
return response
|
|
113
|
+
|
|
114
|
+
# Run your agent
|
|
115
|
+
result = handle_customer_inquiry("How do I reset my API key?")
|
|
116
|
+
|
|
117
|
+
# Commit the captured intelligence snapshot
|
|
118
|
+
repo.commit("feat: initial customer support intelligence snapshot")
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### 3. Precision Latency & Execution Recording with `record()`
|
|
124
|
+
|
|
125
|
+
For fine-grained telemetry or manual pipelines, use the `record` context manager:
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
import evolution as evo
|
|
129
|
+
|
|
130
|
+
repo = evo.Repository.open(".")
|
|
131
|
+
|
|
132
|
+
with evo.record(repo, metadata={"phase": "testing"}) as ctx:
|
|
133
|
+
# Set inputs
|
|
134
|
+
ctx.set_inputs("User asked: Explain Merkle trees.")
|
|
135
|
+
|
|
136
|
+
# Execute your LLM call
|
|
137
|
+
response_text = "A Merkle tree is a cryptographic tree structure..."
|
|
138
|
+
|
|
139
|
+
# Record outputs and token metrics
|
|
140
|
+
ctx.set_outputs(response_text)
|
|
141
|
+
ctx.set_tokens(prompt_tokens=42, completion_tokens=128)
|
|
142
|
+
|
|
143
|
+
print(f"Recorded execution with duration: {ctx.execution.duration_ms} ms")
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### 4. Standalone CLI (`evo-py` / `python -m evolution`)
|
|
149
|
+
|
|
150
|
+
`evolution-sdk` provides an immediate command-line tool without needing Go:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Check working tree and intelligence status
|
|
154
|
+
evo-py status
|
|
155
|
+
|
|
156
|
+
# Inspect commit history
|
|
157
|
+
evo-py log --oneline
|
|
158
|
+
|
|
159
|
+
# Inspect recorded AI telemetry
|
|
160
|
+
evo-py execution list
|
|
161
|
+
|
|
162
|
+
# Inspect evaluation scorecards
|
|
163
|
+
evo-py evaluate
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Framework Adapters
|
|
169
|
+
|
|
170
|
+
Evolution provides plug-and-play adapters to export standard Intelligence Manifests directly from your existing AI framework abstractions:
|
|
171
|
+
|
|
172
|
+
### LangChain Adapter
|
|
173
|
+
```python
|
|
174
|
+
from langchain_openai import ChatOpenAI
|
|
175
|
+
from langchain_core.prompts import ChatPromptTemplate
|
|
176
|
+
from evolution.adapters import LangChainAdapter
|
|
177
|
+
|
|
178
|
+
prompt = ChatPromptTemplate.from_template("Summarize the following legal document: {doc}")
|
|
179
|
+
llm = ChatOpenAI(model="gpt-4o", temperature=0.1)
|
|
180
|
+
chain = prompt | llm
|
|
181
|
+
|
|
182
|
+
manifest = LangChainAdapter.from_langchain(chain, name="legal-summarizer")
|
|
183
|
+
print(manifest.to_dict())
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### LlamaIndex Adapter
|
|
187
|
+
```python
|
|
188
|
+
from llama_index.core import VectorStoreIndex
|
|
189
|
+
from evolution.adapters import LlamaIndexAdapter
|
|
190
|
+
|
|
191
|
+
manifest = LlamaIndexAdapter.from_llamaindex(
|
|
192
|
+
index=my_vector_index,
|
|
193
|
+
name="financial-rag-agent",
|
|
194
|
+
similarity_top_k=5,
|
|
195
|
+
)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### CrewAI Adapter
|
|
199
|
+
```python
|
|
200
|
+
from crewai import Agent, Crew, Task
|
|
201
|
+
from evolution.adapters import CrewAIAdapter
|
|
202
|
+
|
|
203
|
+
manifest = CrewAIAdapter.from_crewai(my_crew, name="research-crew")
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## 📋 The Intelligence Manifest Format (`evolution.manifest.json`)
|
|
209
|
+
|
|
210
|
+
Evolution stores your complete AI system state in a portable, framework-agnostic manifest following the **[Intelligence Manifest Specification v1.0](https://github.com/Urvish0/Evolution/blob/main/spec/intelligence-manifest-v1.0.md)**:
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"version": "1.0.0",
|
|
215
|
+
"name": "legal-dispute-resolution-system",
|
|
216
|
+
"description": "AI system powered by Evolution version control",
|
|
217
|
+
"artifacts": {
|
|
218
|
+
"prompts": [
|
|
219
|
+
{
|
|
220
|
+
"type": "prompt",
|
|
221
|
+
"name": "strict-legal-analyst-prompt",
|
|
222
|
+
"description": "Extracted docstring prompt",
|
|
223
|
+
"role": "system",
|
|
224
|
+
"format": "text"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"model_config": {
|
|
228
|
+
"type": "model_config",
|
|
229
|
+
"name": "analyst-model",
|
|
230
|
+
"model": "qwen/qwen3.8-27b",
|
|
231
|
+
"provider": "local",
|
|
232
|
+
"temperature": 0.1
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Running Tests
|
|
241
|
+
|
|
242
|
+
To run the SDK test suite:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
pytest sdk/python/tests/ -v
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## License
|
|
251
|
+
|
|
252
|
+
This project is licensed under the **MIT License** — see the [LICENSE](https://github.com/Urvish0/Evolution/blob/main/sdk/python/LICENSE) file for details.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Links
|
|
257
|
+
|
|
258
|
+
- **GitHub Repository:** [https://github.com/Urvish0/Evolution](https://github.com/Urvish0/Evolution)
|
|
259
|
+
- **Specification:** [Intelligence Manifest Spec v1.0](https://github.com/Urvish0/Evolution/blob/main/spec/intelligence-manifest-v1.0.md)
|
|
260
|
+
- **Documentation:** [Technical Manual](https://github.com/Urvish0/Evolution/blob/main/DOCUMENTATION.md)
|
|
@@ -13,18 +13,18 @@ While traditional version control systems (like Git) track line-by-line changes
|
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Key Features
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
18
|
+
- **Zero Runtime Dependencies**: Pure Python implementation with zero third-party dependencies. Ultra-fast, lightweight, and won't conflict with your environment.
|
|
19
|
+
- **Automatic Intelligence Capture**: Use the `@evolution.track` decorator to automatically extract docstring prompts, model hyperparameters, token consumption, and latency.
|
|
20
|
+
- **Precision Execution Telemetry**: Record execution traces, inputs, outputs, and hardware latency using `@track` or the `evolution.record` context manager.
|
|
21
|
+
- **Universal Framework Adapters**: Seamlessly introspect and export standard Intelligence Manifests from **LangChain**, **LlamaIndex**, **CrewAI**, and direct OpenAI / Anthropic client calls.
|
|
22
|
+
- **Git-Compatible CAS Blobs**: Content-Addressable Storage with auto-computed SHA-256 Merkle hashes.
|
|
23
|
+
- **Intelligence Manifest Spec v1.0 Compliant**: Native support for creating, validating, and saving standard `evolution.manifest.json` schemas.
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Installation
|
|
28
28
|
|
|
29
29
|
Install `evolution-sdk` via `pip` or `uv`:
|
|
30
30
|
|
|
@@ -40,7 +40,7 @@ uv add evolution-sdk
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Quickstart in 30 Seconds
|
|
44
44
|
|
|
45
45
|
### 1. Initialize or Open an Evolution Repository
|
|
46
46
|
|
|
@@ -119,7 +119,27 @@ print(f"Recorded execution with duration: {ctx.execution.duration_ms} ms")
|
|
|
119
119
|
|
|
120
120
|
---
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
### 4. Standalone CLI (`evo-py` / `python -m evolution`)
|
|
123
|
+
|
|
124
|
+
`evolution-sdk` provides an immediate command-line tool without needing Go:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Check working tree and intelligence status
|
|
128
|
+
evo-py status
|
|
129
|
+
|
|
130
|
+
# Inspect commit history
|
|
131
|
+
evo-py log --oneline
|
|
132
|
+
|
|
133
|
+
# Inspect recorded AI telemetry
|
|
134
|
+
evo-py execution list
|
|
135
|
+
|
|
136
|
+
# Inspect evaluation scorecards
|
|
137
|
+
evo-py evaluate
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Framework Adapters
|
|
123
143
|
|
|
124
144
|
Evolution provides plug-and-play adapters to export standard Intelligence Manifests directly from your existing AI framework abstractions:
|
|
125
145
|
|
|
@@ -191,7 +211,7 @@ Evolution stores your complete AI system state in a portable, framework-agnostic
|
|
|
191
211
|
|
|
192
212
|
---
|
|
193
213
|
|
|
194
|
-
##
|
|
214
|
+
## Running Tests
|
|
195
215
|
|
|
196
216
|
To run the SDK test suite:
|
|
197
217
|
|
|
@@ -201,13 +221,13 @@ pytest sdk/python/tests/ -v
|
|
|
201
221
|
|
|
202
222
|
---
|
|
203
223
|
|
|
204
|
-
##
|
|
224
|
+
## License
|
|
205
225
|
|
|
206
|
-
This project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for details.
|
|
226
|
+
This project is licensed under the **MIT License** — see the [LICENSE](https://github.com/Urvish0/Evolution/blob/main/sdk/python/LICENSE) file for details.
|
|
207
227
|
|
|
208
228
|
---
|
|
209
229
|
|
|
210
|
-
##
|
|
230
|
+
## Links
|
|
211
231
|
|
|
212
232
|
- **GitHub Repository:** [https://github.com/Urvish0/Evolution](https://github.com/Urvish0/Evolution)
|
|
213
233
|
- **Specification:** [Intelligence Manifest Spec v1.0](https://github.com/Urvish0/Evolution/blob/main/spec/intelligence-manifest-v1.0.md)
|
|
@@ -16,9 +16,13 @@ from evolution.models.manifest import Manifest
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class CrewAIAdapter(BaseAdapter):
|
|
19
|
-
"""Converts CrewAI Crews, Agents, and Tasks into
|
|
19
|
+
"""Converts CrewAI Crews, Agents, and Tasks into an Intelligence Manifest."""
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
@classmethod
|
|
22
|
+
def from_crewai(cls, obj: Any, name: str = "crewai-agent", description: str = "") -> Manifest:
|
|
23
|
+
return cls().to_manifest(obj, name=name, description=description)
|
|
24
|
+
|
|
25
|
+
def to_manifest(self, obj: Any, name: str = "crewai-agent", description: str = "") -> Manifest:
|
|
22
26
|
manifest = Manifest(name=name, description=description or "CrewAI multi-agent system state")
|
|
23
27
|
|
|
24
28
|
agents = getattr(obj, "agents", []) or []
|
|
@@ -18,6 +18,10 @@ from evolution.models.manifest import Manifest
|
|
|
18
18
|
class OpenAIAdapter(BaseAdapter):
|
|
19
19
|
"""Converts OpenAI request dictionaries or client configurations into an Intelligence Manifest."""
|
|
20
20
|
|
|
21
|
+
@classmethod
|
|
22
|
+
def from_openai(cls, obj: Any, name: str = "openai-system", description: str = "") -> Manifest:
|
|
23
|
+
return cls().to_manifest(obj, name=name, description=description)
|
|
24
|
+
|
|
21
25
|
def to_manifest(self, obj: Any, name: str = "openai-system", description: str = "") -> Manifest:
|
|
22
26
|
manifest = Manifest(name=name, description=description or "OpenAI API intelligence state")
|
|
23
27
|
params = obj if isinstance(obj, dict) else getattr(obj, "__dict__", {})
|
|
@@ -69,6 +73,10 @@ class OpenAIAdapter(BaseAdapter):
|
|
|
69
73
|
class AnthropicAdapter(BaseAdapter):
|
|
70
74
|
"""Converts Anthropic request dictionaries or client configurations into an Intelligence Manifest."""
|
|
71
75
|
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_anthropic(cls, obj: Any, name: str = "anthropic-system", description: str = "") -> Manifest:
|
|
78
|
+
return cls().to_manifest(obj, name=name, description=description)
|
|
79
|
+
|
|
72
80
|
def to_manifest(self, obj: Any, name: str = "anthropic-system", description: str = "") -> Manifest:
|
|
73
81
|
manifest = Manifest(name=name, description=description or "Anthropic API intelligence state")
|
|
74
82
|
params = obj if isinstance(obj, dict) else getattr(obj, "__dict__", {})
|