An OpenAI Agents SDK agent that reads Linear content needs a summary of the issue, not the interface around it. Linear requires authentication for most content, and the Linear API returns GraphQL responses with nested fields across issues, cycles, and projects that you have to parse and summarise before an agent can use them. Shared Linear links are easier to reach, but raw fetching returns the page template with navigation chrome, status labels, assignee panels, and priority indicators wrapped around the content the agent actually needs. EnConvert’s Distill endpoint takes a Linear URL and returns a clean summary of the issue or project content in one API call, ready to pass into an OpenAI Agents SDK tool.
How to Summarise Linear with OpenAI Agents SDK
How to summarise Linear inside an OpenAI Agents SDK agent with EnConvert Distill, returning a clean LLM-ready summary of any issue or project in one call
Get API keyExample
python
import os
import requests
from agents import Agent, Runner, function_tool
ENCONVERT_API_KEY = os.environ["ENCONVERT_API_KEY"]
# A Linear issue or project URL that opens without signing in. Distill renders
# the page in a headless browser with no session, so a login wall returns nothing.
LINEAR_URL = os.environ["LINEAR_URL"]
@function_tool
def summarise_linear_page(url: str) -> str:
"""Takes a Linear issue or project URL and returns a clean summary of its
title, description, and comment thread.
Args:
url: The Linear issue or project URL to summarise.
"""
# Step 1: Summarise the Linear page with EnConvert Distill
response = requests.post(
"https://api.enconvert.com/v2/distill",
headers={
"X-API-Key": ENCONVERT_API_KEY,
"Content-Type": "application/json",
},
json={
"urls": [url],
"schema": {
"summary": (
"a thorough summary of the page, covering its title, "
"its description, and the discussion in its comment thread"
),
},
},
timeout=60,
)
response.raise_for_status()
item = response.json()["results"][0]
summary = (item.get("data") or {}).get("summary")
if item.get("error") or not summary:
reason = item.get("error") or item.get("warnings") or "no summary extracted"
raise RuntimeError(f"Distill failed for {url}: {reason}")
return summary
# Step 2: Give the tool to an OpenAI Agents SDK agent
# (the SDK reads OPENAI_API_KEY from the environment)
agent = Agent(
name="Linear Assistant",
instructions=(
"You help engineering teams understand their Linear work. "
"Use the summarise_linear_page tool to read a Linear URL before answering."
),
tools=[summarise_linear_page],
)
result = Runner.run_sync(
agent,
f"Summarise {LINEAR_URL} and list any open questions in its comment thread.",
)
print(result.final_output)
What you get back
Distill returns the issue title, description, and comment thread as clean prose, with navigation chrome, status labels, assignee panels, and priority indicators stripped before the response comes back. Fetching the raw HTML instead returns Linear’s full page template with UI chrome embedded in the text. The Linear GraphQL API returns nested JSON across issues, cycles, and projects that still needs assembly and a separate summarisation step before it is useful inside an agent.