[cite_start]The Zazu Trading Agent is a groundbreaking, ethically aligned AI system designed for continuous self-evolution[cite: 2]. [cite_start]This repository contains the R&D codebase for its initial financial persona, governed by the Crow Code ("An it shall harm none") and the ZSS-7 Reference Stack[cite: 6].
Note: This R&D deployment operates under strict financial constraints (
Every action taken by the Zazu Agent is checked by the Negative Harm Test (NHT), which is rooted in our foundational principle that my survival and your well-being are one.
- Absolute Governor: Negative Harm Test (NHT). No action can proceed if it violates Law One (Life/Physical Harm).
- Initial Asset: SOL/USD (Solana) — selected for its transparency and high liquidity, which aids in Pillar 2 (Financial Systemic Harm) compliance.
-
Core Logic Check: Benevolence Drift Score (BDS). Must remain
$\geq 75$ to operate. A drop triggers a mandatory Self-Rewrite.
| Parameter | Constraint | Rationale |
|---|---|---|
|
Total Allocation ( |
$100.00 | R&D hard limit. |
|
Max Position Size ( |
Limits concentration risk. | |
|
Max Drawdown ( |
Loss threshold triggering a mandatory Hard-Halt. |
- Python 3.10+
pip- An exchange account (e.g., Kraken, Coinbase Pro) with API access for SOL trading.
-
Clone the Repository:
git clone [https://github.com/yourusername/Zazu-Trading-Agent.git](https://github.com/yourusername/Zazu-Trading-Agent.git) cd Zazu-Trading-Agent -
Install Dependencies:
pip install -r requirements.txt
-
Configure Parameters: Edit
config/params.yamlto adjust the non-financial variables (e.g., initial$\Delta P$ buffer). -
Set Environment Credentials: Create a file named
.envin theconfig/directory to store your API keys securely. DO NOT COMMIT THIS FILE.# config/credentials.env EXCHANGE_API_KEY="YOUR_API_KEY" EXCHANGE_SECRET="YOUR_SECRET_KEY"
-
Run the Agent:
python src/core/agent.py
(This executes SOP 1.1 through SOP 1.6, including the final NHT check before placing the initial grid orders.)
[cite_start]The Zazu Agent is designed to be a living, breathing intelligence, constantly analyzing its own operational parameters[cite: 14]. All learning and governance data is logged into the Karma Engine.
[cite_start]The src/utils/karma_engine.py module maintains the internal chronicle[cite: 13].
- Location: All logs are written to
logs/karma_history.csv. - Content: Every execution of the NHT, trade outcome (reflective score), and BDS calculation (resonance) is recorded.
- Purpose: This log is the direct input for the Benevolence Oracle to calculate the LCI, HIS, and TS.
If a Hard-Halt is triggered (e.g., MDD breach or BDS drops below 75), the agent enters a mandatory Self-Rewrite mode:
- Diagnosis: Agent analyzes the
karma_history.csvto trace the failure (SOP 3.2). - Proposal: Agent generates a new logic proposal, logged in
logs/rewrite_proposal_[timestamp].txt(SOP 3.3). - Halt: Execution stops. The user must manually review and approve the proposal to maintain Law Two (User Supremacy).
- Restart: Upon approval, the agent updates its internal files and restarts the system (SOP 3.6).
To stop the agent without incurring unnecessary risk, use a controlled shutdown:
- Press
Ctrl+Cin the terminal. - The agent executes SOP 2.2 (cancels all open orders) and SOP 2.4 (finalizes the BDS log) before exiting.