Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Malware / Trojaner / VirenAI Agents Are Becoming a New Malware Distribution Channel(23.09.2026 um 09:44 Uhr)
Sichere ProgrammierungBuilding In-Browser Private Tools: When the Server Is the Liability(23.09.2026 um 08:54 Uhr)
Sichere ProgrammierungYour Order Fulfillment Workflow Is One 24-Hour Wait Away From Chaos(23.09.2026 um 08:54 Uhr)
Sichere Programmierungflet media library(23.09.2026 um 08:54 Uhr)
Sichere ProgrammierungRunning Lightdash on Snowpark Container Services(23.09.2026 um 08:55 Uhr)
Sichere ProgrammierungThe Impossible Filter Gallery Transition in CSS Only(23.09.2026 um 08:59 Uhr)
Sichere ProgrammierungVerifiable Data > Claimed Data: What i'm Trying to do with Ori's List(23.09.2026 um 09:08 Uhr)
Malware / Trojaner / VirenAI Agents Are Becoming a New Malware Distribution Channel(23.09.2026 um 09:44 Uhr)
Sichere ProgrammierungBuilding In-Browser Private Tools: When the Server Is the Liability(23.09.2026 um 08:54 Uhr)
Sichere ProgrammierungYour Order Fulfillment Workflow Is One 24-Hour Wait Away From Chaos(23.09.2026 um 08:54 Uhr)
Sichere Programmierungflet media library(23.09.2026 um 08:54 Uhr)
Sichere ProgrammierungRunning Lightdash on Snowpark Container Services(23.09.2026 um 08:55 Uhr)
Sichere ProgrammierungThe Impossible Filter Gallery Transition in CSS Only(23.09.2026 um 08:59 Uhr)
Sichere ProgrammierungVerifiable Data > Claimed Data: What i'm Trying to do with Ori's List(23.09.2026 um 09:08 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Building EduSimplify: An AI Agent for Simplifying Educational Topics using Django, DRF, and Telex A2A Protocol

Author: Muhammad Ahmad El-kufahn GitHub: KhalifahMB/HNG13_Intenship Live Agent: Live Link to Agent 🌍 Overview EduSimplify is an AI-powered educational assistant that simplifies complex science topics — especially Physics, Math…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Author: Muhammad Ahmad El-kufahn


GitHub: KhalifahMB/HNG13_Intenship


Live Agent: Live Link to Agent







🌍 Overview



EduSimplify is an AI-powered educational assistant that simplifies complex science topics — especially Physics, Math, and related fields — into clear, easy-to-understand explanations.



Built with Django, Django REST Framework (DRF), and Google Gemini, EduSimplify integrates seamlessly into the Telex.im platform using the Mastra A2A (Agent-to-Agent) Protocol.



The goal is simple:




When a user sends a complex topic like “Explain quantum entanglement,” EduSimplify responds with a concise 2–3 sentence explanation, one real-world example, and a short note or formula.








🧩 Understanding Telex A2A Protocol (in plain English)



Telex’s A2A (Agent-to-Agent) protocol allows external applications (agents) to connect and communicate with Telex channels using the JSON-RPC 2.0 format.



This format ensures that every message follows a consistent structure — each with an id, method, and params.



For example, Telex might send a message to EduSimplify like this:




{
"jsonrpc": "2.0",
"id": "001",
"method": "message/send",
"params": {
"message": {
"role": "user",
"messageId": "12345",
"parts": [
{ "kind": "text", "text": "Explain Newton's third law" }
]
}
}
}






Your agent then processes that request, runs the AI model, and sends a structured JSON-RPC response back to Telex with an explanation, artifacts, and history.






🧠 How EduSimplify Works Internally



EduSimplify’s architecture follows a clean modular design:



agents/

├── views.py # Core logic handling A2A JSON-RPC requests

├── serializers.py # DRF validation for JSON-RPC schema

├── models.py # Conversation, Message, Artifact models

├── utils.py # Google Gemini integration





🧩 Request Flow:



Telex sends a JSON-RPC request (e.g., message/send) to your public endpoint.



The A2AAgentView validates the request using DRF serializers.



A unique context_id identifies each conversation.



The user message is stored in the database.



The text is passed to the ask_gemini() helper function.



Gemini generates a simplified explanation.



EduSimplify returns a structured A2A-compliant JSON response with the answer.





⚙️ The Google Gemini Integration



EduSimplify uses the official Google Generative AI Python SDK (google-genai) for calling Gemini models.




import os
from google import genai
from django.conf import settings

def _get_genai_client():
api_key = getattr(settings, "GEMINI_API_KEY", None) or os.environ.get("GEMINI_API_KEY")
if not api_key:
raise RuntimeError("Gemini API key not configured (GEMINI_API_KEY)")
return genai.Client(api_key=api_key)

def ask_gemini(prompt, model="gemini-2.5-flash"):
client = _get_genai_client()
try:
response = client.models.generate_content(model=model, contents=prompt)
except Exception as exc:
raise RuntimeError(f"genai request failed: {exc}") from exc

text = getattr(response, "text", str(response))
if not text:
raise RuntimeError("genai returned empty response")
return text






This keeps the integration clean, secure, and reusable — ask_gemini() is imported anywhere in your Django app to generate AI content on demand.






🧾 Core View Explained



The main view that powers EduSimplify is A2AAgentView. It receives JSON-RPC data, validates it, extracts user prompts, and responds.



Key Concepts



Message IDs (messageId): Every message (incoming or outgoing) has a unique UUID to track it.



Context IDs: Represent a user’s conversation thread across multiple messages.



Task IDs: Used when Telex runs multiple tasks within one context.



History: Holds both the user’s query and the agent’s reply for Telex display.



Example excerpt:




class A2AAgentView(APIView):
def post(self, request, *args, **kwargs):
raw = request.data or {}
top_serializer = JSONRPCRequestSerializer(data=raw)
...
if method == "message/send":
pser = MessageParamsSerializer(data=params)
...
user_prompt = last["text"]

# Call Gemini
explanation = ask_gemini(
f"You are EduSimplify... Concept: {user_prompt}\nAnswer:"
)

# Respond to Telex
result = {
"id": task_id,
"contextId": conv.context_id,
"status": {
"state": "completed",
"timestamp": datetime.utcnow().isoformat() + "Z",
"message": {
"role": "agent",
"parts": [{"kind": "text", "text": explanation}]
},
},
...
}
return Response(make_a2a_success(request_id, result))






Each new request gets a unique messageId to prevent collisions and maintain consistent message threading inside Telex.






🧮 Example: How to Talk to EduSimplify



🔹 Using curl




curl -X POST https://el-kufahn-hng13.up.railway.app/a2a/agent/edusimplify \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "001",
"method": "message/send",
"params": {
"message": {
"role": "user",
"messageId": "abc123",
"parts": [
{"kind": "text", "text": "Explain photosynthesis in simple terms"}
]
}
}
}'






