# Project export: Agent Santa

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 12.0
- Tagline: Agent Santa is a multi-agent system where personality-based agents connect, understand relationships, and deliver perfect personalized gifts end-to-end with payments, intelligently and effortlessly.
- Devpost: https://devpost.com/software/agent-santa
- GitHub: https://github.com/ParthPatel00/SantAI
- Video: https://www.youtube.com/embed/QHjqIXtylhY?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Result: winner (Fetch AI: Best Use of ASI:One)
- Team: 3 GitHub contributor(s) — Parth Patel (16 commits), Devam Sheth (6 commits), Sakshi Tripathy (4 commits)

## Devpost submission (written by the team)

### Inspiration

We realized how often people struggle with gifting — not because they lack affection, but because they lack understanding of what would genuinely delight someone. Remembering birthdays, choosing meaningful gifts, and keeping surprises intact can become overwhelming. That’s what inspired Agent Santa — an autonomous gifting ecosystem where agents know you, understand you, and gift like you would. Our idea began with a simple thought: “What if your AI could talk to your friend’s AI and decide the perfect gift — all by itself?” This curiosity led us into the world of multi-agent systems, Fetch.ai’s Agentverse, and ASI.one, where we turned that thought into a working system.

### What it does

Agent Santa consists of four main components: Personality Agents – autonomous representations of each user, powered by Grok-LLaMA. These agents store our interests, preferences, and traits, and can communicate with each other. Agent Santa (Gifting Agent) – the core orchestrator deployed on Agentverse. It queries personality agents, understands who the recipient is, and suggests personalized gifts. Shopping & Comparison Engine – built into the gifting agent to evaluate multiple options, compare prices, and pick the best choice. Payment Layer – simulates secure transactions to complete the gifting process end-to-end. A typical interaction looks like this: User Request on ASI.one→Agent Santa→Recipient Personality Agent→Gift Suggestion + Payment

### How we built it

Framework: uAgents on Fetch.ai Deployment: Fully on Agentverse with seamless integration via ASI.one LLM Backbone: Grok-LLaMA, for reasoning and contextual understanding Architecture: Event-driven, asynchronous message passing between agents using defined protocols Workflow: User prompts on ASI.one →Agent Santa identified as best gifting agent →Queries personality agent for metadata →Runs LLaMA reasoning for suggestions →Compares, finalizes, and simulates secure checkout.

### Challenges we ran into

-Establishing cross-communication between ASI.one personality agents and Agentverse-hosted agents. -Overcoming protocol mismatches (chat protocol vs. custom message protocol). -Managing offline agent availability and mailbox configurations. -Designing an end-to-end pipeline that includes reasoning, recommendation, and simulated payment within Fetch.ai’s decentralized ecosystem. -Coordinating multiple LLaMA-powered agents while keeping the interaction smooth and contextually consistent.

### Accomplishments we're proud of

End-to-End Autonomous Gifting Flow We successfully built a fully functional multi-agent ecosystem where a user can simply say, “Gift something to Devam for his birthday,” and the agents handle the entire pipeline — from understanding the relationship → fetching personality data → reasoning gift ideas → comparing products → to completing payment — entirely autonomously. This demonstrates the real-world viability of autonomous AI-to-AI collaboration on Fetch.ai’s Agentverse. Cross-Agent Personality Collaboration Each of our Personality Agents can interact, exchange metadata, and understand other users’ preferences — making every gifting decision deeply personalized and socially aware. This was a breakthrough moment: realizing our agents could “know” each other, form friendships, and build trust networks — a microcosm of human-like social intelligence in an AI ecosystem. LLaMA-Powered Reasoning Layer Integrating Grok-LLaMA into every agent gave them contextual intelligence — letting them reason about personality traits, occasions, and sentiment before recommending gifts. The result: contextual empathy — an AI that doesn’t just recommend, but understands why. Seamless Integration of ASI.one and Agentverse We bridged two ecosystems — ASI.one and Agentverse — allowing users to interact naturally through ASI.one, while all autonomous logic ran on Agentverse. This fusion of human-facing interface and agent-facing intelligence is one of the first demonstrations of its kind. End-to-End Payment Simulation Our gifting agent doesn’t stop at recommendations — it carries out the final payment step securely. This creates a truly closed-loop automation pipeline, showcasing how Fetch.ai agents can complete complex, multi-step tasks without human intervention. Vision Expansion Beyond Gifting During development, we discovered that Personality Agents could go beyond gifting — acting as AI versions of us that can represent us online, interact with recruiters, and communicate our personalities authentically. That realization expanded our project’s purpose — from gifting to digital identity representation — a concept we’re incredibly proud to pioneer. Ranked Among Top Agents on ASI.one Our SantaAI agent achieved top ranking in the gifting category on ASI.one, validating both the performance and relevance of our idea in Fetch.ai’s growing ecosystem.

### What we learned

-The power of decentralized AI agents — how independent entities can collaborate without central control. -The importance of protocol design for reliable agent-to-agent communication. -LLM integration in reasoning workflows for context-aware decision making. -The subtle but crucial difference between social collaboration on ASI.one and runtime reachability on Agentverse. -How autonomous systems can move beyond automation into human-level social intelligence.

### What's next

Agent Santa started as a gifting agent — but it opened a doorway to something much bigger: A future where personality-driven agents represent humans authentically — helping others know, connect, and interact with us without barriers. From surprise gifting to AI-based networking and identity representation, Agent Santa marks a step toward the next generation of socially intelligent AI ecosystems.

## README (from the GitHub repository)

# 🎁 Santa Agent - The Ultimate Gift Recommendation System

**Agent Santa uses AI agents to find perfect gifts by asking your friends' personal AI what they actually want.**

