{"_id":"@agent-orch/react-agent","name":"@agent-orch/react-agent","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@agent-orch/react-agent","version":"0.0.1","type":"module","exports":{".":{"source":"./src/index.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.cjs"}},"main":"./dist/cjs/index.cjs","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","scripts":{"build":"rslib build","dev":"rslib build --watch","test":"vitest run","typecheck":"tsc --noEmit","clean":"rm -rf dist","lint":"eslint src/"},"dependencies":{"@agent-orch/core":"^0.0.1-beta.3"},"devDependencies":{"@rslib/core":"^0.6.0","typescript":"^5.8.0","vitest":"^3.1.0","zod":"^3.24.0"},"gitHead":"89c385cc357c523f7ea354d50636c3097378ce2b","_id":"@agent-orch/react-agent@0.0.1","description":"ReAct (Reason + Act) agent runtime for the Agent Orch framework. Implements the core agent loop: **LLM call → tool execution → repeat until done**.","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-NjHmWD38mgFBZedTAk0vtFlxo6zuXwk/rqrymlgeiuxbiTJgodTxiBnvHyYSxmIg2ikD/GTjy0BX5/ZKD5HCgg==","shasum":"0a7c5fe4fd63a67ef669ad1104bd49f76477f6c1","tarball":"https://registry.npmjs.org/@agent-orch/react-agent/-/react-agent-0.0.1.tgz","fileCount":22,"unpackedSize":64440,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBC9StgGNHDp+9pjf8MVXaUzieM/wFgJFmjltUDmfxDEAiAQjRr60yoH59ODhkbuUkBfKJd8jp+G8hKZgPL1VCAB8g=="}]},"_npmUser":{"name":"yuliang.fe","email":"yulight4512@gmail.com"},"directories":{},"maintainers":[{"name":"yuliang.fe","email":"yulight4512@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-agent_0.0.1_1775311909004_0.9766825832465122"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-04T14:11:48.896Z","0.0.1":"2026-04-04T14:11:49.149Z","modified":"2026-04-04T14:11:49.402Z"},"maintainers":[{"name":"yuliang.fe","email":"yulight4512@gmail.com"}],"description":"ReAct (Reason + Act) agent runtime for the Agent Orch framework. Implements the core agent loop: **LLM call → tool execution → repeat until done**.","readme":"# @agent-orch/react-agent\n\nReAct (Reason + Act) agent runtime for the Agent Orch framework. Implements the core agent loop: **LLM call → tool execution → repeat until done**.\n\n## Features\n\n- Automatic context compression (microcompact + compact)\n- Tool confirmation mechanism (human-in-the-loop via wait/resolve)\n- Configurable max turns (default 20)\n- Before/after LLM hooks for custom logic injection\n\n## Installation\n\n```bash\npnpm add @agent-orch/react-agent\n```\n\n## Key API\n\n| Export | Description |\n|--------|-------------|\n| `Agent` | Main agent class implementing the ReAct loop |\n\n### Agent\n\nThe `Agent` class exposes a `runStream()` method that returns an `AsyncGenerator<StreamEvent>`, emitting events as the agent reasons and acts.\n\n## Usage\n\n```typescript\nimport { Agent } from \"@agent-orch/react-agent\";\n\nconst agent = new Agent({\n  llm,\n  tools,\n  systemPrompt: \"You are a helpful assistant.\",\n  maxTurns: 20,\n});\n\nconst stream = agent.runStream(messages);\n\nfor await (const event of stream) {\n  switch (event.type) {\n    case \"text_delta\":\n      process.stdout.write(event.delta);\n      break;\n    case \"tool_call\":\n      console.log(`Calling ${event.name}...`);\n      break;\n  }\n}\n```\n\n## Dependencies\n\n| Package | Purpose |\n|---------|---------|\n| `@agent-orch/core` | Core types, interfaces, and stream events |\n\n## Documentation\n\nSee the [Agent Orch docs](../../../README.md) for full framework documentation.\n","readmeFilename":"README.md","_rev":"1-60cad875ed1ff3e24713259d8d0b47bf"}