# danish0511/developer-tools-research-ai-agent architecture

> Architecture diagram of the GitHub repository danish0511/developer-tools-research-ai-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danish0511/developer-tools-research-ai-agent
- Repository: https://github.com/danish0511/developer-tools-research-ai-agent

## Overview

##### Project Type and Purpose
- This is an open-source AI research agent framework, implemented in Python.
- It orchestrates multiple “tool agents” (scrapers, LLM connectors, evaluators) to research developer tools and trends.

##### File Structure Analysis
- Top-level:
- main.py (CLI entrypoint & orchestrator launcher)
- pyproject.toml / uv.lock (build & dependency management)
- .env (API keys)
- src/ directory:
- firecrawl.py (web scraping agent using Firecrawl API)
- models.py (Pydantic data models)
- prompts.py (LLM prompt templates)
- workflow.py (core orchestrator logic, agent chaining)
- __init__.py

##### README Insights
- Architecture sketch:
[User Goal] → [Orchestrator Agent] → [Tool Agents] → [Tool APIs/SDKs] → [LLM Model] → [Results]
- Emphasis on modularity (swap in/out agents), AI models (OpenAI, Gemini), and agent orchestration.

a. Main Components
1. User Interface (CLI arguments in main.py)
2. Orchestrator Agent (workflow.py)
3. Tool Agents (e.g., Firecrawl, language-model connectors)
4. External Service APIs/SDKs (Firecrawl API, OpenAI/Gemini APIs)
5. LLM Processing (via langchain connectors)
6. Internal Data Models & Prompts (models.py, prompts.py)

b. Relationships & Interactions
- User → CLI → Orchestrator
- Orchestrator loads agent registry → dispatches tasks to each Tool Agent
- Tool Agent invokes its external API/SDK
- Responses flow back to Orchestrator → aggregated and formatted via Prompts & Models → displayed to user

c. Architectural Patterns
- Modular Plugin Pattern (each Tool Agent implements a common interface)
- Pipeline/Chain-of-Responsibility (workflow.py orchestrates a chain of agent calls)
- Dependency Injection via Pydantic models and environment config

d. Key Technologies
- Python 3.10+, uv (installer)
- firecrawl-py for scraping
- langchain, langchain-openai, langchain-google-genai for LLM integration
- pydantic for data validation
- python-dotenv for config

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Top Layer: User Interface
    subgraph "User Interface"
        UI["CLI Entrypoint\n(main.py)"]:::user
    end

    %% Middle Layer: Core Logic
    subgraph "Core Logic" 
        ORC["Orchestrator Agent\n(src/workflow.py)"]:::core
        DM["Internal Data Models\n(src/models.py)"]:::core
        PT["Prompt Templates\n(src/prompts.py)"]:::core
        PKG["Package Init\n(src/__init__.py)"]:::core
    end

    %% Lower Layer: Agents & External Services
    subgraph "Tool Agents"
        FC["Firecrawl Agent\n(src/firecrawl.py)"]:::agent
        TA["Other Tool Agents\n(src/tool_agents/)"]:::agent
    end

    subgraph "External Services"
        FCA["Firecrawl API"]:::external
        LLM["LLM Providers\n(OpenAI/Gemini)"]:::external
    end

    %% Configuration & Manifest
    subgraph "Configuration"
        ENV["Environment Config\n(.env)"]:::config
        MAN["Dependency Manifest\n(pyproject.toml)"]:::config
        LOCK["Lockfile\n(uv.lock)"]:::config
    end

    %% Data Flows
    UI -->|"parse CLI args"| ORC
    ORC -->|"load registry"| TA
    ORC -->|"load registry"| FC
    FC -->|"HTTP request"| FCA
    FCA -->|"JSON response"| FC
    FC -->|"parsed data"| ORC
    TA -->|"dispatch task"| LLM
    LLM -->|"LLM response"| ORC
    ORC -->|"aggregate results"| DM
    ORC -->|"apply templates"| PT
    PT -->|"formatted output"| UI

    %% Dependency Injection / Config
    ENV -.-> DM
    ENV -.-> PT
    MAN -.-> ORC
    MAN -.-> FC
    LOCK -.-> ORC
    LOCK -.-> FC

    %% Click Events
    click UI "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/main.py"
    click ORC "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/src/workflow.py"
    click FC "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/src/firecrawl.py"
    click DM "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/src/models.py"
    click PT "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/src/prompts.py"
    click PKG "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/src/__init__.py"
    click ENV "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/.env"
    click MAN "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/pyproject.toml"
    click LOCK "https://github.com/danish0511/developer-tools-research-ai-agent/blob/main/uv.lock"

    %% Styles
    classDef user fill:#D2E5FF,stroke:#104E8B,color:#104E8B;
    classDef core fill:#E0F7E9,stroke:#2E7D32,color:#2E7D32;
    classDef agent fill:#E8F3D9,stroke:#4CAF50,color:#4CAF50;
    classDef external fill:#FFE0B2,stroke:#EF6C00,color:#EF6C00;
    classDef config fill:#F3E5F5,stroke:#6A1B9A,color:#6A1B9A;
```
