{"id":13614308,"url":"https://github.com/superagent-ai/superagent-js","last_synced_at":"2025-09-10T06:32:42.616Z","repository":{"id":169535219,"uuid":"642954414","full_name":"superagent-ai/superagent-js","owner":"superagent-ai","description":"Superagent Javascript SDK","archived":false,"fork":false,"pushed_at":"2024-05-23T06:41:26.000Z","size":1334,"stargazers_count":107,"open_issues_count":0,"forks_count":34,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T11:38:23.562Z","etag":null,"topics":["agent","ai","javascript","llm","superagent"],"latest_commit_sha":null,"homepage":"https://docs.superagent.sh","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/superagent-ai.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,"publiccode":null,"codemeta":null}},"created_at":"2023-05-19T18:24:33.000Z","updated_at":"2025-03-18T07:05:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8cd725f-3f40-4193-821a-62bdacefcacd","html_url":"https://github.com/superagent-ai/superagent-js","commit_stats":null,"previous_names":["homanp/superagent-js","superagent-ai/superagent-js"],"tags_count":148,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superagent-ai%2Fsuperagent-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superagent-ai","download_url":"https://codeload.github.com/superagent-ai/superagent-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248219954,"owners_count":21067207,"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","ai","javascript","llm","superagent"],"created_at":"2024-08-01T20:00:59.712Z","updated_at":"2025-04-10T12:51:17.903Z","avatar_url":"https://github.com/superagent-ai.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Superagent JavaScript SDK 🥷\n\n### The open framework for building AI Assistants\n\n\u003cp\u003e\n\n[![npm shield](https://img.shields.io/npm/v/superagentai-js)](https://www.npmjs.com/package/superagentai-js)\n\u003ca href=\"https://buildwithfern.com/?utm_source=homanp/suepragent-py/readme\"\u003e\n        \u003cimg alt=\"Fern\" src=\"https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen\" /\u003e\n    \u003c/a\u003e\u003cimg alt=\"GitHub Contributors\" src=\"https://img.shields.io/github/contributors/homanp/superagent-py\" /\u003e\n\u003cimg alt=\"GitHub Last Commit\" src=\"https://img.shields.io/github/last-commit/homanp/superagent-py\" /\u003e\n\u003cimg alt=\"\" src=\"https://img.shields.io/github/repo-size/homanp/superagent-py\" /\u003e\n\u003cimg alt=\"GitHub Issues\" src=\"https://img.shields.io/github/issues/homanp/superagent-py\" /\u003e\n\u003cimg alt=\"GitHub Pull Requests\" src=\"https://img.shields.io/github/issues-pr/homanp/superagent-py\" /\u003e\n\u003cimg alt=\"Github License\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" /\u003e\n\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/1110910277110743103?label=Discord\u0026logo=discord\u0026logoColor=white\u0026style=plastic\u0026color=d7b023)](https://discord.gg/e8j7mgjDUK\" /\u003e\n\u003c/p\u003e\n\n\u003c/div\u003e\n\n-----\n\nSuperagent is an open source framework that enables any developer to integrate production ready AI Assistants into any application in a matter of minutes.\n\n-----\n\n## Installation\n\nAdd this dependency to your project's build file:\n\n```bash\nnpm install superagentai-js\n# or\nyarn add superagentai-js\n```\n\n## Usage\n\n```ts\nimport { Superagent, SuperAgentClient } from \"superagentai-js\";\n\nconst client = new SuperAgentClient(token=\"API_TOKEN\")\nconst agent = await client.agent.create({\n    name: \"My Agent\",\n    description: \"My Awesome Agent\",\n    isActive: True,\n    llmModel: \"GPT_4_1106_PREVIEW\",\n    promprt: \"You are a helpful assistant\"\n});\n\noutput = await client.agent.invoke(agent.data.id, {\n    input: \"Hi there!\",\n    enableStreaming: false,\n    sessionId: \"123\",\n});\n\nconsole.log(\"Received response from superagent\", agent.data)\n```\n\n\n## Handling Exceptions\n\nAll exceptions thrown by the SDK will sublcass [SuperAgentError](./src/errors/SuperAgentError.ts).\n\n```ts\nimprot { SuperAgentError } from \"superagentai-js\";\n\ntry {\n  client.agent.invoke(...)\n} catch (err) {\n  if (err instanceof SuperAgentError) {\n    console.log(err.statusCode);\n    console.log(err.message);\n  }\n}\n```\n\n## Acknowledgements\n\nA special thanks to the [Fern](https://buildwithfern.com/) team for all support with the Superagent libraries and SDKs ❤️.\n\n## Beta status\n\nThis SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning the package version to a specific version. This way, you can install the \nsame version each time without breaking changes unless you are intentionally looking for the latest version.\n\n## Contributing\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved \nover to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we \nwill not be able to merge it as-is. We suggest opening an issue first to discuss with us!\n\nOn the other hand, contributions to the README are always very welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperagent-ai%2Fsuperagent-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperagent-ai%2Fsuperagent-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperagent-ai%2Fsuperagent-js/lists"}