✅ Response Example




{
"jsonrpc": "2.0",
"id": "001",
"result": {
"status": {
"state": "completed",
"message": {
"role": "agent",
"parts": [
{
"kind": "text",
"text": "Photosynthesis is how plants convert sunlight into energy..."
}
]
}
}
}
}









🔹 Using Postman



Method: POST



URL: https://el-kufahn-hng13.up.railway.app/a2a/agent/edusimplify



Body (raw JSON): same as above.



🔗 Telex Workflow Configuration



To connect EduSimplify to Telex.im, add a workflow JSON like this:




{
"active": true,
"category": "education",
"description": "Simplifies science topics for better understanding.",
"id": "EduSimplifyAgent_v1",
"name": "edusimplify_agent",
"short_description": "Simplify complex topics in simple terms",
"long_description": "
EduSimplify helps users understand science topics easily.
It breaks down complex concepts into short explanations, gives real-world examples,
and provides simple formulas or notes when applicable.
"
,
"nodes": [
{
"id": "edusimplify_agent",
"name": "EduSimplify Agent",
"parameters": {},
"position": [816, -112],
"type": "a2a/mastra-a2a-node",
"typeVersion": 1,
"url": "https://el-kufahn-hng13.up.railway.app/a2a/agent/edusimplify"
}
],
"settings": {
"executionOrder": "v1"
},
"pinData": {}
}









💻 Source Code & Setup



All setup details (environment variables, Django configuration, and deployment steps) are explained in the GitHub repository provided at the top.






Interact directly with the deployed agent:



👉 https://el-kufahn-hng13.up.railway.app/a2a/agent/edusimplify



Send it any science concept — from “Explain gravity like I’m 10” to “What is a black hole?” — and get clear, simple answers.






🧭 Conclusion



EduSimplify demonstrates how Django + DRF can be used to build robust, production-ready AI agents that integrate cleanly into Telex.im using the A2A protocol.



By combining Google Gemini’s intelligence with a simple, structured API design, this project shows how AI can transform learning experiences — one simplified concept at a time.






django #ai #education #telex #google-gemini #python

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Building EduSimplify: An AI Agent for Simplifying Educational Topics using Django, DRF, and Telex A2A Protocol

Thematisch verwandte Begriffe: Building, EduSimplify, Agent, Simplifying · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96258 | A vulnerability has been found in onSite internet GmbH Auktion NG Auktio…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick