puzzleSimple Deep Research

Audience: Developers

Simple Deep Research

Use the GL Open DeepResearch SDK (gl-odr-sdk) for all research requests. Create a task or task group, then poll for status and result or stream events.

With the SDK

from gl_odr_sdk import DeepResearchClient

client = DeepResearchClient()  # uses GLODR_API_KEY, GLODR_BASE_URL

# Create a task
task = client.tasks.create(query="Your research question", profile="ESSENTIAL")

# Option A: Stream events in real time
for event in client.tasks.stream(task.task_id):
    print(f"{event.event_type}: {event.value}")

# Option B: Poll for status and result
status = client.tasks.get_status(task.task_id)
result = client.tasks.get(task.task_id)
if result.data:
    print(result.data.result)

Optional webhooks notify you when a task or task group completes so you don't have to poll. See Error handling and retries and the SDK's WebhookConfig.

For multiple queries with shared configuration, see Run Multiple Queries with Async Taskgroup. For a full walkthrough, see the Quick Start Guide.

Last updated