A developer building a LlamaIndex pipeline that reads GitHub Issues needs clean, structured content before indexing or querying. GitHub Issues pages mix article content with label metadata, comment threads, assignee sidebars, and event logs, and scraping them by hand requires HTML selectors that break when GitHub updates its layout. EnConvert Distill accepts the issue URL, applies a schema the pipeline defines, and returns structured fields in one synchronous call. The pipeline gets structured content ready to index as LlamaIndex nodes with no HTML parsing.
How to Summarise GitHub Issues with LlamaIndex
GitHub Issues summarisation in LlamaIndex: EnConvert Distill returns schema-defined fields for up to 50 issue URLs in one synchronous call, no HTML parsing
Get API keyExample
python
import asyncio
import os
import requests
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.core.tools import FunctionTool
from llama_index.llms.openai import OpenAI
ENCONVERT_API_KEY = os.environ["ENCONVERT_API_KEY"]
# LlamaIndex's OpenAI integration reads OPENAI_API_KEY from the environment
ISSUE_SCHEMA = {
"title": "The issue title",
"body_summary": "A concise summary of the issue description and reported problem",
"labels": "The labels applied to the issue",
"status": "Whether the issue is open or closed",
"author": "The username that opened the issue",
"latest_activity": "A one sentence summary of the most recent comment",
}
def summarise_github_issues(urls: list[str]) -> str:
"""Reads GitHub issue pages and returns schema-defined fields for each issue."""
if len(urls) > 50:
return "Too many URLs. Distill accepts at most 50 per call."
response = requests.post(
"https://api.enconvert.com/v2/distill",
headers={
"X-API-Key": ENCONVERT_API_KEY,
"Content-Type": "application/json",
},
json={"urls": urls, "schema": ISSUE_SCHEMA},
timeout=300,
)
if response.status_code == 402:
raise RuntimeError("Distill requires a paid plan. Free tier returns 402.")
response.raise_for_status()
issues = []
for result in response.json()["results"]:
if result["status"] != "completed":
issues.append(f"Source: {result['url']}\nCould not be read ({result['status']}).")
continue
if result.get("render_quality", 1.0) < 0.5:
issues.append(
f"Source: {result['url']}\nLow render quality ({result['render_quality']}), skipped."
)
continue
data = result["data"] # keys match ISSUE_SCHEMA exactly
labels = data["labels"]
issues.append(
f"Source: {result['url']}\n"
f"Title: {data['title']}\n"
f"Status: {data['status']}\n"
f"Author: {data['author']}\n"
f"Labels: {', '.join(labels) if isinstance(labels, list) else labels}\n"
f"Summary: {data['body_summary']}\n"
f"Latest activity: {data['latest_activity']}"
)
return "\n\n---\n\n".join(issues)
issue_tool = FunctionTool.from_defaults(
fn=summarise_github_issues,
name="summarise_github_issues",
description="Reads GitHub issue pages and returns schema-defined fields for each issue.",
)
agent = FunctionAgent(
tools=[issue_tool],
llm=OpenAI(model="gpt-4.1"),
system_prompt=(
"You summarise GitHub issues. Use summarise_github_issues to read the issues you need, "
"answer only from what it returns, and cite the issue URL for every statement."
),
)
async def main():
response = await agent.run(
"Read https://github.com/langchain-ai/langchain/issues/2303 and summarise "
"the reported problem, its current status, and the most recent activity."
)
print(str(response))
asyncio.run(main())
What you get back
Distill returns the schema-defined fields inline as structured JSON in the data object, with no polling, no job_id, and no signed URL to fetch. The render_quality score lets the pipeline detect a login wall or challenge page before indexing incomplete content. Scraping GitHub Issues directly returns HTML containing label badges, timeline events, and comment threads mixed throughout the page, and a dedicated parser needs CSS selectors that break when GitHub changes its layout.