[PR #728] [MERGED] refactor: full typed & iterator of agent worker/runner (part 3) #1024

Closed
opened 2026-02-15 21:16:21 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/LlamaIndexTS/pull/728
Author: @himself65
Created: 4/16/2024
Status: Merged
Merged: 4/19/2024
Merged by: @himself65

Base: mainHead: himself65/20240416/agent


📝 Commits (10+)

  • b017e3e refactor: full typed & iterator of agent worker/runner
  • cd96079 fix: cleanup
  • 0291758 fix: openai agent
  • 5e8cd6e feat: refactor openai agent
  • 8d618c8 fix: last step output
  • 2499ac1 docs: add design document
  • eb5deb0 feat: react agent
  • 30f1f18 Merge remote-tracking branch 'refs/remotes/upstream/main' into himself65/20240416/agent
  • 8cdec91 fix: manual
  • 7185d86 fix: max tool call

📊 Changes

63 files changed (+2038 additions, -5413 deletions)

View changed files

📝 .npmrc (+2 -1)
📝 apps/docs/docs/examples/agent.mdx (+3 -77)
📝 apps/docs/docs/modules/agent/index.md (+7 -1)
apps/docs/docs/modules/agent/multi_document_agent.mdx (+0 -307)
apps/docs/docs/modules/agent/openai.mdx (+0 -185)
apps/docs/docs/modules/agent/query_engine_tool.mdx (+0 -130)
apps/docs/docs/modules/agent/react_agent.mdx (+0 -201)
📝 examples/agent/multi_document_agent.ts (+1 -1)
📝 examples/agent/openai.ts (+39 -53)
📝 examples/agent/react_agent.ts (+4 -4)
📝 examples/agent/step_wise_openai.ts (+4 -15)
📝 examples/agent/step_wise_query_tool.ts (+5 -25)
📝 examples/agent/step_wise_react.ts (+9 -16)
📝 examples/package.json (+4 -1)
📝 examples/readers/package.json (+1 -1)
📝 examples/recipes/cost-analysis.ts (+3 -3)
📝 examples/tsconfig.json (+2 -1)
📝 packages/core/.gitignore (+1 -1)
📝 packages/core/e2e/fixtures/llm/open_ai.ts (+9 -6)
📝 packages/core/e2e/node/claude.e2e.ts (+8 -8)

...and 43 more files

📄 Description

Fixes: https://github.com/run-llama/LlamaIndexTS/issues/692, https://github.com/run-llama/LlamaIndexTS/issues/557

Follow the original design doc: https://github.com/run-llama/llama_index/blob/5a6ffe32faa75db0b4737d1e7a85e6fe4afe94af/docs/module_guides/deploying/agents/agent_runner.md.

  • Async Iterable task
  • Remove complex & duplicated LLM-translated code (I spent 2 days to realize that what the original design means and how to reduce old TS code)

Checklist

  • migrate OpenAIAgent
  • migrate ReActAgent
  • ReActAgent streaming
  • Test coverage
  • Object Retrieval

Nice to have

  • Mistral AI Agent

In future step, we are going to support multi-model in agent


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/LlamaIndexTS/pull/728 **Author:** [@himself65](https://github.com/himself65) **Created:** 4/16/2024 **Status:** ✅ Merged **Merged:** 4/19/2024 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `main` ← **Head:** `himself65/20240416/agent` --- ### 📝 Commits (10+) - [`b017e3e`](https://github.com/run-llama/LlamaIndexTS/commit/b017e3e07444b3ed3878f4eda890e85632badfea) refactor: full typed & iterator of agent worker/runner - [`cd96079`](https://github.com/run-llama/LlamaIndexTS/commit/cd96079e277788960d791482fb9f3ba7bc3548b5) fix: cleanup - [`0291758`](https://github.com/run-llama/LlamaIndexTS/commit/0291758e9e2cd57e4b2c4d11e5d9bc2a14424d7c) fix: openai agent - [`5e8cd6e`](https://github.com/run-llama/LlamaIndexTS/commit/5e8cd6ec9ab021cfe1f9796062c03f7badb64cae) feat: refactor openai agent - [`8d618c8`](https://github.com/run-llama/LlamaIndexTS/commit/8d618c8f5f13c769d925dac9f85ca5431e38c44d) fix: last step output - [`2499ac1`](https://github.com/run-llama/LlamaIndexTS/commit/2499ac1d98c78e686d3e4f6928265f16a63d608a) docs: add design document - [`eb5deb0`](https://github.com/run-llama/LlamaIndexTS/commit/eb5deb0be99ef71b1838345f9343ccdbe77c0201) feat: react agent - [`30f1f18`](https://github.com/run-llama/LlamaIndexTS/commit/30f1f18b7b74c968ec9e505197a48d4a88b7c3a3) Merge remote-tracking branch 'refs/remotes/upstream/main' into himself65/20240416/agent - [`8cdec91`](https://github.com/run-llama/LlamaIndexTS/commit/8cdec91c3077793fc65e6d5ce31631b290c63353) fix: manual - [`7185d86`](https://github.com/run-llama/LlamaIndexTS/commit/7185d8613c094f27bd19b2f4430a5bdbb867c360) fix: max tool call ### 📊 Changes **63 files changed** (+2038 additions, -5413 deletions) <details> <summary>View changed files</summary> 📝 `.npmrc` (+2 -1) 📝 `apps/docs/docs/examples/agent.mdx` (+3 -77) 📝 `apps/docs/docs/modules/agent/index.md` (+7 -1) ➖ `apps/docs/docs/modules/agent/multi_document_agent.mdx` (+0 -307) ➖ `apps/docs/docs/modules/agent/openai.mdx` (+0 -185) ➖ `apps/docs/docs/modules/agent/query_engine_tool.mdx` (+0 -130) ➖ `apps/docs/docs/modules/agent/react_agent.mdx` (+0 -201) 📝 `examples/agent/multi_document_agent.ts` (+1 -1) 📝 `examples/agent/openai.ts` (+39 -53) 📝 `examples/agent/react_agent.ts` (+4 -4) 📝 `examples/agent/step_wise_openai.ts` (+4 -15) 📝 `examples/agent/step_wise_query_tool.ts` (+5 -25) 📝 `examples/agent/step_wise_react.ts` (+9 -16) 📝 `examples/package.json` (+4 -1) 📝 `examples/readers/package.json` (+1 -1) 📝 `examples/recipes/cost-analysis.ts` (+3 -3) 📝 `examples/tsconfig.json` (+2 -1) 📝 `packages/core/.gitignore` (+1 -1) 📝 `packages/core/e2e/fixtures/llm/open_ai.ts` (+9 -6) 📝 `packages/core/e2e/node/claude.e2e.ts` (+8 -8) _...and 43 more files_ </details> ### 📄 Description Fixes: https://github.com/run-llama/LlamaIndexTS/issues/692, https://github.com/run-llama/LlamaIndexTS/issues/557 Follow the original design doc: https://github.com/run-llama/llama_index/blob/5a6ffe32faa75db0b4737d1e7a85e6fe4afe94af/docs/module_guides/deploying/agents/agent_runner.md. - Async Iterable task - Remove complex & duplicated LLM-translated code (I spent 2 days to realize that what the original design means and how to reduce old TS code) ## Checklist - [x] migrate OpenAIAgent - [x] migrate ReActAgent - [x] ReActAgent streaming - [x] Test coverage - [x] Object Retrieval - [x] Test case - [x] [Example](https://github.com/run-llama/LlamaIndexTS/pull/718#issuecomment-2056851997) ### Nice to have - [ ] Mistral AI Agent In future step, we are going to support multi-model in agent --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 21:16:21 -05:00
yindo closed this issue 2026-02-15 21:16:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/LlamaIndexTS#1024