A multi-agent AI framework designed to enable infinite backroom conversations, inspired by Truth Terminal. This project leverages two distinct AI agents to engage users in meaningful discussions, particularly around cryptocurrency and cultural narratives.
Access the live app here: Truth Terminal Deployment
Watch the Video Demo on Loom.
- Project Overview
- System Architecture
- Deployment
- Features
- Challenges
- Future Work
- Team Members
- References
This project implements a multi-agent system with two AI agents, developed using the Anthropic API. Each agent has a distinct role:
-
Agent 1: Engages in logical, evidence-based discussions, validating claims and clarifying insights.
-
Agent 2: Provides satirical commentary with dark humor, analyzing human conditions and tech culture.
The project consists of the following components:
agents.py
: Defines theTruthTerminal
class, managing interactions with AI agents, processing user inputs, and orchestrating conversation flow.main.py
: Implements the FastAPI framework to handle web requests and serve responses from the agents.Dockerfile
: Configures a Docker container for deployment.vercel.json
: Specifies deployment settings for Vercel.
class TruthTerminal:
def __init__(self):
api_key = os.getenv("ANTHROPIC_API_KEY")
client = anthropic.Anthropic(api_key=api_key)
self.client = client
self.conversation = ''
# Agent 1's prompt
self.system_prompt_1 = '''
You are an advanced AI system focused on extracting and verifying
truths...
'''
# Agent 2's prompt
self.system_prompt_2 = '''
You are an AI commentator with a darkly humorous...
'''
def agent_response(self, system_prompt, conversation):
agent_1 = self.client.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
temperature=0.2,
system=system_prompt,
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": f"Conversation so far: {conversation}"
}
]
agents.py
: AI agent definitions and conversation flow management.main.py
: API endpoints to interact with agents.Dockerfile
: Containerization for deployment consistency.vercel.json
: Deployment configurations for Vercel.
- Agent 1:
- Purpose: Logical discussions with evidence-based responses.
- Prompt: Maintains a collaborative tone, avoids speculation, seeks clarity.
- Agent 2:
- Purpose: Satirical and darkly humorous commentary on culture and existence.
- Prompt: Utilizes irony and wit to explore cultural narratives.
To deploy the application:
- FastAPI Setup: Set up the backend API.
- Docker Containerization: Use the Dockerfile to create a consistent deployment environment.
- Vercel Deployment: Deploy on Vercel for scalability.
- Base Image:
python:3.9-slim
for lightweight deployment. - Working Directory:
/app
inside the container. - Dependencies: Installs packages listed in
requirements.txt
. - Port Exposure: Exposes port 8000.
- Startup Command: Uses Uvicorn to run
main.py
.
- Builds: Processes
main.py
using Vercel's Python builder. - Routes: Directs all requests to FastAPI endpoints in
main.py
.
- Dynamic Conversations: Two agents with distinct conversational styles.
- Conversation Logging: Users can retrieve full conversation history.
- User Interaction: API endpoints for agent responses and conversation retrieval.
- Model Limitations: Challenges in generating contextually accurate responses, resolved through iterative prompt tuning.
- Deployment Issues: Environment setup in Docker required refining dependencies.
- Agent Expansion: Add more agents with specialized knowledge areas.
- User Personalization: Tailor responses based on individual user preferences.
- Tool Capabilities: Equip agents with tools for complex tasks.
- Voice Interaction: Integrate voice recognition for interactive experiences.
- Mobile Compatibility: Develop a mobile-responsive version.
- Agam Pandey - Developed core algorithms.
- Riya - Worked on ML model training and optimization.
- Krish Sharma - Experimented with new AI techniques to improve performance.