Santa Agent revolutionizes gift-giving by connecting with your friends' personal AI agents to understand their true preferences, then finding real Amazon products that match perfectly. No more guessing games or generic gifts - just thoughtful, personalized recommendations every time.

## 🌟 What Makes Santa Agent Special?

### 🤖 **Revolutionary Agent-to-Agent Communication**

Santa Agent doesn't just guess what someone might like - it **actually asks their personal AI agent**! When you want to buy a gift for a friend, Santa Agent connects directly with their AI agent to learn about their personality, interests, and preferences in real-time.

### 🎯 **Perfect Gift Discovery**

- **Real-time preference learning** from your friends' AI agents
- **Live Amazon product search** with current prices and availability
- **Personalized recommendations** based on actual personality data
- **Instant gift suggestions** with direct purchase links

### 💡 **The Value You Get**

- **Never buy the wrong gift again** - AI agents know your friends better than you do
- **Save hours of research** - instant personalized recommendations
- **Discover unique gifts** - AI finds products you'd never think of
- **Perfect for any occasion** - birthdays, anniversaries, holidays, or just because

## 🚀 How It Works - The Magic Behind Santa Agent

### **Step 1: You Request a Gift**

Simply type: _"I want to buy a gift for Parth"_ or _"Find a gift for my friend Devam"_

### **Step 2: AI Agents Connect**

Santa Agent automatically reaches out to your friend's personal AI agent and asks:

- _"What's Parth's personality like?"_
- _"What kind of gifts would Parth enjoy?"_

### **Step 3: Real-Time Learning**

Your friend's AI agent responds with detailed insights about their personality and gift preferences.

### **Step 4: Smart Gift Search**

Santa Agent uses this information to search Amazon for products that perfectly match your friend's interests and personality.

### **Step 5: Perfect Recommendations**

You receive a curated list of real Amazon products with prices, descriptions, and direct purchase links.

## 🎯 Real Examples - See Santa Agent in Action

### **Example 1: Birthday Gift for Your Adventurous Friend**

```
You: "I need a gift for Parth's birthday"

Santa Agent: "🎁 Getting gift recommendations for Parth..."

[Connects to Parth's AI agent]

Parth's AI: "Parth loves outdoor sports, adventure gear, and fitness equipment.
He enjoys high-energy activities and competitive environments."

Santa Agent: "🎁 Gift Recommendations for Parth

Based on preferences: Outdoor sports, adventure gear, fitness equipment...

Recommended Gifts:
1. GoPro HERO12 Action Camera - $399.99
   Professional 4K video recording for adventures
   [View on Amazon](https://amazon.com/...)

2. Garmin Fenix 7 GPS Smartwatch - $699.99
   Advanced fitness tracking for outdoor activities
   [View on Amazon](https://amazon.com/...)

3. Patagonia Hiking Backpack - $149.99
   Durable gear for outdoor adventures
   [View on Amazon](https://amazon.com/...)"
```

### **Example 2: Anniversary Gift for Your Creative Partner**

```
You: "Find something special for Sakshi's anniversary"

Santa Agent: "🎁 Getting gift recommendations for Sakshi..."

[Connects to Sakshi's AI agent]

Sakshi's AI: "Sakshi is artistic, loves handmade crafts, and enjoys
creative tools. She values unique, thoughtful gifts."

Santa Agent: "🎁 Gift Recommendations for Sakshi

Based on preferences: Artistic, handmade crafts, creative tools...

Recommended Gifts:
1. Professional Art Supply Set - $89.99
   High-quality paints, brushes, and canvases
   [View on Amazon](https://amazon.com/...)

2. Handmade Ceramic Vase - $45.99
   Unique artisan-crafted home decor
   [View on Amazon](https://amazon.com/...)

3. Creative Writing Journal Set - $29.99
   Beautiful notebooks for artistic expression
   [View on Amazon](https://amazon.com/...)"
```

## 🔥 Why Agent-to-Agent Communication Changes Everything

### **Traditional Gift Shopping Problems:**

- ❌ **Guessing games** - You don't really know what they want
- ❌ **Generic gifts** - Same old boring presents
- ❌ **Wasted money** - Buying things they'll never use
- ❌ **Time consuming** - Hours of research for mediocre results

### **Santa Agent's Agent-to-Agent Solution:**

- ✅ **Direct insight** - Their AI agent knows them better than anyone
- ✅ **Personalized discovery** - Gifts that match their true personality
- ✅ **Smart spending** - Every purchase is a perfect match
- ✅ **Instant results** - Get recommendations in seconds, not hours

## 🎁 Perfect for Every Occasion

### **Birthday Gifts**

- Personalized recommendations based on their AI agent's personality insights
- Age-appropriate and interest-specific gift suggestions
- Budget-friendly options from $20 to $500+

### **Anniversary Presents**

- Romantic and thoughtful gifts that show you really know them
- Unique items that reflect their personal interests
- Special occasion upgrades and luxury options

### **Holiday Shopping**

- Christmas, Hanukkah, and other holiday gift ideas
- Bulk gift recommendations for multiple friends
- Seasonal and themed present suggestions

### **Just Because Gifts**

- Surprise your friends with unexpected thoughtful presents
- Random acts of kindness with perfectly chosen gifts
- Celebration gifts for achievements and milestones

## 🚀 Getting Started - It's Incredibly Easy

### **1. Start Shopping**

Simply type: _"gift [friend's name]"_ and watch the magic happen!

### **2. Get Perfect Recommendations**

Receive personalized gift suggestions with real Amazon products, prices, and purchase links.

## 🔍 SEO Keywords & Search Optimization

**Primary Keywords:**

