Refactor: Clean up obsolete files and organize codebase structure

This commit removes deprecated modules and reorganizes code into logical directories:

Deleted files (superseded by newer systems):
- claude_code_server.py (replaced by agent-sdk direct integration)
- heartbeat.py (superseded by scheduled_tasks.py)
- pulse_brain.py (unused in production)
- config/pulse_brain_config.py (obsolete config)

Created directory structure:
- examples/ (7 example files: example_*.py, demo_*.py)
- tests/ (5 test files: test_*.py)

Updated imports:
- agent.py: Removed heartbeat module and all enable_heartbeat logic
- bot_runner.py: Removed heartbeat parameter from Agent initialization
- llm_interface.py: Updated deprecated claude_code_server message

Preserved essential files:
- hooks.py (for future use)
- adapters/skill_integration.py (for future use)
- All Google integration tools (Gmail, Calendar, Contacts)
- GLM provider code (backward compatibility)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 09:57:39 -07:00
parent f018800d94
commit a8665d8c72
26 changed files with 1068 additions and 1067 deletions

View File

@@ -0,0 +1,36 @@
"""Test agent with hybrid search."""
from agent import Agent
print("Initializing agent with hybrid search...")
agent = Agent(provider="claude")
print("\n" + "="*60)
print("TESTING AGENT MEMORY RECALL WITH HYBRID SEARCH")
print("="*60)
# Test 1: Semantic query - ask about cost in different words
print("\n1. Testing semantic recall: 'How can I save money on API calls?'")
print("-" * 60)
response = agent.chat("How can I save money on API calls?", username="alice")
print(response)
# Test 2: Ask about birthday (semantic search should find personal info)
print("\n" + "="*60)
print("2. Testing semantic recall: 'What's my birthday?'")
print("-" * 60)
response = agent.chat("What's my birthday?", username="alice")
print(response)
# Test 3: Ask about specific technical detail
print("\n" + "="*60)
print("3. Testing keyword recall: 'What search technology are we using?'")
print("-" * 60)
response = agent.chat("What search technology are we using?", username="alice")
print(response)
print("\n" + "="*60)
print("Test complete!")
print("="*60)
agent.shutdown()