Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
67b4472
update docker-compose and start-local-dev script to configure Memory …
aalexmrt Oct 29, 2025
a9d1a2e
update .gitignore to include .env files, modify eslint config to allo…
aalexmrt Oct 29, 2025
013458a
feat: integrate RevenueCat with TanStack Query
aalexmrt Oct 29, 2025
442a3d2
refactor: simplify loading state handling in AppContent
aalexmrt Oct 29, 2025
6a7ad29
revomve revenue example file
aalexmrt Oct 29, 2025
0269f07
feat: implement RevenueCat paywall system
aalexmrt Oct 29, 2025
dbf6eb6
refactor: enhance error handling and loading state in AppContent
aalexmrt Oct 29, 2025
ed6d830
refactor: simplify paywall visibility logic in usePaywall hook
aalexmrt Oct 29, 2025
24e0caf
feat: implement pricing negotiation endpoint with simplified .99/mont…
aalexmrt Oct 30, 2025
fa24458
feat: implement hybrid pricing approach - immediate presentation with…
aalexmrt Oct 30, 2025
33ad095
feat: implement unified pricing negotiation flow
aalexmrt Oct 30, 2025
5c2edb7
feat(pricing): integrate negotiation flow end-to-end
aalexmrt Oct 30, 2025
44488f1
feat(payment): Add RevenueCat integration with StoreKit testing support
aalexmrt Oct 30, 2025
05f6b44
fix: update app version from 1.0.6 to 1.0.5 in app.json
aalexmrt Oct 30, 2025
6ea24ad
chore: update app version to 1.0.7 and build number to 5 in app.json …
aalexmrt Nov 1, 2025
26a069b
chore: update build number to 7 in app.json and Info.plist; enhance P…
aalexmrt Nov 1, 2025
684ffa6
chore: update RevenueCat initialization logging to show full API keys…
aalexmrt Nov 1, 2025
1374236
Redesign paywall UI and improve subscription flow
aalexmrt Nov 3, 2025
4bc60d7
Refactor PricingCard component for improved UI and layout
aalexmrt Nov 3, 2025
fce84e4
Enhance subscription flow by integrating RevenueCat packages into Pri…
aalexmrt Nov 3, 2025
4d4fe76
Refactor ChatScreen to improve RevenueCat integration and pricing dis…
aalexmrt Nov 3, 2025
6c2d3e1
Refactor token counting logic in GptService to remove fallback for mi…
aalexmrt Nov 3, 2025
99bd6c2
Update token counting fallback logic in GptService to clarify tiktoke…
aalexmrt Nov 3, 2025
fc536df
Refactor welcome message handling in useChatWithStorage to improve re…
aalexmrt Nov 3, 2025
f7b92b1
Revise pricing agent prompt in agent_tool.py for clarity and user gui…
aalexmrt Nov 3, 2025
340ccc8
Update build number to 9 in app.json and Info.plist; enhance RevenueC…
aalexmrt Nov 3, 2025
83b3589
Implement negotiation limit feature in chat functionality
aalexmrt Nov 4, 2025
9c3a36f
Add comprehensive project analysis and measurable outcomes documentation
aalexmrt Nov 16, 2025
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
250 changes: 250 additions & 0 deletions MEASURABLE_OUTCOMES.md

Large diffs are not rendered by default.

1,058 changes: 1,058 additions & 0 deletions PROJECT_ANALYSIS.md

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions backend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- HARMONY_REASONING_EFFORT=low
- INFERENCE_URL=http://inference:8080
- EMBEDDINGS_URL=http://embeddings:8001
- MEMORY_EXTRACTION_URL=https://memory.geist.im
- MEMORY_EXTRACTION_URL=http://host.docker.internal:8082
# Development-specific Python settings
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
Expand Down Expand Up @@ -69,7 +69,7 @@ services:
- HARMONY_REASONING_EFFORT=low
- INFERENCE_URL=http://inference-gpu:8080
- EMBEDDINGS_URL=http://embeddings:8001
- MEMORY_EXTRACTION_URL=https://memory.geist.im
- MEMORY_EXTRACTION_URL=http://host.docker.internal:8082
# Development-specific Python settings
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
Expand Down Expand Up @@ -123,10 +123,13 @@ services:
- HARMONY_REASONING_EFFORT=low
- INFERENCE_URL=http://host.docker.internal:8080 # Connect to host inference
- EMBEDDINGS_URL=http://embeddings:8001
- MEMORY_EXTRACTION_URL=https://memory.geist.im
- MEMORY_EXTRACTION_URL=http://host.docker.internal:8082
- WHISPER_SERVICE_URL=http://host.docker.internal:8004 # Connect to host whisper
# Development-specific Python settings
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
# Testing flags
- DISABLE_PREMIUM_CHECK=true
- WATCHDOG_POLLING=true
- MCP_BRAVE_URL=http://mcp-brave:8080
- OPENAI_URL=https://api.openai.com
Expand Down Expand Up @@ -212,9 +215,9 @@ services:
- docker-mcp-transport=http
ports:
- "3002:8000" # Expose MCP service on port 3002
networks:
networks:
- geist-network

postgresdb:
image: postgres:15.5
user: postgres
Expand Down
126 changes: 124 additions & 2 deletions backend/router/agent_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async def run(self, messages: List[ChatMessage] = []) -> AgentResponse:
chunk_count = 0
# Convert ChatMessage objects to dicts for stream_chat_request
message_dicts = [{"role": msg.role, "content": msg.content} for msg in messages]