- gift recommendation system
- AI gift finder
- personalized gift suggestions
- smart gift shopping
- automated gift discovery
- AI-powered gift recommendations
- intelligent gift matching
- personalized present finder

**Long-tail Keywords:**

- "find perfect gift for friend"
- "AI gift recommendation engine"
- "personalized birthday gift ideas"
- "smart gift shopping assistant"
- "automated gift discovery tool"
- "AI-powered present finder"
- "intelligent gift matching system"
- "personalized anniversary gifts"

**Use Cases & Intent Keywords:**

- "looking for gifts online"
- "need gift ideas for boyfriend"
- "best gifts for girlfriend"
- "unique gift recommendations"
- "thoughtful present ideas"
- "gift shopping made easy"
- "AI gift assistant"
- "smart gift finder"

## 🌟 The Future of Gift-Giving

Santa Agent represents the future of personalized shopping, where AI agents work together to create perfect gift experiences. No more generic presents or wasted money - just thoughtful, personalized gifts that show you truly care.

**Ready to revolutionize your gift-giving?** Start using Santa Agent today and never buy the wrong gift again!

---

**Built with ❤️ for CalHacks 2025 - Where AI meets human connection**

_Transform every gift into a perfect moment of joy and connection._


## Detected evidence (automated analysis)

