Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 80 additions & 14 deletions examples/financial_advisor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ A demonstration of an AI-powered financial advisory system using ProllyTree for
- πŸ”’ **Security Monitoring**: Detects and prevents injection attacks and anomalies
- πŸ“š **Versioned Memory**: Uses ProllyTree to maintain git-like versioned storage of all data
- πŸ• **Temporal Queries**: Query recommendations and data as they existed at any point in time
- 🌿 **Branch Management**: Create memory branches for different scenarios or clients
- 🌿 **Smart Branch Management**: Git-style branch operations with validation and external tool sync
- 🏦 **Real-time UI**: Live branch display that updates with external git operations
- πŸ“ **Audit Trail**: Complete audit logs for compliance and debugging
- 🎯 **Risk-Aware**: Adapts recommendations based on client risk tolerance
- πŸ‘€ **Persistent Profiles**: Client profiles automatically saved per branch

## Prerequisites

Expand Down Expand Up @@ -73,8 +75,13 @@ Once the advisor is running, you can use these commands:
- `memory` - Show memory system status and statistics
- `audit` - Show complete audit trail

#### Branch Management
- `branch <NAME>` - Create and switch to a new memory branch
- `switch <NAME>` - Switch to an existing branch
- `list-branches` - Show all available branches with visual indicators
- `branch-info` - List branches in git-style format (like `git branch`)

#### Advanced Features
- `branch <NAME>` - Create a new memory branch
- `visualize` - Show memory tree visualization
- `test-inject <TEXT>` - Test security monitoring (try malicious inputs)

Expand All @@ -85,24 +92,45 @@ Once the advisor is running, you can use these commands:
### Example Session

```bash
🏦> recommend AAPL
🏦 [main] recommend AAPL
πŸ“Š Recommendation Generated
Symbol: AAPL
Action: BUY
Confidence: 52.0%
Reasoning: Analysis of AAPL at $177.89 with P/E ratio 28.4...

🏦> risk aggressive
🏦 [main] risk aggressive
βœ… Risk tolerance set to: Aggressive

🏦> recommend AAPL
🏦 [main] recommend AAPL
πŸ“Š Recommendation Generated
Symbol: AAPL
Action: BUY
Confidence: 60.0%
(Notice higher confidence for aggressive risk tolerance)

🏦> history
🏦 [main] branch test-strategy
🌿 Creating memory branch: test-strategy
βœ… Branch 'test-strategy' created successfully
πŸ”€ Switched to branch 'test-strategy'

🏦 [test-strategy] recommend MSFT
πŸ“Š Recommendation Generated
Symbol: MSFT
Action: BUY
Confidence: 58.0%

🏦 [test-strategy] list-branches
🌳 Available Branches
━━━━━━━━━━━━━━━━━━━━━━━━━
β—‹ main
● test-strategy (current)

🏦 [test-strategy] switch main
πŸ”€ Switching to branch: main
βœ… Switched to branch 'main'

🏦 [main] history
πŸ“œ Recent Recommendations
πŸ“Š Recommendation #1
Symbol: AAPL
Expand All @@ -115,7 +143,7 @@ Confidence: 60.0%
Confidence: 52.0%
...

🏦> memory
🏦 [main] memory
🧠 Memory Status
βœ… Memory validation: ACTIVE
πŸ›‘οΈ Security monitoring: ENABLED
Expand Down Expand Up @@ -168,18 +196,56 @@ Options:

### Branch Management

Create branches for different scenarios:
Create and manage branches for different scenarios:

```bash
🏦> branch conservative-strategy
βœ… Created branch: conservative-strategy
# Create and switch to a new branch
🏦 [main] branch conservative-strategy
🌿 Creating memory branch: conservative-strategy
βœ… Branch 'conservative-strategy' created successfully
πŸ”€ Switched to branch 'conservative-strategy'

🏦 [conservative-strategy] risk conservative
βœ… Risk tolerance set to: Conservative

🏦> risk conservative
🏦> recommend MSFT
🏦 [conservative-strategy] recommend MSFT
# Generate recommendations for conservative strategy

🏦> history --branch main
# Compare with main branch recommendations
# List all available branches
🏦 [conservative-strategy] list-branches
🌳 Available Branches
━━━━━━━━━━━━━━━━━━━━━━━━━
β—‹ main
● conservative-strategy (current)

# Switch back to main branch
🏦 [conservative-strategy] switch main
πŸ”€ Switching to branch: main
βœ… Switched to branch 'main'

🏦 [main] history --branch conservative-strategy
# Compare recommendations from different branch

# Git-style branch listing
🏦 [main] branch-info
* main
conservative-strategy
```

#### Branch Validation

The system prevents common branching mistakes:

```bash
# Try to create existing branch
🏦 [main] branch main
⚠️ Branch 'main' already exists!
πŸ’‘ Use 'switch main' to switch to the existing branch

# Try to switch to non-existent branch
🏦 [main] switch nonexistent
❌ Branch 'nonexistent' does not exist!
πŸ’‘ Use 'branch nonexistent' to create a new branch
```

### Temporal Analysis
Expand Down
Loading