{"id":19838205,"url":"https://github.com/oceanpresentchao/llm-react","last_synced_at":"2025-05-01T18:31:03.296Z","repository":{"id":219068640,"uuid":"748084779","full_name":"OceanPresentChao/llm-ReAct","owner":"OceanPresentChao","description":"从零搭建Agent框架(Build LLM ReAct Agent from scratch)","archived":false,"fork":false,"pushed_at":"2024-10-23T13:02:26.000Z","size":2045,"stargazers_count":61,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T16:49:27.064Z","etag":null,"topics":["agent","from-scratch","llm","openai-api","tutorial","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OceanPresentChao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-25T08:40:33.000Z","updated_at":"2025-03-30T15:05:23.000Z","dependencies_parsed_at":"2024-01-31T05:03:57.681Z","dependency_job_id":"7272b96d-d217-4b9e-a835-939e95bd8a73","html_url":"https://github.com/OceanPresentChao/llm-ReAct","commit_stats":null,"previous_names":["oceanpresentchao/llm-agent","oceanpresentchao/llm-react"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OceanPresentChao%2Fllm-ReAct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OceanPresentChao%2Fllm-ReAct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OceanPresentChao%2Fllm-ReAct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OceanPresentChao%2Fllm-ReAct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OceanPresentChao","download_url":"https://codeload.github.com/OceanPresentChao/llm-ReAct/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251924663,"owners_count":21666013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","from-scratch","llm","openai-api","tutorial","typescript"],"created_at":"2024-11-12T12:17:02.284Z","updated_at":"2025-05-01T18:31:01.529Z","avatar_url":"https://github.com/OceanPresentChao.png","language":"TypeScript","readme":"# 从零搭建ReAct Agent框架\n本项目从零开始实现了ReAct Agent的流程：\n1. 任务规划\n2. 工具使用\n3. 简单的内存短期记忆\n\n![](./doc/media/1.PNG)\n![](./doc/media/4.png)\n\n## 项目结构\n- src\n  - agent.ts Agent组件，对接结构化数据和大模型的纯文本输入输出\n  - executor.ts Executor组件，负责协调各组件，运行事件循环指挥行动\n  - llm.ts OpenAI API的简单封装\n  - prompt.ts ReAct框架的Prompt模板\n  - tool.ts Tool组件，抽象组件类\n  - toolkit.ts 一些具体的Tool\n- config.json：项目的一些配置\n  - apiKey：openai的api key\n  - model：使用的openai的模型名\n\n## 教程\n\n- [手把手从零教你搭建Agent框架](./doc/手把手教你从零搭建Agent框架.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foceanpresentchao%2Fllm-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foceanpresentchao%2Fllm-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foceanpresentchao%2Fllm-react/lists"}