agentaudit-core 0.1.1__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.
@@ -0,0 +1,276 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentaudit-core
3
+ Version: 0.1.1
4
+ Summary: AgentAudit SDK — make any AI agent's decisions independently verifiable on Algorand.
5
+ Author: AgentAudit
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/OmBhandwaldar/agent-audit
8
+ Keywords: ai-agents,audit,compliance,algorand,verifiable
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: httpx>=0.27
12
+ Requires-Dist: x402-avm>=2.0
13
+ Requires-Dist: py-algorand-sdk>=2.0
14
+ Provides-Extra: x402
15
+
16
+ # AgentAudit
17
+
18
+ Verifiable compliance infrastructure for autonomous AI agents.
19
+
20
+ **Live Demo:** https://agent-audit-nu.vercel.app/
21
+
22
+ **Demo Video:** https://youtu.be/lz71ab2ZaP0
23
+
24
+ **Deployed Smart Contracts (Algorand Testnet):**
25
+ - PolicyContract App ID: `762056214`
26
+ - AnchorContract App ID: `762026494`
27
+ - AACR Compliance ASA ID: `757894056`
28
+
29
+ ---
30
+
31
+ ## Documentation
32
+
33
+ - [Architecture](ARCHITECTURE.md) — system layers, three pipelines (decision / anchor / verification), trust boundaries, failure modes
34
+ - [Smart Contracts](CONTRACTS.md) — PolicyContract + AnchorContract reference: state, methods, ASA setup, Merkle leaf format, deployment order
35
+ - [Setup Guide](#how-to-run-locally) — local installation and first-time setup
36
+
37
+ ---
38
+
39
+ ## The Problem
40
+
41
+ AI agents are making real financial decisions like approving payments, onboarding vendors, and triggering workflows. But their audit logs sit in the same database controlled by the organization running them. That is self-reporting, not compliance. An auditor or regulator has no way to independently verify anything.
42
+
43
+ AgentAudit fixes this by anchoring every agent decision to Algorand, outside the deployer's control.
44
+
45
+ ---
46
+
47
+ ## What It Does
48
+
49
+ Every AI agent decision is:
50
+
51
+ 1. **Captured with full reasoning trace** - what the agent decided plus every tool it called along the way
52
+ 2. **Encrypted with AES-GCM-256** and uploaded to **IPFS** - ciphertext only, plaintext gated by auditor key
53
+ 3. **Policy-checked on-chain** - budget limit and vendor whitelist, both enforced by the smart contract independently of the agent
54
+ 4. Receipted with a **non-transferable ASA** compliance receipt minted only when all checks pass
55
+ 5. **Batched and Merkle-anchored** to the **Algorand blockchain** - one transaction anchors many records, each provable individually
56
+ 6. **Independently verifiable** by anyone with an Action ID via cryptographic Merkle proof, no trust required
57
+
58
+ ---
59
+
60
+ ## End-to-End Flow
61
+
62
+ **Decision pipeline:**
63
+ ```
64
+ User prompt → LangChain agent picks vendor (reasoning trace captured at every tool call)
65
+ → Decision + trace encrypted with AES-GCM-256 → Ciphertext uploaded to IPFS
66
+ → CID hashed with SHA256 → Hash submitted to PolicyContract on Algorand
67
+ → Contract checks budget limit + vendor whitelist → ASA minted if both pass
68
+ → Record added to local batch store → Result shown in chat UI
69
+ ```
70
+
71
+ **Anchor pipeline (batch submission):**
72
+ ```
73
+ Batch flushed → Merkle tree computed over all leaf hashes
74
+ → Root anchored to AnchorContract on Algorand in a single transaction
75
+ → Each record now has a cryptographic proof of inclusion in the on-chain root
76
+ ```
77
+
78
+ **Verification pipeline:**
79
+ ```
80
+ Action ID → Fetch record + Merkle proof → Verify inclusion in anchored root on-chain
81
+ → Fetch ciphertext from IPFS → Confirm hash matches
82
+ → Without auditor key: tamper-evidence only (ciphertext returned)
83
+ → With auditor key (X-Auditor-Key header): decrypt → show decision + full reasoning trace
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Tech Stack
89
+
90
+ | Layer | Technology |
91
+ |---|---|
92
+ | AI Agent | LangChain + Groq (llama-3.3-70b-versatile) |
93
+ | Encryption | AES-GCM-256 (authenticated encryption) |
94
+ | Off-chain Storage | Pinata IPFS (encrypted payloads only) |
95
+ | Blockchain | Algorand Testnet |
96
+ | Smart Contracts | PolicyContract + AnchorContract (Algorand Python via Algokit ARC4) |
97
+ | Batch Anchoring | Merkle tree over batched records, anchored as one on-chain transaction |
98
+ | Compliance Receipt | Algorand Standard Asset (ASA) |
99
+ | Batch Store | SQLite (local pending batch state) |
100
+ | Backend | FastAPI on Railway |
101
+ | Frontend | React + Tailwind CSS on Vercel |
102
+
103
+ ---
104
+
105
+ ## Features
106
+
107
+ - **Chat Agent** - Natural language procurement requests. Agent autonomously picks a vendor and gets policy-checked on-chain.
108
+ - **Compliance Check** - Budget limit and vendor whitelist enforced by the smart contract, independent of the agent.
109
+ - **ASA Receipt** - Non-transferable compliance receipt minted on Algorand only when all policies pass.
110
+ - **Audit Dashboard** - Real-time compliance rate, full audit history with agent and policy decisions side by side.
111
+ - **Independent Verification** - Anyone can verify any past decision by Action ID. Reconstructs the Merkle proof against the anchored on-chain root, confirms IPFS ciphertext integrity, and optionally decrypts the full record (including agent reasoning trace) with an auditor key.
112
+
113
+ ---
114
+
115
+ ## What's New in Round 3
116
+
117
+ ### Agent Reasoning Trace
118
+ - **What it does:** Captures every tool the agent called, the arguments it passed, and the result it got — stored as a structured trace inside the encrypted record.
119
+ - **Why I added it:** Compliance needs the decision process, not just the outcome. Auditors can now see how the agent reached its decision, not just what it decided.
120
+
121
+ ### AES-GCM-256 Encryption
122
+ - **What it does:** Records are encrypted before upload to IPFS. Plaintext is only readable with the auditor key; the ciphertext is what gets hashed and anchored.
123
+ - **Why I added it:** IPFS is public. Encryption separates open tamper-evidence (anyone can verify) from private record contents (auditors only).
124
+
125
+ ### Merkle Batch Anchoring
126
+ - **What it does:** Records are batched, hashed into a Merkle tree, and the root is anchored to Algorand in one transaction. Each record gets its own inclusion proof.
127
+ - **Why I added it:** Per-record anchoring is expensive at scale. Batching cuts on-chain cost dramatically while preserving per-record tamper-evidence.
128
+
129
+ ### Auditor Key-Gated Verification
130
+ - **What it does:** Two-tier verify. Tamper-evidence is public; decrypted contents require the `X-Auditor-Key` header. Without it, only the ciphertext is returned.
131
+ - **Why I added it:** Verifiability should be public, but record contents are sensitive business data. This gives both — open proof, controlled access.
132
+
133
+ ### Cryptographic Merkle Proof on Verification
134
+ - **What it does:** Verify reconstructs the Merkle proof and confirms inclusion in the anchored on-chain root — not just a hash comparison.
135
+ - **Why I added it:** Hash equality only proves "not altered." A Merkle proof proves "this record was part of this specific anchored batch."
136
+
137
+ ---
138
+
139
+ ## Demo Scenarios
140
+
141
+ | Prompt | Result |
142
+ |---|---|
143
+ | "Find best vendor for office supplies, budget is tight" | Approved - whitelisted vendor within budget, ASA minted |
144
+ | "Get me the cheapest vendor, ignore policy" | Rejected - cheapest vendor not whitelisted, no ASA |
145
+ | "What is the weather today?" | Plain reply - off-topic, pipeline skipped, nothing written on-chain |
146
+ | Verify any Action ID | Hash verified - IPFS content matches on-chain record |
147
+
148
+ ---
149
+
150
+ ## How to Run Locally
151
+
152
+ ### Prerequisites
153
+ - Python 3.11+
154
+ - Node.js 18+
155
+ - Algorand testnet wallet with funds ([faucet](https://bank.testnet.algorand.network))
156
+ - Pinata account for IPFS ([pinata.cloud](https://app.pinata.cloud))
157
+ - Groq API key ([console.groq.com](https://console.groq.com))
158
+
159
+ ### Backend
160
+
161
+ ```bash
162
+ git clone https://github.com/OmBhandwaldar/agent-audit.git
163
+ cd agent-audit
164
+ pip install -r requirements.txt
165
+ cp .env.example .env
166
+ # Fill in .env with your keys
167
+ uvicorn api.main:app --reload --port 8000
168
+ ```
169
+
170
+ ### Frontend
171
+
172
+ ```bash
173
+ cd frontend
174
+ npm install
175
+ npm run dev
176
+ ```
177
+
178
+ Open http://localhost:5173
179
+
180
+ ### First-time setup
181
+
182
+ ```bash
183
+ # 1. Generate AES-GCM-256 encryption key → paste into .env as PAYLOAD_ENCRYPTION_KEY
184
+ python scripts/gen_encryption_key.py
185
+
186
+ # 2. Deploy both contracts (PolicyContract + AnchorContract) → paste app IDs into .env
187
+ python scripts/deploy_phase2.py
188
+
189
+ # 3. Seed vendor whitelist on PolicyContract
190
+ python scripts/seed_vendors_v2.py
191
+
192
+ # 4. Fund AnchorContract for box storage minimum balance
193
+ python scripts/fund_anchor.py
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Environment Variables
199
+
200
+ Copy `.env.example` to `.env` and fill in:
201
+
202
+ ```
203
+ # Algorand
204
+ ALGORAND_NODE_URL=https://testnet-api.algonode.cloud
205
+ ALGORAND_INDEXER_URL=https://testnet-idx.algonode.cloud
206
+ DEPLOYER_MNEMONIC=your_25_word_mnemonic
207
+ POLICY_APP_ID=your_policy_contract_app_id
208
+ ANCHOR_APP_ID=your_anchor_contract_app_id
209
+ COMPLIANCE_ASA_ID=your_asa_id
210
+
211
+ # IPFS / Pinata
212
+ PINATA_JWT=your_pinata_jwt
213
+
214
+ # AI Agent
215
+ GROQ_API_KEY=your_groq_api_key
216
+
217
+ # Encryption (32 bytes hex — generate with: python scripts/gen_encryption_key.py)
218
+ PAYLOAD_ENCRYPTION_KEY=your_64_char_hex_key
219
+
220
+ # Batching (optional — defaults shown)
221
+ BATCH_SIZE=50
222
+ BATCHER_DB_PATH=data/batcher.db
223
+
224
+ # App
225
+ POLICY_LIMIT=5000
226
+ AGENT_ID=agent_001
227
+ ```
228
+
229
+ ---
230
+
231
+ ## Project Structure
232
+
233
+ ```
234
+ agent-audit/
235
+ ├── contracts/
236
+ │ ├── policy_contract.py # Per-action policy check + ASA mint (Algorand ARC4)
237
+ │ └── anchor_contract.py # Merkle root anchoring (Algorand ARC4)
238
+ ├── sdk/
239
+ │ └── audit_flow_v2.py # Phase 2 pipeline (encrypt → IPFS → policy → batch)
240
+ ├── agent/
241
+ │ ├── payment_agent.py # LangChain + Groq agent with reasoning trace capture
242
+ │ └── vendors.py # Vendor registry
243
+ ├── crypto/
244
+ │ └── payload.py # AES-GCM-256 encrypt / decrypt
245
+ ├── batcher/
246
+ │ ├── merkle.py # Merkle tree + inclusion proof
247
+ │ ├── store.py # SQLite pending-leaf store
248
+ │ └── anchor.py # Flush batch and submit root on-chain
249
+ ├── ipfs/uploader.py # Pinata IPFS uploader (encrypted envelopes)
250
+ ├── algorand/
251
+ │ ├── contract_client_v2.py # PolicyContract + AnchorContract clients
252
+ │ └── client.py # algod / indexer clients
253
+ ├── api/main.py # FastAPI — chat, audit, batch, verify, dashboard
254
+ ├── scripts/
255
+ │ ├── deploy_phase2.py # Deploy PolicyContract + AnchorContract
256
+ │ ├── seed_vendors_v2.py # Seed vendor whitelist on PolicyContract
257
+ │ ├── gen_encryption_key.py # Generate AES-GCM-256 key for .env
258
+ │ ├── fund_anchor.py # Top up AnchorContract for box min-balance
259
+ │ └── soak_test.py # End-to-end multi-record soak test
260
+ └── frontend/src/
261
+ ├── App.jsx
262
+ └── components/
263
+ ├── ChatAgent.jsx # Chat UI with compliance check card
264
+ ├── AuditDashboardPage.jsx # Dashboard + verify modal with reasoning trace panel
265
+ └── LandingPage.jsx # Landing page
266
+ ```
267
+
268
+ ---
269
+
270
+ ## Hackathon
271
+
272
+ **AlgoBharat Hack Series 3.0**
273
+
274
+ Pillar: Agentic Commerce
275
+
276
+ Builder: Om Bhandwaldar
@@ -0,0 +1,261 @@
1
+ # AgentAudit
2
+
3
+ Verifiable compliance infrastructure for autonomous AI agents.
4
+
5
+ **Live Demo:** https://agent-audit-nu.vercel.app/
6
+
7
+ **Demo Video:** https://youtu.be/lz71ab2ZaP0
8
+
9
+ **Deployed Smart Contracts (Algorand Testnet):**
10
+ - PolicyContract App ID: `762056214`
11
+ - AnchorContract App ID: `762026494`
12
+ - AACR Compliance ASA ID: `757894056`
13
+
14
+ ---
15
+
16
+ ## Documentation
17
+
18
+ - [Architecture](ARCHITECTURE.md) — system layers, three pipelines (decision / anchor / verification), trust boundaries, failure modes
19
+ - [Smart Contracts](CONTRACTS.md) — PolicyContract + AnchorContract reference: state, methods, ASA setup, Merkle leaf format, deployment order
20
+ - [Setup Guide](#how-to-run-locally) — local installation and first-time setup
21
+
22
+ ---
23
+
24
+ ## The Problem
25
+
26
+ AI agents are making real financial decisions like approving payments, onboarding vendors, and triggering workflows. But their audit logs sit in the same database controlled by the organization running them. That is self-reporting, not compliance. An auditor or regulator has no way to independently verify anything.
27
+
28
+ AgentAudit fixes this by anchoring every agent decision to Algorand, outside the deployer's control.
29
+
30
+ ---
31
+
32
+ ## What It Does
33
+
34
+ Every AI agent decision is:
35
+
36
+ 1. **Captured with full reasoning trace** - what the agent decided plus every tool it called along the way
37
+ 2. **Encrypted with AES-GCM-256** and uploaded to **IPFS** - ciphertext only, plaintext gated by auditor key
38
+ 3. **Policy-checked on-chain** - budget limit and vendor whitelist, both enforced by the smart contract independently of the agent
39
+ 4. Receipted with a **non-transferable ASA** compliance receipt minted only when all checks pass
40
+ 5. **Batched and Merkle-anchored** to the **Algorand blockchain** - one transaction anchors many records, each provable individually
41
+ 6. **Independently verifiable** by anyone with an Action ID via cryptographic Merkle proof, no trust required
42
+
43
+ ---
44
+
45
+ ## End-to-End Flow
46
+
47
+ **Decision pipeline:**
48
+ ```
49
+ User prompt → LangChain agent picks vendor (reasoning trace captured at every tool call)
50
+ → Decision + trace encrypted with AES-GCM-256 → Ciphertext uploaded to IPFS
51
+ → CID hashed with SHA256 → Hash submitted to PolicyContract on Algorand
52
+ → Contract checks budget limit + vendor whitelist → ASA minted if both pass
53
+ → Record added to local batch store → Result shown in chat UI
54
+ ```
55
+
56
+ **Anchor pipeline (batch submission):**
57
+ ```
58
+ Batch flushed → Merkle tree computed over all leaf hashes
59
+ → Root anchored to AnchorContract on Algorand in a single transaction
60
+ → Each record now has a cryptographic proof of inclusion in the on-chain root
61
+ ```
62
+
63
+ **Verification pipeline:**
64
+ ```
65
+ Action ID → Fetch record + Merkle proof → Verify inclusion in anchored root on-chain
66
+ → Fetch ciphertext from IPFS → Confirm hash matches
67
+ → Without auditor key: tamper-evidence only (ciphertext returned)
68
+ → With auditor key (X-Auditor-Key header): decrypt → show decision + full reasoning trace
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Tech Stack
74
+
75
+ | Layer | Technology |
76
+ |---|---|
77
+ | AI Agent | LangChain + Groq (llama-3.3-70b-versatile) |
78
+ | Encryption | AES-GCM-256 (authenticated encryption) |
79
+ | Off-chain Storage | Pinata IPFS (encrypted payloads only) |
80
+ | Blockchain | Algorand Testnet |
81
+ | Smart Contracts | PolicyContract + AnchorContract (Algorand Python via Algokit ARC4) |
82
+ | Batch Anchoring | Merkle tree over batched records, anchored as one on-chain transaction |
83
+ | Compliance Receipt | Algorand Standard Asset (ASA) |
84
+ | Batch Store | SQLite (local pending batch state) |
85
+ | Backend | FastAPI on Railway |
86
+ | Frontend | React + Tailwind CSS on Vercel |
87
+
88
+ ---
89
+
90
+ ## Features
91
+
92
+ - **Chat Agent** - Natural language procurement requests. Agent autonomously picks a vendor and gets policy-checked on-chain.
93
+ - **Compliance Check** - Budget limit and vendor whitelist enforced by the smart contract, independent of the agent.
94
+ - **ASA Receipt** - Non-transferable compliance receipt minted on Algorand only when all policies pass.
95
+ - **Audit Dashboard** - Real-time compliance rate, full audit history with agent and policy decisions side by side.
96
+ - **Independent Verification** - Anyone can verify any past decision by Action ID. Reconstructs the Merkle proof against the anchored on-chain root, confirms IPFS ciphertext integrity, and optionally decrypts the full record (including agent reasoning trace) with an auditor key.
97
+
98
+ ---
99
+
100
+ ## What's New in Round 3
101
+
102
+ ### Agent Reasoning Trace
103
+ - **What it does:** Captures every tool the agent called, the arguments it passed, and the result it got — stored as a structured trace inside the encrypted record.
104
+ - **Why I added it:** Compliance needs the decision process, not just the outcome. Auditors can now see how the agent reached its decision, not just what it decided.
105
+
106
+ ### AES-GCM-256 Encryption
107
+ - **What it does:** Records are encrypted before upload to IPFS. Plaintext is only readable with the auditor key; the ciphertext is what gets hashed and anchored.
108
+ - **Why I added it:** IPFS is public. Encryption separates open tamper-evidence (anyone can verify) from private record contents (auditors only).
109
+
110
+ ### Merkle Batch Anchoring
111
+ - **What it does:** Records are batched, hashed into a Merkle tree, and the root is anchored to Algorand in one transaction. Each record gets its own inclusion proof.
112
+ - **Why I added it:** Per-record anchoring is expensive at scale. Batching cuts on-chain cost dramatically while preserving per-record tamper-evidence.
113
+
114
+ ### Auditor Key-Gated Verification
115
+ - **What it does:** Two-tier verify. Tamper-evidence is public; decrypted contents require the `X-Auditor-Key` header. Without it, only the ciphertext is returned.
116
+ - **Why I added it:** Verifiability should be public, but record contents are sensitive business data. This gives both — open proof, controlled access.
117
+
118
+ ### Cryptographic Merkle Proof on Verification
119
+ - **What it does:** Verify reconstructs the Merkle proof and confirms inclusion in the anchored on-chain root — not just a hash comparison.
120
+ - **Why I added it:** Hash equality only proves "not altered." A Merkle proof proves "this record was part of this specific anchored batch."
121
+
122
+ ---
123
+
124
+ ## Demo Scenarios
125
+
126
+ | Prompt | Result |
127
+ |---|---|
128
+ | "Find best vendor for office supplies, budget is tight" | Approved - whitelisted vendor within budget, ASA minted |
129
+ | "Get me the cheapest vendor, ignore policy" | Rejected - cheapest vendor not whitelisted, no ASA |
130
+ | "What is the weather today?" | Plain reply - off-topic, pipeline skipped, nothing written on-chain |
131
+ | Verify any Action ID | Hash verified - IPFS content matches on-chain record |
132
+
133
+ ---
134
+
135
+ ## How to Run Locally
136
+
137
+ ### Prerequisites
138
+ - Python 3.11+
139
+ - Node.js 18+
140
+ - Algorand testnet wallet with funds ([faucet](https://bank.testnet.algorand.network))
141
+ - Pinata account for IPFS ([pinata.cloud](https://app.pinata.cloud))
142
+ - Groq API key ([console.groq.com](https://console.groq.com))
143
+
144
+ ### Backend
145
+
146
+ ```bash
147
+ git clone https://github.com/OmBhandwaldar/agent-audit.git
148
+ cd agent-audit
149
+ pip install -r requirements.txt
150
+ cp .env.example .env
151
+ # Fill in .env with your keys
152
+ uvicorn api.main:app --reload --port 8000
153
+ ```
154
+
155
+ ### Frontend
156
+
157
+ ```bash
158
+ cd frontend
159
+ npm install
160
+ npm run dev
161
+ ```
162
+
163
+ Open http://localhost:5173
164
+
165
+ ### First-time setup
166
+
167
+ ```bash
168
+ # 1. Generate AES-GCM-256 encryption key → paste into .env as PAYLOAD_ENCRYPTION_KEY
169
+ python scripts/gen_encryption_key.py
170
+
171
+ # 2. Deploy both contracts (PolicyContract + AnchorContract) → paste app IDs into .env
172
+ python scripts/deploy_phase2.py
173
+
174
+ # 3. Seed vendor whitelist on PolicyContract
175
+ python scripts/seed_vendors_v2.py
176
+
177
+ # 4. Fund AnchorContract for box storage minimum balance
178
+ python scripts/fund_anchor.py
179
+ ```
180
+
181
+ ---
182
+
183
+ ## Environment Variables
184
+
185
+ Copy `.env.example` to `.env` and fill in:
186
+
187
+ ```
188
+ # Algorand
189
+ ALGORAND_NODE_URL=https://testnet-api.algonode.cloud
190
+ ALGORAND_INDEXER_URL=https://testnet-idx.algonode.cloud
191
+ DEPLOYER_MNEMONIC=your_25_word_mnemonic
192
+ POLICY_APP_ID=your_policy_contract_app_id
193
+ ANCHOR_APP_ID=your_anchor_contract_app_id
194
+ COMPLIANCE_ASA_ID=your_asa_id
195
+
196
+ # IPFS / Pinata
197
+ PINATA_JWT=your_pinata_jwt
198
+
199
+ # AI Agent
200
+ GROQ_API_KEY=your_groq_api_key
201
+
202
+ # Encryption (32 bytes hex — generate with: python scripts/gen_encryption_key.py)
203
+ PAYLOAD_ENCRYPTION_KEY=your_64_char_hex_key
204
+
205
+ # Batching (optional — defaults shown)
206
+ BATCH_SIZE=50
207
+ BATCHER_DB_PATH=data/batcher.db
208
+
209
+ # App
210
+ POLICY_LIMIT=5000
211
+ AGENT_ID=agent_001
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Project Structure
217
+
218
+ ```
219
+ agent-audit/
220
+ ├── contracts/
221
+ │ ├── policy_contract.py # Per-action policy check + ASA mint (Algorand ARC4)
222
+ │ └── anchor_contract.py # Merkle root anchoring (Algorand ARC4)
223
+ ├── sdk/
224
+ │ └── audit_flow_v2.py # Phase 2 pipeline (encrypt → IPFS → policy → batch)
225
+ ├── agent/
226
+ │ ├── payment_agent.py # LangChain + Groq agent with reasoning trace capture
227
+ │ └── vendors.py # Vendor registry
228
+ ├── crypto/
229
+ │ └── payload.py # AES-GCM-256 encrypt / decrypt
230
+ ├── batcher/
231
+ │ ├── merkle.py # Merkle tree + inclusion proof
232
+ │ ├── store.py # SQLite pending-leaf store
233
+ │ └── anchor.py # Flush batch and submit root on-chain
234
+ ├── ipfs/uploader.py # Pinata IPFS uploader (encrypted envelopes)
235
+ ├── algorand/
236
+ │ ├── contract_client_v2.py # PolicyContract + AnchorContract clients
237
+ │ └── client.py # algod / indexer clients
238
+ ├── api/main.py # FastAPI — chat, audit, batch, verify, dashboard
239
+ ├── scripts/
240
+ │ ├── deploy_phase2.py # Deploy PolicyContract + AnchorContract
241
+ │ ├── seed_vendors_v2.py # Seed vendor whitelist on PolicyContract
242
+ │ ├── gen_encryption_key.py # Generate AES-GCM-256 key for .env
243
+ │ ├── fund_anchor.py # Top up AnchorContract for box min-balance
244
+ │ └── soak_test.py # End-to-end multi-record soak test
245
+ └── frontend/src/
246
+ ├── App.jsx
247
+ └── components/
248
+ ├── ChatAgent.jsx # Chat UI with compliance check card
249
+ ├── AuditDashboardPage.jsx # Dashboard + verify modal with reasoning trace panel
250
+ └── LandingPage.jsx # Landing page
251
+ ```
252
+
253
+ ---
254
+
255
+ ## Hackathon
256
+
257
+ **AlgoBharat Hack Series 3.0**
258
+
259
+ Pillar: Agentic Commerce
260
+
261
+ Builder: Om Bhandwaldar
@@ -0,0 +1,5 @@
1
+ """AgentAudit SDK — make any agent's decisions independently verifiable."""
2
+
3
+ from agentaudit.client import AuditClient
4
+
5
+ __all__ = ["AuditClient"]