ag-ui-protocol / ag-ui-protocol/ag-ui

docs(langgraph): add JSDocs to LangGraphAgent

Open
#1,985 0 comments 0 reactions 0 assignees View on GitHub
documentation Integration
Dominant language
Python
Stars
15.9k
Forks
1.4k
Avg merge
1d 17h
Merged PRs (30d)
163

Description

## Summary

`LangGraphAgent` in `integrations/langgraph/typescript/src/agent.ts` has no JSDoc comments on its class, constructor, public methods, or key private methods. This makes IDE hover-help and generated API docs sparse.

## What needs documentation

- Class-level `@class` / `@extends` doc
- Constructor params (`LangGraphAgentConfig`)
- All public methods: `clone`, `run`, `dispatchEvent`, `runAgentStream`, `prepareStream`, `prepareRegenerateStream`, `handleStreamEvents`, `handleSingleEvent`, `handleReasoningEvent`, `getStateSnapshot`, `getOrCreateThread`, `getThread`, `createThread`, `mergeConfigs`, `getMessageInProgress`, `setMessageInProgress`, `getAssistant`, `getSchemaKeys`, `langGraphDefaultMergeState`, `handleNodeChange`, `startStep`, `endStep`, `getCheckpointByMessage`, `abortRun`
- Key private methods: `handleMessagesTupleEvent` (already has an inline comment — promote to JSDoc)
- Public properties: `client`, `headers`, `graphId`, etc.

## Acceptance criteria

- Each public method has a `/** ... */` JSDoc with `@param`, `@returns`, and `@throws` where applicable
- No new runtime behavior introduced

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.