Skip to content

404khai/riddler-a2a-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Riddler: A2A Compliant AI Agent for Telex

Riddler is an AI-powered riddle and brain-teaser companion built for Telex. It:

  • generates clever riddles on demand
  • remembers your session so you can ask for hints or answers
  • gives fresh questions every time you talk to it

Powered by FastAPI + Gemini LLM models 🧠 AI Model: gemini-2.0-flash (riddle generation)


✨ Commands

Command Purpose
/a2a/riddler generates riddles, handles hints and answers

🏗️ Architecture

  • FastAPI backend
  • Gemini
  • Uvicorn server

Riddler is powered by FastAPI and uses Google Gemini 2.0 Flash for language generation. Session memory is handled in-app using a task-bound store, ensuring each Telex task ID has its own riddle state.

The core flow is simple: • Telex sends a message update • FastAPI receives the JSON-RPC request • The agent extracts user intent • It either serves a new riddle, hint, or answer • A Telex-formatted JSON-RPC response is returned



Create a .env file

  • Create a .env file in the project root:
cp .env.example .env

⚙️ Environment variables

  • Then edit .env with your preferred database connection string.
GEMINI_API_KEY=your-gemini-api-key
GEMINI_MODEL=gemini-2.0-flash

#Telex
TELEX_BASE_URL=https://api.telex.im

#API Ninjas api key
API_NINJAS_KEY=your-api-ninjas-key                   get it from https://api-ninjas.com/profile

# FastAPI
PORT=4001



Cloning the repository

git clone https://github.com/danielzfega/riddler-a2a-agent
cd riddler-a2a-agent

Create and activate a virtual environment

python -m venv venv
source venv/bin/activate     # On macOS/Linux
venv\Scripts\activate        # On Windows

List of dependencies - Sample requirements.txt

fastapi
uvicorn[standard]
httpx
python-dotenv
pydantic
google-genai



Install dependencies

pip install -r requirements.txt

Start the development server

uvicorn main:app --reload --port 4001

Live URL

https://riddler-a2a-agent.up.railway.app/a2a/riddler

About

A dynamic riddle generation A2A compliant AI agent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors