diff --git a/README.md b/README.md deleted file mode 100644 index e3791f1..0000000 --- a/README.md +++ /dev/null @@ -1,98 +0,0 @@ -
- -# Superagent JS/TS SDK 🥷 - -### The open framework for building AI Assistants - -

-PyPi -Fern -GitHub Contributors -GitHub Last Commit - -GitHub Issues -GitHub Pull Requests -Github License -Discord -

- -
- ------ - -Superagent is an open source framework that enables any developer to build production ready AI Assistants into any application in a matter of minutes. - ------ - -## Installation - -Add this dependency to your project's build file: - -```bash -npm i superagentai-js -``` - -## Usage - -```javascript -import { SuperAgentClient } from "superagentai-js" - -const superagent = new SuperAgentClient({ - environment: "https://api.beta.superagent.sh", // Replace with your own env - token: process.env.SUPERAGENT_API_KEY // Replace with your own API key -}) - -const {data: llm} = await superagent.llm.create({ - provider: "OPENAI", - apiKey: process.env.OPENAI_API_KEY -}) - -const {data: tool} = await superagent.tool.create({ - name: "Browser", - description: "Useful for answering questions/analsing a website or url.", - type: "BROWSER" -}) - -const {data: agent} = await superagent.agent.create({ - name: "My Agent", - description: "My awesome agent", - isActive: True, - llmModel: "GPT_4_1106_PREVIEW", - prompt: "You are a helpful assistant" -}) - -await superagent.agent.addLlm(agent.id, { - llmId: llm.id -}) - -await superagent.agent.addTool(agent.id, { - toolId: tool.id -}) - -const { data: { - output, - intermediate_steps: steps -} } = await superagent.agent.invoke(agent.id, { - input: userInput, - enableStreaming: false, - sessionId: "my-session" -}) - -console.log(output) -console.log(steps) - -``` - -## Acknowledgements - -A special thanks to the [Fern](https://buildwithfern.com/) team for all support with the Superagent libraries and SDKS ❤️. - -## Beta status - -This 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 in your pyproject.toml file. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version. - -## Contributing - -While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over 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 will not be able to merge it as-is. We suggest opening an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! diff --git a/package.json b/package.json index 6d070f5..ef5ef36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "superagentai-js", - "version": "v0.1.31", + "version": "v0.1.32", "private": false, "repository": "https://github.com/homanp/superagent-js", "main": "./index.js", diff --git a/src/api/resources/agent/client/Client.ts b/src/api/resources/agent/client/Client.ts index 99f6742..e629fef 100644 --- a/src/api/resources/agent/client/Client.ts +++ b/src/api/resources/agent/client/Client.ts @@ -33,7 +33,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -84,7 +84,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -148,7 +148,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -214,7 +214,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -278,7 +278,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -339,7 +339,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestAgentInvoke.jsonOrThrow(request, { @@ -408,7 +408,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestAgentLlm.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -472,7 +472,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -530,7 +530,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -596,7 +596,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestAgentTool.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -660,7 +660,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -718,7 +718,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -784,7 +784,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestAgentDatasource.jsonOrThrow(request, { @@ -850,7 +850,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -908,7 +908,7 @@ export class Agent { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, diff --git a/src/api/resources/apiUser/client/Client.ts b/src/api/resources/apiUser/client/Client.ts index 2d06425..16aabd7 100644 --- a/src/api/resources/apiUser/client/Client.ts +++ b/src/api/resources/apiUser/client/Client.ts @@ -34,7 +34,7 @@ export class ApiUser { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestApiUser.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -97,7 +97,7 @@ export class ApiUser { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -147,7 +147,7 @@ export class ApiUser { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, diff --git a/src/api/resources/datasource/client/Client.ts b/src/api/resources/datasource/client/Client.ts index 10ede43..191e443 100644 --- a/src/api/resources/datasource/client/Client.ts +++ b/src/api/resources/datasource/client/Client.ts @@ -33,7 +33,7 @@ export class Datasource { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -86,7 +86,7 @@ export class Datasource { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestDatasource.jsonOrThrow(request, { @@ -152,7 +152,7 @@ export class Datasource { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -218,7 +218,7 @@ export class Datasource { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestDatasource.jsonOrThrow(request, { @@ -284,7 +284,7 @@ export class Datasource { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, diff --git a/src/api/resources/llm/client/Client.ts b/src/api/resources/llm/client/Client.ts index 8d9b2b3..8157a17 100644 --- a/src/api/resources/llm/client/Client.ts +++ b/src/api/resources/llm/client/Client.ts @@ -33,7 +33,7 @@ export class Llm { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -84,7 +84,7 @@ export class Llm { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestLlm.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -148,7 +148,7 @@ export class Llm { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -214,7 +214,7 @@ export class Llm { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestLlm.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), diff --git a/src/api/resources/tool/client/Client.ts b/src/api/resources/tool/client/Client.ts index 293e119..954b5f5 100644 --- a/src/api/resources/tool/client/Client.ts +++ b/src/api/resources/tool/client/Client.ts @@ -33,7 +33,7 @@ export class Tool { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -84,7 +84,7 @@ export class Tool { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestTool.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -148,7 +148,7 @@ export class Tool { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -214,7 +214,7 @@ export class Tool { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestTool.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -278,7 +278,7 @@ export class Tool { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, diff --git a/src/api/resources/workflow/client/Client.ts b/src/api/resources/workflow/client/Client.ts index 6c16ba6..1c3a9e9 100644 --- a/src/api/resources/workflow/client/Client.ts +++ b/src/api/resources/workflow/client/Client.ts @@ -33,7 +33,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -84,7 +84,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestWorkflow.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -148,7 +148,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -214,7 +214,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestWorkflow.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -278,7 +278,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -336,7 +336,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.WorkflowInvoke.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -395,7 +395,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000, @@ -461,7 +461,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", body: await serializers.AppModelsRequestWorkflowStep.jsonOrThrow(request, { @@ -527,7 +527,7 @@ export class Workflow { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "superagentai-js", - "X-Fern-SDK-Version": "v0.1.31", + "X-Fern-SDK-Version": "v0.1.32", }, contentType: "application/json", timeoutMs: 60000,