a digital entity named phi that roams bsky
1"""Test the new MCP-enabled agent."""
2
3import asyncio
4
5from bot.agent import PhiAgent
6from bot.memory import Memory
7
8
9async def main():
10 """Test basic agent functionality."""
11 # Create memory and agent
12 memory = Memory()
13 agent = PhiAgent(memory)
14
15 # Test a simple interaction
16 response = await agent.process_mention(
17 mention_text="hey phi, what are you?",
18 author_handle="test.user",
19 thread_uri="at://test/thread/123",
20 )
21
22 print(f"Action: {response.action}")
23 print(f"Text: {response.text}")
24 print(f"Reason: {response.reason}")
25
26 # Check memory was stored
27 context = memory.get_thread_context("at://test/thread/123")
28 print(f"\nThread context:\n{context}")
29
30
31if __name__ == "__main__":
32 asyncio.run(main())