{"_id":"@allem-sdk/agents","_rev":"5-2179a8df496fb792cbd1b05b4b6da101","name":"@allem-sdk/agents","dist-tags":{"latest":"0.1.4"},"versions":{"0.2.0":{"name":"@allem-sdk/agents","version":"0.2.0","keywords":["allem-sdk","agents","ai","react","hooks","tools","multi-step","vercel-ai-sdk"],"author":{"name":"Ahmed Allem"},"license":"MIT","_id":"@allem-sdk/agents@0.2.0","maintainers":[{"name":"kingofmit","email":"allem.ahmed@gmail.com"}],"homepage":"https://github.com/kingofmit/allem-sdk#readme","bugs":{"url":"https://github.com/kingofmit/allem-sdk/issues"},"dist":{"shasum":"5b44720e4fff2f395195d3f5b93af4636411d147","tarball":"https://registry.npmjs.org/@allem-sdk/agents/-/agents-0.2.0.tgz","fileCount":16,"integrity":"sha512-hRTw1P9NPzqyJVeUF/KIdRWwJyuCaw3+h3+vzBHT4TO0B5tyF1+LGIYHTuivux1mirDwWhKQ9A+Q30tblb1STw==","signatures":[{"sig":"MEUCIQD/KqNbmZeh0xNNLJS8XPBBQ1aVE0vZAwEkR2Gq3gMdkAIgIsLmfQQ4KDS2jvdWf+ktxqj6Nk2quBbF5WYl4PVLTO8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50043},"main":"./dist/index.js","_from":"file:allem-sdk-agents-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"}},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"kingofmit","email":"allem.ahmed@gmail.com"},"_resolved":"/private/var/folders/4v/rph2hgm54rqf12vzbjxpn5kc0000gn/T/174e0a459e26a0e0d84c1a36d4f51f75/allem-sdk-agents-0.2.0.tgz","_integrity":"sha512-hRTw1P9NPzqyJVeUF/KIdRWwJyuCaw3+h3+vzBHT4TO0B5tyF1+LGIYHTuivux1mirDwWhKQ9A+Q30tblb1STw==","repository":{"url":"git+https://github.com/kingofmit/allem-sdk.git","type":"git","directory":"packages/agents"},"_npmVersion":"11.12.1","description":"Agentic AI hooks for React with multi-step tool calling, status tracking, and typed tool definitions. Built on Vercel AI SDK.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.185","tsup":"^8.4.0","react":"^19.0.0","vitest":"^3.0.0","typescript":"^5.8.0","@types/react":"^19.0.0","@ai-sdk/react":"^3.0.187","@allem-sdk/ai":"0.1.1"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0","react":">=18.0.0","@ai-sdk/react":">=3.0.0","@allem-sdk/ai":">=0.1.0"},"peerDependenciesMeta":{"zod":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/agents_0.2.0_1779492450731_0.8357659492289484","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@allem-sdk/agents","version":"0.2.1","keywords":["allem-sdk","agents","ai","react","hooks","tools","multi-step","vercel-ai-sdk"],"author":{"name":"Ahmed Allem"},"license":"MIT","_id":"@allem-sdk/agents@0.2.1","maintainers":[{"name":"kingofmit","email":"allem.ahmed@gmail.com"}],"homepage":"https://github.com/kingofmit/allem-sdk#readme","bugs":{"url":"https://github.com/kingofmit/allem-sdk/issues"},"dist":{"shasum":"ff27e4d4dd9bc82588ecd503eb5731c2edd4064c","tarball":"https://registry.npmjs.org/@allem-sdk/agents/-/agents-0.2.1.tgz","fileCount":16,"integrity":"sha512-umf+aPqTabAerjmpmFU/XUux6mXOAcdEXAAEd/5yMYKTs7swZfDXu6Yf697RIa98BPgsi3ZsfSfjI9EoXsadOw==","signatures":[{"sig":"MEUCIBmS//HlxATZv5lPGXyxhbIhB+srqhqFW80D9MqETrPKAiEAxG7qHNatImL5a/LiEXJHxOLMsFVas75dqCLMfc78f64=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50043},"main":"./dist/index.js","_from":"file:allem-sdk-agents-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"}},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"kingofmit","email":"allem.ahmed@gmail.com"},"_resolved":"/private/var/folders/4v/rph2hgm54rqf12vzbjxpn5kc0000gn/T/2ce8bafd799dd857f50514916f281b17/allem-sdk-agents-0.2.1.tgz","_integrity":"sha512-umf+aPqTabAerjmpmFU/XUux6mXOAcdEXAAEd/5yMYKTs7swZfDXu6Yf697RIa98BPgsi3ZsfSfjI9EoXsadOw==","repository":{"url":"git+https://github.com/kingofmit/allem-sdk.git","type":"git","directory":"packages/agents"},"_npmVersion":"11.12.1","description":"Agentic AI hooks for React with multi-step tool calling, status tracking, and typed tool definitions. Built on Vercel AI SDK.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.185","tsup":"^8.4.0","react":"^19.0.0","vitest":"^3.0.0","typescript":"^5.8.0","@types/react":"^19.0.0","@ai-sdk/react":"^3.0.187","@allem-sdk/ai":"0.1.1"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0","react":">=18.0.0","@ai-sdk/react":">=3.0.0","@allem-sdk/ai":">=0.1.0"},"peerDependenciesMeta":{"zod":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/agents_0.2.1_1779494828587_0.5727499713882589","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@allem-sdk/agents","version":"0.1.2","keywords":["allem-sdk","agents","ai","react","hooks","tools","multi-step","vercel-ai-sdk"],"author":{"name":"Ahmed Allem"},"license":"MIT","_id":"@allem-sdk/agents@0.1.2","maintainers":[{"name":"kingofmit","email":"allem.ahmed@gmail.com"}],"homepage":"https://github.com/kingofmit/allem-sdk#readme","bugs":{"url":"https://github.com/kingofmit/allem-sdk/issues"},"dist":{"shasum":"cfb10af8cad2fb5af3968bc2fcef8780b56f027d","tarball":"https://registry.npmjs.org/@allem-sdk/agents/-/agents-0.1.2.tgz","fileCount":14,"integrity":"sha512-D1Rb56v6+3cAMvkqP4aAg5qPxpZ3hlnShDuUc4R9UJZYRhsE3AYnfmtulqv17MgLxKr0T4lcmc2V21M8aK+ung==","signatures":[{"sig":"MEYCIQDCt1vlSxUSKFwT6V1x6sWFicyEDt0bfPyFwdkfY13IFQIhAOYaFYIsLnUD27g2WjACrDqi3V1Ss/2kscPSsk1wB9ox","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43083},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"}},"gitHead":"a2c1ed3ea28093d250556a0b252d4c3c72264b4c","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"kingofmit","email":"allem.ahmed@gmail.com"},"repository":{"url":"git+https://github.com/kingofmit/allem-sdk.git","type":"git","directory":"packages/agents"},"_npmVersion":"11.12.1","description":"Agentic AI hooks for React with multi-step tool calling, status tracking, and typed tool definitions. Built on Vercel AI SDK.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.185","tsup":"^8.4.0","react":"^19.0.0","vitest":"^3.0.0","typescript":"^5.8.0","@types/react":"^19.0.0","@ai-sdk/react":"^3.0.187","@allem-sdk/ai":"workspace:*"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0","react":">=18.0.0","@ai-sdk/react":">=3.0.0","@allem-sdk/ai":">=0.1.0"},"peerDependenciesMeta":{"zod":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/agents_0.1.2_1779495900164_0.43804733647720306","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@allem-sdk/agents","version":"0.1.3","keywords":["allem-sdk","ai-agents","agents","ai","react","react-hooks","tool-calling","vercel-ai-sdk","ai-sdk","chatbot","llm","multi-step","typescript","nextjs","zod"],"author":{"name":"Ahmed Allem"},"license":"MIT","_id":"@allem-sdk/agents@0.1.3","maintainers":[{"name":"kingofmit","email":"allem.ahmed@gmail.com"}],"homepage":"https://github.com/kingofmit/allem-sdk#readme","bugs":{"url":"https://github.com/kingofmit/allem-sdk/issues"},"dist":{"shasum":"98699a95774dd9137309bf0feac0625b6f1c4d76","tarball":"https://registry.npmjs.org/@allem-sdk/agents/-/agents-0.1.3.tgz","fileCount":16,"integrity":"sha512-vAuumqQ4VtTFMOFWb6QLAh273fyCxrGHIpHID8tTVYy+T4k1hR90qVSu8ZTOqbbe8Nbu9FiTnRj2PKNDWpupOQ==","signatures":[{"sig":"MEUCIEr3WAJ8C2TyzyyYGaQwClWwE6MVM0aWuIZ5uu1w87YJAiEAkEZpVRVrek1bmJ6L/NM0+OxOhXQrdLQ/kDHw6IPkmcM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50156},"main":"./dist/index.js","_from":"file:allem-sdk-agents-0.1.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"}},"scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"kingofmit","email":"allem.ahmed@gmail.com"},"_resolved":"/private/var/folders/4v/rph2hgm54rqf12vzbjxpn5kc0000gn/T/bc5c748b022312f1286bcf11b229f85a/allem-sdk-agents-0.1.3.tgz","_integrity":"sha512-vAuumqQ4VtTFMOFWb6QLAh273fyCxrGHIpHID8tTVYy+T4k1hR90qVSu8ZTOqbbe8Nbu9FiTnRj2PKNDWpupOQ==","repository":{"url":"git+https://github.com/kingofmit/allem-sdk.git","type":"git","directory":"packages/agents"},"_npmVersion":"11.12.1","description":"Agentic AI hooks for React with multi-step tool calling, status tracking, and typed tool definitions. Built on Vercel AI SDK.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ai":"^6.0.185","tsup":"^8.4.0","react":"^19.0.0","vitest":"^3.0.0","typescript":"^5.8.0","@types/react":"^19.0.0","@ai-sdk/react":"^3.0.187","@allem-sdk/ai":"0.1.2"},"peerDependencies":{"ai":">=6.0.0","zod":">=3.0.0","react":">=18.0.0","@ai-sdk/react":">=3.0.0","@allem-sdk/ai":">=0.1.2"},"peerDependenciesMeta":{"zod":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/agents_0.1.3_1779499471677_0.4512648247948978","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@allem-sdk/agents","version":"0.1.4","description":"Agentic AI hooks for React with multi-step tool calling, status tracking, and typed tool definitions. Built on Vercel AI SDK.","license":"MIT","author":{"name":"Ahmed Allem"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client.d.ts","import":"./dist/client.mjs","require":"./dist/client.js"},"./server":{"types":"./dist/server.d.ts","import":"./dist/server.mjs","require":"./dist/server.js"}},"sideEffects":false,"devDependencies":{"@ai-sdk/react":"^3.0.187","@types/react":"^19.0.0","ai":"^6.0.185","react":"^19.0.0","tsup":"^8.4.0","typescript":"^5.8.0","vitest":"^3.0.0","@allem-sdk/ai":"0.1.3"},"peerDependencies":{"@allem-sdk/ai":">=0.1.3","@ai-sdk/react":">=3.0.0","ai":">=6.0.0","react":">=18.0.0","zod":">=3.0.0"},"peerDependenciesMeta":{"zod":{"optional":true}},"repository":{"type":"git","url":"git+https://github.com/kingofmit/allem-sdk.git","directory":"packages/agents"},"keywords":["allem-sdk","ai-agents","agents","ai","react","react-hooks","tool-calling","vercel-ai-sdk","ai-sdk","chatbot","llm","multi-step","typescript","nextjs","zod"],"publishConfig":{"access":"public"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"rm -rf dist","test":"vitest run"},"_id":"@allem-sdk/agents@0.1.4","bugs":{"url":"https://github.com/kingofmit/allem-sdk/issues"},"homepage":"https://github.com/kingofmit/allem-sdk#readme","_integrity":"sha512-0dye/LoUTS9qLFyRwEWA0O/tRZwJxMYpVexhR7JcCS/m+3+Q5HegwUH1C426A1UMWTyriXnlP2Fo0VVdEtjBnw==","_resolved":"/private/var/folders/4v/rph2hgm54rqf12vzbjxpn5kc0000gn/T/8d67f350eb58eba89ce276db68fddfb2/allem-sdk-agents-0.1.4.tgz","_from":"file:allem-sdk-agents-0.1.4.tgz","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-0dye/LoUTS9qLFyRwEWA0O/tRZwJxMYpVexhR7JcCS/m+3+Q5HegwUH1C426A1UMWTyriXnlP2Fo0VVdEtjBnw==","shasum":"808d9724940aa95812cc57926417726f07d898ca","tarball":"https://registry.npmjs.org/@allem-sdk/agents/-/agents-0.1.4.tgz","fileCount":16,"unpackedSize":92597,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEHx941eaaEP6gTv7zTLhToxUsYAG1pZmj0eA9qQ2BuhAiEAtuCwAGDz9eYw16+lVTyk12UmbyXGY63c4ImQVfymj14="}]},"_npmUser":{"name":"kingofmit","email":"allem.ahmed@gmail.com"},"directories":{},"maintainers":[{"name":"kingofmit","email":"allem.ahmed@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agents_0.1.4_1779571359652_0.41297608274652386"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-22T23:27:30.635Z","modified":"2026-05-23T21:22:39.933Z","0.2.0":"2026-05-22T23:27:30.883Z","0.2.1":"2026-05-23T00:07:08.769Z","0.1.2":"2026-05-23T00:25:00.360Z","0.1.3":"2026-05-23T01:24:31.821Z","0.1.4":"2026-05-23T21:22:39.809Z"},"bugs":{"url":"https://github.com/kingofmit/allem-sdk/issues"},"author":{"name":"Ahmed Allem"},"license":"MIT","homepage":"https://github.com/kingofmit/allem-sdk#readme","keywords":["allem-sdk","ai-agents","agents","ai","react","react-hooks","tool-calling","vercel-ai-sdk","ai-sdk","chatbot","llm","multi-step","typescript","nextjs","zod"],"repository":{"type":"git","url":"git+https://github.com/kingofmit/allem-sdk.git","directory":"packages/agents"},"description":"Agentic AI hooks for React with multi-step tool calling, status tracking, and typed tool definitions. Built on Vercel AI SDK.","maintainers":[{"name":"kingofmit","email":"allem.ahmed@gmail.com"}],"readme":"<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/kingofmit/allem-sdk/main/.github/AllemSDK.png\" alt=\"Allem SDK\" />\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@allem-sdk/agents\"><img src=\"https://img.shields.io/npm/v/@allem-sdk/agents.svg\" alt=\"npm version\" /></a>\n  <a href=\"https://github.com/kingofmit/allem-sdk/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License\" /></a>\n  <img src=\"https://img.shields.io/badge/react-19-61dafb\" alt=\"React 19\" />\n  <img src=\"https://img.shields.io/badge/typescript-strict-blue\" alt=\"TypeScript\" />\n  <img src=\"https://img.shields.io/badge/AI_SDK-v6-black\" alt=\"AI SDK v6\" />\n</p>\n\n# @allem-sdk/agents\n\nAgentic AI hooks for React. Multi-step tool calling, agent status tracking, and typed tool definitions built on [Vercel AI SDK v6](https://sdk.vercel.ai).\n\n## Installation\n\n```bash\nnpm install @allem-sdk/agents @allem-sdk/ai ai @ai-sdk/react\n\n# Install at least one provider\nnpm install @ai-sdk/google    # Google Gemini\nnpm install @ai-sdk/anthropic # Anthropic Claude\nnpm install @ai-sdk/openai    # OpenAI GPT\n\n# For defining tools with schemas\nnpm install zod\n```\n\n## Client Usage\n\n```tsx\nimport { AllemAIProvider } from \"@allem-sdk/ai\";\nimport { useAllemAgent } from \"@allem-sdk/agents\";\n\nfunction App() {\n  return (\n    <AllemAIProvider api=\"/api/agent\" provider=\"google\">\n      <Agent />\n    </AllemAIProvider>\n  );\n}\n\nfunction Agent() {\n  const {\n    messages,\n    sendMessage,\n    agentStatus,\n    steps,\n    currentToolCalls,\n    isAgentRunning,\n  } = useAllemAgent();\n\n  return (\n    <div>\n      {agentStatus === \"calling-tool\" && (\n        <p>Using tool: {currentToolCalls[0]?.toolName}</p>\n      )}\n      {messages.map((m) => (\n        <div key={m.id}>\n          {m.parts?.filter((p) => p.type === \"text\").map((p) => p.text).join(\"\")}\n        </div>\n      ))}\n      <p>Steps taken: {steps.length}</p>\n    </div>\n  );\n}\n```\n\n## Server Usage\n\n```ts\n// app/api/agent/route.ts (Next.js)\nimport { createAllemAgentHandler, createAllemTool } from \"@allem-sdk/agents\";\nimport { google } from \"@ai-sdk/google\";\nimport { z } from \"zod\";\n\nconst weatherTool = createAllemTool({\n  description: \"Get the current weather for a location\",\n  parameters: z.object({ city: z.string() }),\n  execute: async ({ city }) => {\n    return { city, temperature: 72, condition: \"sunny\" };\n  },\n});\n\nexport const POST = createAllemAgentHandler({\n  providers: {\n    google: (model) => google(model ?? \"gemini-2.0-flash\"),\n  },\n  tools: { weather: weatherTool },\n});\n```\n\n## Exports\n\n| Export | Type | Description |\n|--------|------|-------------|\n| `useAllemAgent` | Hook | Agent hook with status tracking, step history, and tool call awareness |\n| `AgentProvider` | Component | Optional context for registering tool metadata (names/descriptions) |\n| `useAgentTools` | Hook | Read registered tool metadata from AgentProvider |\n| `createAllemAgentHandler` | Server | Request handler with tool calling support for agentic workflows |\n| `createAllemTool` | Server | Typed tool definition helper with zod schema validation |\n\n## Part of [Allem SDK](https://github.com/kingofmit/allem-sdk)\n\nThis package can be used standalone or as part of the full SDK. Install `allem-sdk` to get all packages in one install.\n\n## Support\n\nIf you find Allem SDK useful, consider supporting its development:\n\n<a href=\"https://buymeacoffee.com/kingofmit\" target=\"_blank\"><img src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"50\" /></a>\n\n## License\n\n[MIT](https://github.com/kingofmit/allem-sdk/blob/main/LICENSE) - [Ahmed Allem](https://kingallem.com)\n","readmeFilename":"README.md"}