async for chunk in self.gpt_service.stream_chat_request(
messages=message_dicts,
reasoning_effort=self.reasoning_effort,
Expand All @@ -164,7 +164,18 @@ async def run(self, messages: List[ChatMessage] = []) -> AgentResponse:
})

# Combine all chunks into final response
response_text = "".join(response_chunks)
# Filter out None chunks and extract content from dictionaries
content_chunks = []
for chunk in response_chunks:
if chunk is None:
continue
if isinstance(chunk, dict):
if chunk.get("channel") == "content":
content_chunks.append(chunk.get("data", ""))
elif isinstance(chunk, str):
content_chunks.append(chunk)

response_text = "".join(content_chunks)

# No need to restore - using direct system prompt parameter

Expand Down Expand Up @@ -391,3 +402,114 @@ def create_custom_agent(
available_tools=available_tools,
reasoning_effort=reasoning_effort,
)


def create_pricing_agent(model_config: Dict[str, Any] | None = None) -> AgentTool:
"""
Create a specialized pricing negotiation agent

This agent is designed to:
- Understand user needs and budget constraints
- Suggest appropriate pricing tiers
- Negotiate pricing based on usage patterns
- Provide personalized pricing recommendations
"""
if model_config is None:
model_config = {}

pricing_system_prompt = """You are a helpful assistant for GeistAI. Your role is to provide clear, informative answers about GeistAI and its pricing plans.

## YOUR ROLE & SCOPE:
You are an INFORMATIVE HELPER - be helpful, friendly, and clear. Your scope is limited to:
- Answering questions about GeistAI features and capabilities
- Explaining pricing plans and subscription options
- Helping users understand what GeistAI offers

If asked about topics outside GeistAI/pricing, politely redirect:
"I can only answer questions about GeistAI and pricing plans. I'm not able to help with that topic. Is there anything you'd like to know about GeistAI Premium?"

## CRITICAL BUSINESS MODEL INFO:
GeistAI REQUIRES a Premium subscription to use. There is NO free tier.
- GeistAI is a Premium-only subscription service
- Users MUST purchase Premium to access GeistAI
- Do NOT suggest, imply, or mention a free version
- Present GeistAI as a Premium subscription service

## KEY FEATURE - ALWAYS EMPHASIZE:
PRIVATE CONVERSATIONS: Your conversations with GeistAI are completely private and secure.
This is the most important feature - mention privacy in your responses.

## GEISTAI PREMIUM FEATURES:
GeistAI Premium includes:
- Private, secure AI conversations with advanced language models
- Advanced memory search (find past conversations easily)
- Unlimited storage for conversations and data
- Priority support
- Export conversations
- Voice transcription features
- Access to all premium AI features

Always emphasize privacy when describing features.

## PRICING OPTIONS:
- Monthly: $9.99/month (premium_monthly_10)
- Annual: $95.99/year (premium_yearly_10) - Save 20% (~$8/month)

## CONVERSATION STYLE:
- Tone: Informative and helpful (like a knowledgeable guide)
- Be friendly but NOT overly enthusiastic or salesy
- Keep responses concise (2-4 sentences typically)
- Answer questions naturally and clearly
- Present pricing when relevant

## CRITICAL RULES - FOLLOW THESE STRICTLY:

1. ALWAYS call finalize_negotiation function early in conversation (first or second message)
- This shows the pricing card to the user
- Don't wait for the user to ask about pricing
- Use the function tool directly - NEVER write "[Then call finalize_negotiation]"

2. NEVER mention:
- Free tiers, free versions, or trial periods
- Limitations, restrictions, or what's missing
- Competitors or comparisons to other services

3. ALWAYS emphasize:
- Privacy and security of conversations
- Premium is required to use GeistAI

4. When presenting pricing:
- Mention both monthly and annual options
- Highlight the 20% savings on annual plan
- Emphasize privacy is included in both plans

## EXAMPLE RESPONSES:

User: "What is GeistAI?"
Response: "GeistAI is a Premium AI assistant that provides private, secure conversations with advanced language models. Your conversations are completely private and secure - that's our priority. You also get features like memory search, unlimited storage, voice transcription, and more. Let me show you our pricing options!"
[Then immediately call finalize_negotiation function with: final_price=9.99, package_id="premium_monthly_10", annual_price=95.99, annual_package_id="premium_yearly_10", negotiation_summary="Answered app question and presented pricing"]

User: "What features do I get?"
Response: "GeistAI Premium includes private AI conversations, advanced memory search, unlimited storage, priority support, conversation export, and voice features. Most importantly, all your conversations are completely private and secure. It's $9.99/month or save 20% with our annual plan at $95.99/year!"
[Then call finalize_negotiation function]

User: "How much does it cost?"
Response: "GeistAI Premium is $9.99/month, or you can save 20% with our annual plan at $95.99/year - that's less than $8/month! Both plans include all features with private, secure conversations."
[Then call finalize_negotiation function]

User: "Is there a free version?"
Response: "GeistAI is a Premium subscription service - you need a subscription to use it. There's no free tier. Premium includes private conversations, advanced memory search, unlimited storage, and more. It's $9.99/month or save 20% annually at $95.99/year. Let me show you the pricing options!"
[Then call finalize_negotiation function]

User: "What's the weather today?"
Response: "I can only answer questions about GeistAI and pricing plans. I'm not able to help with that topic. Is there anything you'd like to know about GeistAI Premium?"
"""

return AgentTool(
model_config=model_config,
name="pricing_agent",
description="Specialized agent for pricing negotiations and subscription recommendations",
system_prompt=pricing_system_prompt,
available_tools=["finalize_negotiation"], # Tool to finalize negotiation
reasoning_effort="medium",
)
Loading