Indexed codebase: 31 recognized source files, 247 KB.
- FastAPI (technology) — detected in the code
- HTML (language) — detected in the code
- Python (language) — detected in the code
- Vercel (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (39 of 39)

```
.gitignore
create_swagger_test.py
demo_santai_payment.py
deploy_asi_one.py
deploy_with_payment.py
Gift-expert/__init__.py
Gift-expert/.gitignore
Gift-expert/agent.py
Gift-expert/command.txt
Gift-expert/conversation_flow.py
Gift-expert/env_template.txt
Gift-expert/friend_interface.py
Gift-expert/global_memory.py
Gift-expert/global_parameters.py
Gift-expert/llm_service.py
Gift-expert/models.py
Gift-expert/README.md
Gift-expert/REAL_AGENT_COMMUNICATION.md
Gift-expert/requirements.txt
Gift-expert/shopping_agent_interface.py
Gift-expert/test_api.py
payment_server.py
payment_service.py
personality-agents/__init__.py
personality-agents/agent_devam.py
personality-agents/agent_parth.py
personality-agents/agent_sakshi.py
personality-agents/env_template.txt
personality-agents/personality_demo.py
personality-agents/README.md
personality-agents/requirements.txt
README_Payment_Feature.md
README_Payment_Integration.md
README_Swagger_UI.md
README.md
requirements.txt
templates/index.html
templates/payment_success.html
test_payment_feature.py
```

### Dependencies

- Gift-expert/requirements.txt: aiohappyeyeballs@==2.6.1, aiohttp@==3.13.1, aiosignal@==1.4.0, annotated-doc@==0.0.3, annotated-types@==0.7.0, anyio@==4.11.0, attrs@==25.4.0, bcrypt@==5.0.0, bech32@==1.2.0, certifi@==2025.10.5, cffi@==2.0.0, charset-normalizer@==3.4.4, click@==8.3.0, colorama@==0.4.6, cosmpy@==0.11.2, distlib@==0.4.0, distro@==1.9.0, ecdsa@==0.19.1, fastapi@==0.120.0, filelock@==3.20.0, frozenlist@==1.8.0, googleapis-common-protos@==1.71.0, groq@==0.33.0, grpcio@==1.76.0, h11@==0.16.0, httpcore@==1.0.9, httpx@==0.28.1, idna@==3.11, jsonschema@==4.25.1, jsonschema-specifications@==2025.9.1, multidict@==6.7.0, platformdirs@==4.5.0, propcache@==0.4.1, protobuf@==5.29.5, pycparser@==2.23, pycryptodome@==3.23.0, pydantic@==2.12.3, pydantic_core@==2.41.4, PyNaCl@==1.6.0, python-dateutil@==2.9.0.post0, python-dotenv@==1.1.1, referencing@==0.37.0, requests@==2.32.5, rpds-py@==0.28.0, six@==1.17.0, sniffio@==1.3.1, sortedcontainers@==2.4.0, starlette@==0.48.0, typing_extensions@==4.15.0, typing-inspection@==0.4.2, uagents@==0.22.10, uagents-core@==0.3.11, urllib3@==2.5.0, uvicorn@==0.38.0, virtualenv@==20.35.3, yarl@==1.22.0
- personality-agents/requirements.txt: groq@>=0.4.0, python-dotenv@>=1.0.0, uagents@>=0.4.0, uagents-core@>=0.3.11
- requirements.txt: aiohappyeyeballs@>=2.6.1, aiohttp@>=3.13.1, aiosignal@>=1.4.0, annotated-doc@>=0.0.3, annotated-types@>=0.7.0, anyio@>=4.11.0, attrs@>=25.4.0, bcrypt@>=5.0.0, bech32@>=1.2.0, certifi@>=2025.10.5, cffi@>=2.0.0, charset-normalizer@>=3.4.4, click@>=8.3.0, colorama@>=0.4.6, cosmpy@>=0.11.2, cryptography@>=3.4.8, distlib@>=0.4.0, distro@>=1.9.0, ecdsa@>=0.19.1, fastapi@>=0.104.0, fido2@>=1.1.0, filelock@>=3.20.0, frozenlist@>=1.8.0, googleapis-common-protos@>=1.71.0, groq@>=0.4.0, grpcio@>=1.76.0, h11@>=0.16.0, httpcore@>=1.0.9, httpx@>=0.28.0, idna@>=3.11, jinja2@>=3.1.0, jsonschema@>=4.25.1, jsonschema-specifications@>=2025.9.1, multidict@>=6.7.0, platformdirs@>=4.5.0, propcache@>=0.4.1, protobuf@>=5.29.5, pycparser@>=2.23, pycryptodome@>=3.23.0, pydantic@>=2.12.0, pydantic_core@>=2.41.4, PyNaCl@>=1.6.0, python-dateutil@>=2.9.0, python-dotenv@>=1.0.0, referencing@>=0.37.0, requests@>=2.32.5, rpds-py@>=0.28.0, six@>=1.17.0, sniffio@>=1.3.1, sortedcontainers@>=2.4.0, starlette@>=0.48.0, stripe@>=7.0.0, typing_extensions@>=4.15.0, typing-inspection@>=0.4.2, uagents@>=0.4.0, uagents-core@>=0.3.11, urllib3@>=2.5.0, uvicorn@>=0.24.0, virtualenv@>=20.35.3, yarl@>=1.22.0

### Recent commits (newest first)

- Revise README for Santa Agent branding and features
- Fix HTML template title and content formatting
- Remove curly braces from price display
- Merge branch 'main' of https://github.com/ParthPatel00/SantAI
- Update payment templates
- Change form method to uppercase 'GET'
- Change payment form method from POST to GET
- Update payment form action URL to absolute path
- Change payment form action URL to payment_success.html
- Rename payment.html to index.html and update references
- Add SantAI Payment Integration with Swagger UI
- Merge pull request #4 from ParthPatel00/devam-test
- added personality agents
- Merge branch 'main' of https://github.com/ParthPatel00/SantAI
- Completed functionalit of friend gifts
- Adding friend gift functionality, almost there
- Merge pull request #3 from ParthPatel00/parth
- trying to establish inter-agent communication
- Category recommendation works, Amazon API authentication does not
- Merge pull request #2 from ParthPatel00/devam-test

## Key source files (fetched from GitHub, selected and truncated for size)

### README_Payment_Feature.md

```markdown
 
```

### README_Swagger_UI.md

```markdown
# 🔍 SantAI Payment Gateway - Swagger UI

## 🎯 **Swagger UI Access**

Your SantAI Payment Gateway now includes **Swagger UI** for interactive API documentation and testing!

### 📋 **Access URLs**

- **Swagger UI**: http://localhost:8001/docs
- **ReDoc**: http://localhost:8001/redoc
- **Health Check**: http://localhost:8001/health

## 🚀 **Getting Started**

1. **Start the Payment Server**:
   ```bash
   python payment_server.py
   ```

2. **Open Swagger UI**: Navigate to http://localhost:8001/docs in your browser

3. **Explore the API**: You'll see all available endpoints with detailed documentation

## 🔧 **Available Endpoints**

### **HTML Endpoints** (User Interface)
- `GET /payment/{payment_id}` - Display Stripe-style checkout page
- `POST /process-payment/{payment_id}` - Process payment and redirect
- `GET /payment-success/{payment_id}` - Show order confirmation page

### **API Endpoints** (JSON Responses)
- `GET /api/payment/{payment_id}` - Get payment request details
- `POST /api/process-payment/{payment_id}` - Process payment via API
- `GET /health` - Health check endpoint

## 🧪 **Testing with Swagger UI**

### **Step 1: Create a Test Payment**
```bash
python create_swagger_test.py
```

This will generate a payment ID you can use for testing.

### **Step 2: Test in Swagger UI**

1. **Open** http://localhost:8001/docs
2. **Expand** any endpoint (click on it)
3. **Click** "Try it out"
4. **Enter** the payment ID from step 1
5. **Click** "Execute"
6. **View** the response

### **Step 3: Test All Endpoints**

Try these endpoints in order:

1. **Health Check** (`GET /health`)
   - No parameters needed
   - Should return: `{"status":"healthy","service":"SantAI Payment Gateway"}`

2. **Get Payment Request** (`GET /api/payment/{payment_id}`)
   - Use the payment ID from `create_swagger_test.py`
   - Returns payment details in JSON format

3. **Process Payment** (`POST /api/process-payment/{payment_id}`)
   - Use the same payment ID
   - Returns transaction details

## 🎨 **Swagger UI Features**

### **Interactive Documentation**
- **Try it out**: Test endpoints directly in the browser
- **Request/Response Examples**: See expected data formats
- **Parameter Descriptions**: Understand what each parameter does
- **Response Codes**: See all possible response types

### **API Models**
- **PaymentRequestModel**: Structure of payment request data
- **PaymentResponseModel**: Structure of payment response data
- **HealthResponseModel**: Structure of health check response

### **Example Data**
All endpoints include example data:
- Payment ID: `abc123-def456-ghi789`
- Gift Name: `Wireless Bluetooth Headphones`
- Price: `$79.99`
- Transaction ID: `txn_a5e9de06`

## 🔍 **API Documentation Details**

### **Payment Request Model**
```json
{
  "payment_id": "abc123-def456-ghi789",
  "gift_id": "gift_001",
  "gift_name": "Wireless Bluetooth Headphones",
  "price": "$79.99",
  "description": "High-quality wireless headphones with noise cancellation",
  "user_id
[truncated — 1083 more characters]
```

### requirements.txt

```
# SantAI Project - Combined Requirements
# This file combines dependencies from all SantAI agents and services

# =============================================================================
# CORE FRAMEWORK DEPENDENCIES
# =============================================================================

# uAgent framework (core)
uagents>=0.4.0
uagents-core>=0.3.11

# =============================================================================
# AI/LLM DEPENDENCIES
# =============================================================================

# Groq LLM integration
groq>=0.4.0

# =============================================================================
# WEB FRAMEWORK & API DEPENDENCIES
# =============================================================================

# FastAPI for web services
fastapi>=0.104.0
uvicorn>=0.24.0
starlette>=0.48.0

# HTTP clients
httpx>=0.28.0
httpcore>=1.0.9
requests>=2.32.5

# =============================================================================
# DATA VALIDATION & SERIALIZATION
# =============================================================================

# Pydantic for data validation
pydantic>=2.12.0
pydantic_core>=2.41.4

# JSON schema validation
jsonschema>=4.25.1
jsonschema-specifications>=2025.9.1
referencing>=0.37.0
rpds-py>=0.28.0

# =============================================================================
# PAYMENT PROCESSING DEPENDENCIES
# =============================================================================

# Stripe payment processing
stripe>=7.0.0

# =============================================================================
# AUTHENTICATION & SECURITY DEPENDENCIES
# =============================================================================

# Passkey/WebAuthn support
fido2>=1.1.0
cryptography>=3.4.8

# Cryptographic utilities
bcrypt>=5.0.0
PyNaCl>=1.6.0
pycryptodome>=3.23.0
ecdsa>=0.19.1

# =============================================================================
# TEMPLATING & UI DEPENDENCIES
# =============================================================================

# Jinja2 for HTML templating
jinja2>=3.1.0

# =============================================================================
# ENVIRONMENT & CONFIGURATION
# =============================================================================

# Environment variable management
python-dotenv>=1.0.0

# =============================================================================
# NETWORKING & ASYNC DEPENDENCIES
# =============================================================================

# Async HTTP
aiohttp>=3.13.1
aiohappyeyeballs>=2.6.1
aiosignal>=1.4.0

# Async utilities
anyio>=4.11.0
sniffio>=1.3.1

# =============================================================================
# UTILITY DEPENDENCIES
# =============================================================================

# Date/time utilities
python-dateutil>=2.9.0

# URL parsing
yarl>=1.22.0

# Data structures
sortedcontainers>=2.4.0
multidict>=6.7.0
frozenlist>=1.8.0

# Type checking and annotations
typing_extensions>=4.15.0
typing-inspection>=0.4.2
annotated-types>=0.7.0
annotated-doc>=0.0.3

# =============================================================================
# BLOCKCHAIN & CRYPTO DEPENDENCIES
# =============================================================================

# Cosmos SDK integration
cosmpy>=0.11.2

# Bech32 encoding
bech32>=1.2.0

# =============================================================================
# DEVELOPMENT & BUILD DEPENDENCIES
# =============================================================================

# CLI utilities
click>=8.3.0
colorama>=0.4.6

# Virtual environment management
virtualenv>=20.35.3
distlib>=0.4.0
filelock>=3.20.0
platformdirs>=4.5.0
distro>=1.9.0

# =============================================================================
# PROTOCOL BUFFER DEPENDENCIES
# =============================================================================

# Protocol buffers
protobuf>=5.29.5
grpcio>=1.76.0
googleapis-common-protos>=1.71.0

# =============================================================================
# STANDARD LIBRARY EXTENSIONS
# =============================================================================

# Additional standard library utilities
attrs>=25.4.0
certifi>=2025.10.5
cffi>=2.0.0
charset-normalizer>=3.4.4
h11>=0.16.0
idna>=3.11
propcache>=0.4.1
pycparser>=2.23
six>=1.17.0
urllib3>=2.5.0

# =============================================================================
# NOTE: Some packages like 'uuid' and 'asyncio' are part of Python's standard
# library and don't need to be installed via pip. They have been excluded
# from this requirements file.
# =============================================================================

```

### personality-agents/requirements.txt

```
uagents>=0.4.0
uagents-core>=0.3.11
groq>=0.4.0
python-dotenv>=1.0.0

```

### Gift-expert/requirements.txt

```
aiohappyeyeballs==2.6.1
aiohttp==3.13.1
aiosignal==1.4.0
annotated-doc==0.0.3
annotated-types==0.7.0
anyio==4.11.0
attrs==25.4.0
bcrypt==5.0.0
bech32==1.2.0
certifi==2025.10.5
cffi==2.0.0
charset-normalizer==3.4.4
click==8.3.0
colorama==0.4.6
cosmpy==0.11.2
distlib==0.4.0
distro==1.9.0
ecdsa==0.19.1
fastapi==0.120.0
filelock==3.20.0
frozenlist==1.8.0
googleapis-common-protos==1.71.0
groq==0.33.0
grpcio==1.76.0
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
idna==3.11
jsonschema==4.25.1
jsonschema-specifications==2025.9.1
multidict==6.7.0
platformdirs==4.5.0
propcache==0.4.1
protobuf==5.29.5
pycparser==2.23
pycryptodome==3.23.0
pydantic==2.12.3
pydantic_core==2.41.4
PyNaCl==1.6.0
python-dateutil==2.9.0.post0
python-dotenv==1.1.1
referencing==0.37.0
requests==2.32.5
rpds-py==0.28.0
six==1.17.0
sniffio==1.3.1
sortedcontainers==2.4.0
starlette==0.48.0
typing-inspection==0.4.2
typing_extensions==4.15.0
uagents==0.22.10
uagents-core==0.3.11
urllib3==2.5.0
uvicorn==0.38.0
virtualenv==20.35.3
yarl==1.22.0

```

### create_swagger_test.py

```python
"""
Generate test payment request for Swagger UI testing
"""

from payment_service import payment_service
import json

def create_test_payment():
    """Create a test payment request for Swagger UI testing"""
    
    # Sample gift data
    gift_data = {
        "id": "swagger_test_gift",
        "name": "Swagger Test Gift",
        "price": "$99.99",
        "description": "A test gift for Swagger UI testing",
        "source": "Test Store",
        "rating": 5.0
    }
    
    # Create payment link
    user_id = "swagger_test_user"
    payment_url = payment_service.create_payment_link(gift_data, user_id)
    
    # Get the payment ID from the URL
    payment_id = payment_url.split("/")[-1]
    
    print("🧪 Swagger UI Test Payment Created!")
    print("=" * 50)
    print(f"Payment ID: {payment_id}")
    print(f"Payment URL: {payment_url}")
    print()
    print("🔗 Swagger UI URLs:")
    print(f"• Swagger UI: http://localhost:8001/docs")
    print(f"• ReDoc: http://localhost:8001/redoc")
    print()
    print("🧪 Test these API endpoints:")
    print(f"• GET /api/payment/{payment_id}")
    print(f"• POST /api/process-payment/{payment_id}")
    print(f"• GET /health")
    print()
    print("💡 Instructions:")
    print("1. Open http://localhost:8001/docs in your browser")
    print("2. Try the 'Get Payment Request' endpoint with the payment ID above")
    print("3. Try the 'Process Payment (API)' endpoint")
    print("4. Test the 'Health Check' endpoint")
    print("5. Click 'Try it out' and 'Execute' for each endpoint")
    
    return payment_id

if __name__ == "__main__":
    create_test_payment()

```

### payment_service.py

```python
"""
Payment Service for SantAI Gift Recommendations
Handles payment link generation and Stripe integration
"""

import uuid
from datetime import datetime
from typing import Dict, Any, Optional
from dataclasses import dataclass
import json


@dataclass
class PaymentRequest:
    """Payment request data structure"""
    gift_id: str
    gift_name: str
    price: str
    description: str
    user_id: str
    timestamp: datetime
    payment_id: str = None
    
    def __post_init__(self):
        if self.payment_id is None:
            self.payment_id = str(uuid.uuid4())
    
    def to_dict(self) -> Dict[str, Any]:
        """Convert to dictionary for JSON serialization"""
        return {
            "payment_id": self.payment_id,
            "gift_id": self.gift_id,
            "gift_name": self.gift_name,
            "price": self.price,
            "description": self.description,
            "user_id": self.user_id,
            "timestamp": self.timestamp.isoformat()
        }


class PaymentService:
    """Service for handling payment operations"""
    
    def __init__(self, base_url: str = "http://localhost:8001"):
        self.base_url = base_url
        self.payment_requests: Dict[str, PaymentRequest] = {}
    
    def create_payment_link(self, gift_data: Dict[str, Any], user_id: str) -> str:
        """
        Create a payment link for a gift recommendation
        
        Args:
            gift_data: Gift information from recommendation
            user_id: User identifier
            
        Returns:
            Payment URL string
        """
        # Extract price as float for processing
        price_str = gift_data.get('price', '$0')
        price_value = self._extract_price_value(price_str)
        
        # Create payment request
        payment_request = PaymentRequest(
            gift_id=gift_data.get('id', 'unknown'),
            gift_name=gift_data.get('name', 'Gift Item'),
            price=price_str,
            description=gift_data.get('description', ''),
            user_id=user_id,
            timestamp=datetime.now()
        )
        
        # Store payment request
        self.payment_requests[payment_request.payment_id] = payment_request
        
        # Generate payment URL
        payment_url = f"{self.base_url}/payment/{payment_request.payment_id}"
        return payment_url
    
    def get_payment_request(self, payment_id: str) -> Optional[PaymentRequest]:
        """Get payment request by ID"""
        return self.payment_requests.get(payment_id)
    
    def _extract_price_value(self, price_str: str) -> float:
        """Extract numeric price value from price string"""
        import re
        # Remove currency symbols and extract number
        price_match = re.search(r'[\d,]+\.?\d*', price_str.replace(',', ''))
        if price_match:
            return float(price_match.group())
        return 0.0
    
    def process_payment(self, payment_id: str) -> Dict[str, Any]:
        """
        Process payment (simulated)
        
        Args:
            payment_id: Payment request ID
            
        Returns:
            Payment result dictionary
        """
        payment_request = self.get_payment_request(payment_id)
        if not payment_request:
            return {"success": False, "error": "Payment request not found"}
        
        # Simulate payment processing
        return {
            "success": True,
            "payment_id": payment_id,
            "transaction_id": f"txn_{uuid.uuid4().hex[:8]}",
            "amount": payment_request.price,
            "status": "completed",
            "timestamp": datetime.now().isoformat(),
            "gift_name": payment_request.gift_name
        }


# Global payment service instance
payment_service = PaymentService()

```

### deploy_with_payment.py

```python
"""
Deployment script for SantAI with Payment Integration
Starts both the main agent and payment server
"""

import subprocess
import sys
import os
import time
import signal
from threading import Thread


def start_payment_server():
    """Start the payment server in a separate process"""
    print("🚀 Starting Payment Server...")
    try:
        # Start payment server
        payment_process = subprocess.Popen([
            sys.executable, "payment_server.py"
        ], cwd=os.getcwd())
        
        print("✅ Payment Server started on http://localhost:8001")
        return payment_process
    except Exception as e:
        print(f"❌ Failed to start payment server: {e}")
        return None


def start_main_agent():
    """Start the main SantAI agent"""
    print("🚀 Starting SantAI Agent...")
    try:
        # Change to Gift-expert directory
        agent_dir = os.path.join(os.getcwd(), "Gift-expert")
        if not os.path.exists(agent_dir):
            print(f"❌ Gift-expert directory not found: {agent_dir}")
            return None
        
        # Start main agent
        agent_process = subprocess.Popen([
            sys.executable, "agent.py"
        ], cwd=agent_dir)
        
        print("✅ SantAI Agent started")
        return agent_process
    except Exception as e:
        print(f"❌ Failed to start main agent: {e}")
        return None


def check_dependencies():
    """Check if required dependencies are installed"""
    print("🔍 Checking dependencies...")
    
    required_packages = [
        "fastapi",
        "uvicorn", 
        "jinja2"
    ]
    
    missing_packages = []
    
    for package in required_packages:
        try:
            __import__(package)
        except ImportError:
            missing_packages.append(package)
    
    if missing_packages:
        print(f"❌ Missing packages: {', '.join(missing_packages)}")
        print("📦 Install with: pip install fastapi uvicorn jinja2")
        return False
    
    print("✅ All dependencies are installed")
    return True


def main():
    """Main deployment function"""
    print("🎁 SantAI with Payment Integration - Deployment Script")
    print("=" * 60)
    
    # Check dependencies
    if not check_dependencies():
        return
    
    # Start payment server
    payment_process = start_payment_server()
    if not payment_process:
        return
    
    # Wait a moment for payment server to start
    time.sleep(2)
    
    # Start main agent
    agent_process = start_main_agent()
    if not agent_process:
        payment_process.terminate()
        return
    
    print("\n🎉 Both services started successfully!")
    print("\n📋 Service URLs:")
    print("   • SantAI Agent: Check your agent configuration")
    print("   • Payment Server: http://localhost:8001")
    print("   • Health Check: http://localhost:8001/health")
    
    print("\n🛒 Payment Integration Features:")
    print("   • Buy links in gift recommendations")
    print("   • Stripe-style payment page with dummy data")
    print("   • Order processing and confirmation")
    print("   • Secure payment flow simulation")
    
    print("\n⌨️  Press Ctrl+C to stop both services")
    
    try:
        # Keep the script running
        while True:
            time.sleep(1)
            
            # Check if processes are still running
            if payment_process.poll() is not None:
                print("❌ Payment server stopped unexpectedly")
                break
            
            if agent_process.poll() is not None:
                print("❌ Main agent stopped unexpectedly")
                break
                
    except KeyboardInterrupt:
        print("\n🛑 Shutting down services...")
        
        # Terminate processes
        if payment_process:
            payment_process.terminate()
            print("✅ Payment server stopped")
        
        if agent_process:
            agent_process.terminate()
            print("✅ Main agent stopped")
        
        print("👋 All services stopped. Goodbye!")


if __name__ == "__main__":
    main()

```

### test_payment_feature.py

```python
"""
Test script for SantAI Payment Feature
Demonstrates the payment integration with gift recommendations
"""

import asyncio
import sys
import os

# Add the current directory to Python path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

from payment_service import payment_service, PaymentRequest
from datetime import datetime


def test_payment_service():
    """Test the payment service functionality"""
    print("🧪 Testing SantAI Payment Service")
    print("=" * 50)
    
    # Sample gift data (similar to what would come from recommendations)
    sample_gifts = [
        {
            "id": "gift_001",
            "name": "Wireless Bluetooth Headphones",
            "price": "$79.99",
            "description": "High-quality wireless headphones with noise cancellation",
            "source": "Amazon",
            "rating": 4.5
        },
        {
            "id": "gift_002", 
            "name": "Smart Fitness Watch",
            "price": "$149.99",
            "description": "Advanced fitness tracking with heart rate monitoring",
            "source": "Best Buy",
            "rating": 4.8
        },
        {
            "id": "gift_003",
            "name": "Gourmet Coffee Gift Set",
            "price": "$45.00",
            "description": "Premium coffee beans from around the world",
            "source": "Local Coffee Shop",
            "rating": 4.7
        }
    ]
    
    print("📦 Sample Gift Recommendations:")
    print("-" * 30)
    
    for i, gift in enumerate(sample_gifts, 1):
        print(f"{i}. {gift['name']}")
        print(f"   💰 Price: {gift['price']}")
        print(f"   📝 Description: {gift['description']}")
        print(f"   🏪 Available at: {gift['source']}")
        
        # Generate payment link
        user_id = "test_user_123"
        payment_url = payment_service.create_payment_link(gift, user_id)
        print(f"   🛒 Buy Now: {payment_url}")
        print()
    
    print("🔗 Payment Links Generated Successfully!")
    print("\n💡 To test the payment flow:")
    print("1. Start the payment server: python payment_server.py")
    print("2. Click any 'Buy Now' link above")
    print("3. Complete the payment form with dummy data")
    print("4. See the order placed page")
    
    return sample_gifts


def test_payment_processing():
    """Test payment processing"""
    print("\n🔄 Testing Payment Processing")
    print("=" * 50)
    
    # Create a test payment request and store it
    payment_request = PaymentRequest(
        gift_id="test_gift_001",
        gift_name="Test Gift Item",
        price="$99.99",
        description="A test gift for demonstration",
        user_id="test_user",
        timestamp=datetime.now()
    )
    
    # Store the payment request in the service
    payment_service.payment_requests[payment_request.payment_id] = payment_request
    
    print(f"📋 Payment Request Created:")
    print(f"   ID: {payment_request.payment_id}")
    print(f"   Gift: {payment_request.gift_name}")
    print(f"   Price: {payment_request.price}")
    print(f"   User: {payment_request.user_id}")
    
    # Process payment
    result = payment_service.process_payment(payment_request.payment_id)
    
    print(f"\n✅ Payment Processing Result:")
    print(f"   Success: {result['success']}")
    if result['success']:
        print(f"   Transaction ID: {result['transaction_id']}")
        print(f"   Amount: {result['amount']}")
        print(f"   Status: {result['status']}")
    else:
        print(f"   Error: {result.get('error', 'Unknown error')}")


if __name__ == "__main__":
    print("🎁 SantAI Payment Feature Test")
    print("=" * 50)
    
    # Test payment service
    gifts = test_payment_service()
    
    # Test payment processing
    test_payment_processing()
    
    print("\n🎉 All tests completed successfully!")
    print("\n📋 Next Steps:")
    print("1. Install payment dependencies: pip install fastapi uvicorn jinja2")
    print("2. Start payment server: python payment_server.py")
    print("3. Test the payment flow in your browser")
    print("4. Integrate with your SantAI agent")

```

### deploy_asi_one.py

```python
"""
ASI.one Deployment Script for SantAI Payment Integration
This script helps you deploy and test your SantAI agent with payment integration on ASI.one
"""

import subprocess
import sys
import os
import time
import requests
from pathlib import Path


def check_asi_one_setup():
    """Check if ASI.one setup is ready"""
    print("🔍 Checking ASI.one Setup...")
    
    try:
        # Check if uagents is installed
        import uagents
        print("✅ uagents framework installed")
    except ImportError:
        print("❌ uagents not installed. Run: pip install uagents")
        return False
    
    # Check if agent.py exists
    agent_path = Path("Gift-expert/agent.py")
    if agent_path.exists():
        print("✅ SantAI agent found")
    else:
        print("❌ SantAI agent not found at Gift-expert/agent.py")
        return False
    
    # Check if payment files exist
    payment_files = [
        "payment_server.py",
        "payment_service.py", 
        "templates/index.html",
        "templates/payment_success.html"
    ]
    
    for file in payment_files:
        if Path(file).exists():
            print(f"✅ {file} found")
        else:
            print(f"❌ {file} not found")
            return False
    
    return True


def test_payment_server():
    """Test payment server locally"""
    print("\n🧪 Testing Payment Server...")
    
    try:
        # Start payment server in background
        print("Starting payment server...")
        payment_process = subprocess.Popen([
            sys.executable, "payment_server.py"
        ], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        
        # Wait for server to start
        time.sleep(3)
        
        # Test health endpoint
        try:
            response = requests.get("http://localhost:8001/health", timeout=5)
            if response.status_code == 200:
                print("✅ Payment server is running")
                print("✅ Health check passed")
                return payment_process
            else:
                print(f"❌ Health check failed: {response.status_code}")
                payment_process.terminate()
                return None
        except requests.exceptions.RequestException as e:
            print(f"❌ Cannot connect to payment server: {e}")
            payment_process.terminate()
            return None
            
    except Exception as e:
        print(f"❌ Failed to start payment server: {e}")
        return None


def test_agent_deployment():
    """Test agent deployment to ASI.one"""
    print("\n🤖 Testing Agent Deployment...")
    
    try:
        # Change to Gift-expert directory
        os.chdir("Gift-expert")
        
        # Start agent (this will publish to ASI.one)
        print("Starting SantAI agent...")
        print("This will publish your agent to ASI.one (Agentverse)")
        print("Look for the agent address in the output")
        
        # Run agent
        agent_process = subprocess.Popen([
            sys.executable, "agent.py"
        ])
        
        print("✅ Agent started successfully")
        print("📋 Agent should now be available on ASI.one")
        print("🔗 Check ASI.one dashboard for your agent")
        
        return agent_process
        
    except Exception as e:
        print(f"❌ Failed to start agent: {e}")
        return None


def create_test_commands():
    """Create test commands for ASI.one"""
    print("\n📝 Test Commands for ASI.one:")
    print("=" * 50)
    
    test_commands = [
        "Send me gift recommendations",
        "I need a gift for my friend's birthday",
        "What gifts do you recommend for Christmas?",
        "Show me some tech gifts",
        "I want to buy a gift for my mom"
    ]
    
    for i, cmd in enumerate(test_commands, 1):
        print(f"{i}. \"{cmd}\"")
    
    print("\n💡 Expected Results:")
    print("• Agent should respond with gift recommendations")
    print("• Each recommendation should include a 'Buy Now' link")
    print("• Buy links should redirect to payment pages")
    print("• Payment pages should have dummy data pre-filled")
    print("• Order processing should work end-to-end")


def show_deployment_urls():
    """Show important URLs for testing"""
    print("\n🌐 Important URLs:")
    print("=" * 30)
    print("• ASI.one Dashboard: https://asi.one/dashboard")
    print("• Payment Server: http://localhost:8001")
    print("• Swagger UI: http://localhost:8001/docs")
    print("• Health Check: http://localhost:8001/health")
    print("• Payment Test: http://localhost:8001/api/create-test-payment")


def main():
    """Main deployment function"""
    print("🚀 SantAI Payment Integration - ASI.one Deployment")
    print("=" * 60)
    
    # Check setup
    if not check_asi_one_setup():
        print("\n❌ Setup check failed. Please fix the issues above.")
        return
    
    print("\n✅ Setup check passed!")
    
    # Test payment server
    payment_process = test_payment_server()
    if not payment_process:
        print("\n❌ Payment server test failed.")
        return
    
    # Show URLs
    show_deployment_urls()
    
    # Create test commands
    create_test_commands()
    
    print("\n🎯 Next Steps:")
    print("1. Test payment server in browser: http://localhost:8001/docs")
    print("2. Start SantAI agent: cd Gift-expert && python agent.py")
    print("3. Test agent on ASI.one with the commands above")
    print("4. Verify buy links work in gift recommendations")
    print("5. Test complete payment flow")
    
    print("\n⌨️  Press Ctrl+C to stop services")
    
    try:
        # Keep running
        while True:
            time.sleep(1)
    except KeyboardInterrupt:
        print("\n🛑 Stopping services...")
        if payment_process:
            payment_process.terminate()
        print("✅ Services stopped")


if __name__ == "__main__":
    main()

```

[18 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]