Skip to content

FEATURE REQUEST: Implement a General-Purpose GitHub Query Tool聽#98

Closed

Description

@smokeyScraper

Is your feature request related to a problem?

  • Yes, it is related to a problem

Describe the feature you'd like

馃専 Feature Description

This feature introduces a new, advanced tool for the DevRel Agent: a General-Purpose GitHub Query Tool. Instead of using pre-defined functions, this tool understands a user's natural language question, generates the Python code needed to query the GitHub API, executes it, and returns the answer.

This allows it to handle a wide variety of questions like:

  • "What repositories does sm0kxy contribute to?"
  • "How many open issues are in the Devr.AI repository?"

馃攳 Problem Statement

Creating a separate, hard-coded tool for every possible GitHub query is not scalable. A more flexible, intelligent solution is needed to handle a wide range of user questions without bloating the agent's toolkit.

馃幆 Expected Outcome

The result is a single, versatile tool that acts as a natural language interface to the GitHub API. It will:

  • Increase the agent's versatility to answer ad-hoc questions.
  • Reduce the need to develop numerous, narrowly-focused tools.
  • Empower users by letting them query GitHub using plain English.

馃摲 Screenshots and Design Ideas

The tool functions by translating a user's question into executable Python code.

  1. Trigger: The agent receives a query like, "How many repos does 'AOSSIE-Org' have?"
  2. Code Generation: The tool uses an LLM to translate the query into a Python script that calls the GitHub API.
  3. Secure Execution: The generated script is run in a secure, isolated sandbox environment to prevent any risk to the host system.
  4. Return Result: The output from the script's execution is captured.
  5. Final Answer: The agent takes the result and formats it into a human-readable response.

馃搵 Additional Context

  • Security: The use of a sandboxed environment is a critical, built-in part of the tool to ensure all code execution is safe.
  • Scope: Initially, the tool should be limited to read-only (GET) operations for maximum safety.

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on implementing this feature

Activity

  1. DhruvK278 commented on Jul 15, 2025

    @DhruvK278
    Contributor

    Hi @smokeyScraper can I work on this issue?

  2. smokeyScraper commented on Jul 15, 2025

    @smokeyScraper
    ContributorAuthor

    Yep, you could start working on this @DhruvK278 .

    It's a bit of a difficult issue ig, I too will be helping you out side by side on this. What I'm preferring is that instead of using predefined codes and workflow, the agent itself codes out what the user needs and runs in a Dockerized container, maybe? like the actual code running agent. So, yeah, this is entirely a subagent with the capability of writing code associated with GitHub on its own and running it.
    Model's internal knowledge will be decent enough for writing this code, but might fail as very much uncertain, so I'm preferring the agent to think in a way to perform a few concurrent web searches in order to get the latest codes from the web and align them as per the user's query.

    What do you think of this @chandansgowda ?
    We can initially have a workflow-based system too, with only determining out what is needed and already having code for how it is needed, btw, but yeah, this is something more of a true subagent.

    PS: realized this transitions like procedural vs declarative xD

  3. DhruvK278 commented on Jul 20, 2025

    @DhruvK278
    Contributor

    Hi @smokeyScraper , I did some research and came a with an idea
    So, the user parse a query from dc.
    Web scraping - Agent will use google search api for scraping.
    Code generation - Using the search results as context, the agent (powered by the Gemini API and Langchain) will generate a Python script to perform the requested action.
    Sandboxed execution - the generated script will be executed inside a Judge0 container (this script will have access to github_token to make api calls)
    Return result- the output from the script will be captured and sent back to the user on dc as the final answer.

    current workflow-
    User(query) -> Web scraping -> Code generation -> sandbox execution -> result on dc

    this flow will also dynamically generate and execute python scripts to answer user queries as you mentioned above.

    Please tell me what can i improve in this workflow so I could start to code it.

  4. smokeyScraper commented on Jul 20, 2025

    @smokeyScraper
    ContributorAuthor

    yeah, we want to align in this way only.
    Just for scraping/search we have DuckDuckGo as well Tavily, have you researched a bit on what we need for rest of components?

  5. DhruvK278 commented on Jul 20, 2025

    @DhruvK278
    Contributor

    yes for now,
    sandbox env - piston api (not using judge0 cuz i got to know piston is better)
    code generation - gemini api
    web scrapping - as u mentioned duckduckgo and tavily
    orchestration - langchain
    for now i have researched on these components will do some more research and get back to you.

  6. chandansgowda commented on Jul 21, 2025

    @chandansgowda
    Member

    @smokeyScraper do we really need custom implementation and code generation here. we can use github's mcp server (its okay even if we provide the features that their mcp provides for now).. they'll add more tools anyways.

  7. smokeyScraper commented on Jul 21, 2025

    @smokeyScraper
    ContributorAuthor

    yes, using github's MCP server seems a better option. I'll go through its docs and update on the issue itself.

  8. Keerthi421 commented on Sep 14, 2025

    @Keerthi421

    @smokeyScraper , Hey can you please assign me the issue , If it is still open

  9. smokeyScraper commented on Oct 1, 2025

    @smokeyScraper
    ContributorAuthor

    closed;
    implemented in #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions