veralog 0.1.0__py3-none-any.whl
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,202 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: veralog
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Cryptographic audit trails for AI agents
|
|
5
|
+
Home-page: https://www.vrlg.tech
|
|
6
|
+
Author: Anton Kupreev
|
|
7
|
+
Author-email: liquidcrystalcore@gmail.com
|
|
8
|
+
Keywords: ai agent audit log cryptographic ed25519 enterprise security
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
12
|
+
Classifier: Topic :: Security
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
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.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Dynamic: author
|
|
23
|
+
Dynamic: author-email
|
|
24
|
+
Dynamic: classifier
|
|
25
|
+
Dynamic: description
|
|
26
|
+
Dynamic: description-content-type
|
|
27
|
+
Dynamic: home-page
|
|
28
|
+
Dynamic: keywords
|
|
29
|
+
Dynamic: requires-python
|
|
30
|
+
Dynamic: summary
|
|
31
|
+
|
|
32
|
+
# Veralog Python SDK
|
|
33
|
+
|
|
34
|
+
Cryptographic audit trails for AI agents. Add one line to your agent, get a tamper-proof signed log of every action.
|
|
35
|
+
|
|
36
|
+
**[www.vrlg.tech](https://www.vrlg.tech)**
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install veralog
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick start
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
import veralog
|
|
48
|
+
|
|
49
|
+
veralog.configure(api_key="vrlg_...")
|
|
50
|
+
|
|
51
|
+
result = veralog.record(
|
|
52
|
+
agent_id="sales-bot",
|
|
53
|
+
action="send_proposal",
|
|
54
|
+
payload={"client": "acme-corp", "deal_value": 50000},
|
|
55
|
+
status="success",
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
print(result.verify_url)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Get an API key
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
import veralog
|
|
65
|
+
account = veralog.register(email="you@yourcompany.com")
|
|
66
|
+
print(account["api_key"])
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Or register at [www.vrlg.tech](https://www.vrlg.tech).
|
|
70
|
+
|
|
71
|
+
## Configuration
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
# Explicit
|
|
75
|
+
veralog.configure(api_key="vrlg_...")
|
|
76
|
+
|
|
77
|
+
# Or via environment variable
|
|
78
|
+
export VERALOG_API_KEY="vrlg_..."
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Record an event
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
result = veralog.record(
|
|
85
|
+
agent_id="sales-bot", # required: your agent's ID
|
|
86
|
+
action="send_proposal", # required: what it did
|
|
87
|
+
payload={"client": "acme"}, # required: arbitrary dict
|
|
88
|
+
status="success", # success | warning | error | crash | timeout | blocked | cancelled
|
|
89
|
+
severity="info", # debug | info | warning | error | critical
|
|
90
|
+
flags=[], # loop_detected | policy_violation | data_exposure | ...
|
|
91
|
+
trace_id="trace-abc-123", # optional: correlation ID
|
|
92
|
+
tool_name="gmail_api", # optional: tool used
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
print(result.event_id) # UUID
|
|
96
|
+
print(result.verify_url) # https://www.vrlg.tech/verify/{id}/page
|
|
97
|
+
print(result.events_used) # running total
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Query events
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
events = veralog.get_events(
|
|
104
|
+
status="blocked",
|
|
105
|
+
agent_id="sales-bot",
|
|
106
|
+
since="2026-06-01T00:00:00",
|
|
107
|
+
limit=50,
|
|
108
|
+
)
|
|
109
|
+
print(events["total"])
|
|
110
|
+
print(events["events"])
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Export all events
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
data = veralog.export()
|
|
117
|
+
# Returns dict with all events, signatures, and public keys
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Verify an event
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
event = veralog.verify("8b466b96-8663-4742-a6a6-8964ce69e5d4")
|
|
124
|
+
print(event["signature"])
|
|
125
|
+
print(event["public_key"])
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## LangChain example
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
from langchain.agents import AgentExecutor
|
|
132
|
+
import veralog
|
|
133
|
+
|
|
134
|
+
veralog.configure(api_key="vrlg_...")
|
|
135
|
+
|
|
136
|
+
def run_agent_with_audit(agent_executor, input_text):
|
|
137
|
+
try:
|
|
138
|
+
result = agent_executor.invoke({"input": input_text})
|
|
139
|
+
veralog.record(
|
|
140
|
+
agent_id="langchain-agent",
|
|
141
|
+
action="invoke",
|
|
142
|
+
payload={"input": input_text, "output": result["output"][:200]},
|
|
143
|
+
status="success",
|
|
144
|
+
)
|
|
145
|
+
return result
|
|
146
|
+
except Exception as e:
|
|
147
|
+
veralog.record(
|
|
148
|
+
agent_id="langchain-agent",
|
|
149
|
+
action="invoke",
|
|
150
|
+
payload={"input": input_text, "error": str(e)},
|
|
151
|
+
status="error",
|
|
152
|
+
severity="error",
|
|
153
|
+
)
|
|
154
|
+
raise
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## CrewAI example
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
from crewai import Agent, Task, Crew
|
|
161
|
+
import veralog
|
|
162
|
+
|
|
163
|
+
veralog.configure(api_key="vrlg_...")
|
|
164
|
+
|
|
165
|
+
class AuditedCrew(Crew):
|
|
166
|
+
def kickoff(self, inputs=None):
|
|
167
|
+
result = super().kickoff(inputs=inputs)
|
|
168
|
+
veralog.record(
|
|
169
|
+
agent_id="crewai-crew",
|
|
170
|
+
action="kickoff",
|
|
171
|
+
payload={"inputs": inputs, "result": str(result)[:200]},
|
|
172
|
+
status="success",
|
|
173
|
+
)
|
|
174
|
+
return result
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Independent verification
|
|
178
|
+
|
|
179
|
+
Every event is signed with Ed25519. You can verify any event without Veralog:
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
|
|
183
|
+
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
|
|
184
|
+
import binascii
|
|
185
|
+
|
|
186
|
+
event = veralog.verify("your-event-id")
|
|
187
|
+
|
|
188
|
+
public_key = Ed25519PublicKey.from_public_bytes(
|
|
189
|
+
binascii.unhexlify(event["public_key"])
|
|
190
|
+
)
|
|
191
|
+
message = f"{event['event_id']}:{event['agent_id']}:{event['action']}:{event['timestamp']}".encode()
|
|
192
|
+
signature = binascii.unhexlify(event["signature"])
|
|
193
|
+
|
|
194
|
+
public_key.verify(signature, message)
|
|
195
|
+
print("Signature valid — event was not tampered with")
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Links
|
|
199
|
+
|
|
200
|
+
- Website: [www.vrlg.tech](https://www.vrlg.tech)
|
|
201
|
+
- API docs: [www.vrlg.tech/docs](https://www.vrlg.tech/docs)
|
|
202
|
+
- Contact: liquidcrystalcore@gmail.com
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
veralog-0.1.0.dist-info/METADATA,sha256=pn9r5lEZvSi3oHUjJGhbbsAdkFVrCafwAxvpPEn8Lqk,5416
|
|
2
|
+
veralog-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
3
|
+
veralog-0.1.0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
4
|
+
veralog-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|