DEV Community

Building JobInsightAI: An Intelligent Telex Agent for Career Growth β€” HNG Stage 3 Backend Task

πŸš€ Introduction

As part of the HNG Stage 3 Backend Task, I was challenged to build an AI agent and integrate it with Telex.im using the A2A protocol.

The goal was to design an intelligent system that solves a real problem, responds to user prompts, and demonstrates solid backend design and AI integration skills.

For my project, I built JobInsightAI β€” an AI agent that helps job seekers discover the right projects to add to their portfolio or CV in order to stand out for specific job applications.


🎯 Problem Statement

Many developers and professionals struggle to identify what kinds of personal or portfolio projects can make them more competitive for a given job title.

For example, someone applying for a β€œData Analyst” role might not know whether to build a dashboard, a data pipeline, or an ML model to strengthen their CV.

JobInsightAI solves this by providing custom project recommendations based on the user’s desired job title or job description.


🧩 How It Works

When a user interacts with the agent on Telex.im, the following flow happens:

  1. User Input:

    The user sends a message like

    β€œI’m looking for a Software Engineering role.”

  2. Job Title Extraction:

    The agent extracts the job title from the input using simple text pattern matching.

  3. Database Search:

    It checks an SQLite database for a cached job description that matches the title.

    (This database contains job titles and brief descriptions fetched from open APIs.)

  4. AI Recommendation:

    If a match is found, the job title and description are sent to the LLM (AI model) to generate project recommendations.

  5. Fallback Handling:

    • If no matching job is found, the user is asked to paste a job description manually.
    • If the job title extraction fails, the agent suggests how to rephrase the query.
  6. Response to User:

    The AI responds with a concise, structured list of projects β€” e.g.

    β€œ1. Build a bug-tracking system – shows backend and database design skills.”

    β€œ2. Create an API for project management – demonstrates RESTful design principles.”


🧠 Architecture Overview

The project follows a modular Flask architecture:

jobinsightai/
β”‚
β”œβ”€β”€ app.py          # Flask entry point and A2A endpoint
β”œβ”€β”€ logic.py        # Core decision logic
β”œβ”€β”€ ai.py           # LLM integration (using OpenAI or Groq)
β”œβ”€β”€ db.py           # SQLite helper for job search
└── jobs.db         # Cached job listings
Enter fullscreen mode Exit fullscreen mode

Each layer is independent, making it easy to replace or upgrade components β€” for example, swapping the LLM provider (OpenAI β†’ Groq or any free model) without touching the rest of the logic.


βš™οΈ Technical Implementation

1. Flask Endpoint (A2A Integration)

The /a2a/jobinsight endpoint receives messages from Telex.im in JSON format, processes them, and sends valid A2A responses back.

2. SQLite Database

Stores job titles and short descriptions, used to minimize LLM calls.

3. AI Integration

Uses an LLM (OpenAI API or Groq’s free endpoint) to generate personalized project ideas.

The logic ensures that the AI is only called when necessary β€” reducing token cost and latency.

4. Error Handling

The agent validates user input, detects missing titles, and provides graceful fallback messages.


πŸ”— Sample A2A Workflow JSON

{
  "active": true,
  "category": "career",
  "description": "Recommends projects to enhance CVs for specific job roles.",
  "name": "JobInsightAI",
  "nodes": [
    {
      "id": "job_agent",
      "name": "Job Insight AI Agent",
      "position": [400, 200],
      "type": "a2a/python-a2a-node",
      "url": "https://your-public-endpoint.com/a2a/jobinsight"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

This allows Telex.im to communicate with the agent in real time using REST.


🧰 Tools & Technologies

  • Python (Flask) – lightweight backend framework
  • SQLite – local job listings database
  • OpenAI / Groq API – for LLM recommendations
  • Telex.im A2A Protocol – for agent communication
  • JSON – standard message format between agent and Telex
  • HNG Internship (Stage 3) – providing the challenge and platform for real-world backend practice

πŸ’‘ Key Design Decisions

  1. Efficiency: Only query the AI after confirming a job match.
  2. Reusability: Each module (DB, logic, AI) is independent.
  3. Fallback Flow: Ensures no user query leads to a dead end.
  4. A2A Compliance: All responses are wrapped in valid Telex message JSON.

🧠 Example Output

User: I’m looking for a Frontend Developer role.

JobInsightAI:

  1. Build a responsive portfolio website – highlights HTML, CSS, and React skills.
  2. Develop a task manager app – showcases state management and component design.
  3. Clone a popular website (e.g., Twitter UI) – demonstrates UI/UX implementation.

🧩 Lessons Learned

  • Integrating A2A protocol requires clear message validation.
  • Building internal logic before calling the AI saves cost and improves performance.
  • Flask’s simplicity makes it ideal for rapid AI service deployment.
  • Combining a local cache (SQLite) with AI output yields faster, smarter agents.
  • HNG’s real-world tasks provide an excellent way to apply backend and AI skills in practical settings.

🏁 Conclusion

JobInsightAI demonstrates how AI can be used thoughtfully to guide career growth without overusing LLM resources.

It’s a small but powerful example of how structured backend logic and AI reasoning can work together within Telex.im’s A2A ecosystem.

This project solidified my understanding of:

  • AI agent design
  • RESTful integrations
  • Efficient LLM usage in backend systems

The next steps will involve improving job title extraction using NLP and expanding the job database for richer recommendations.

Top comments (0)