This guide shows you how to deploy the Superagent API to Render.com
-
Create a new
Web service
from within the Render dashboard. -
Select
Build and deploy from a Git repository
.
- Connect your Superaget fork from the list of repositories.
const apiUrl = | |
"https://api.beta.superagent.sh/api/v1/workflows/7261d731-9174-4659-9fcc-df4384058263/invoke"; | |
const outputSchema = { | |
type: "object", | |
properties: { | |
website: { type: "string" }, | |
industry: { type: "string" }, | |
number_of_employees: { type: "number" }, | |
company_type: { |
let inputConfig = input.config(); | |
const {recordId} = inputConfig | |
await fetch( | |
"https://tables.superagent.sh/api/workflows", | |
{ | |
method: "POST", | |
body: JSON.stringify( | |
{ | |
// REPLACE this with your workflow ID inside the Superagent dashboard |
# Simple RAG | |
workflows: | |
- superagent: | |
llm: gpt-4-1106-preview | |
data: | |
urls: | |
- https://s2.q4cdn.com/299287126/files/doc_financials/2023/q3/AMZN-Q3-2023-Earnings-Release.pdf | |
use_for: Answering questions about earning reports | |
name: Earnings assistant | |
intro: 👋 Hi there! How can I help you? |
workflows: | |
- superagent: | |
name: My assistant | |
llm: gpt-4-1106-preview | |
prompt: You are a helpful AI assitant. | |
intro: 👋 Hi there! How can I help you? | |
data: # This is for structured and unstructured data | |
use_for: Querying internal data | |
urls: | |
- https://acme.inc/test.pdf |
workflow: | |
assistant: | |
name: my assistant | |
description: my assistant description | |
llm: gpt-3.5-turbo-16k-0613 # The regular name of the model | |
prompt: My prompt | |
intro_message: Hello there! | |
tools: | |
browser: | |
# Optional |
import { SuperAgentClient } from "superagentai-js"; | |
const client = new SuperAgentClient({ | |
token: process.env["SUPERAGENT_API_KEY"], | |
environment: "https://api.beta.superagent.sh", | |
}); | |
async function createAgent(name, description, llmModel, prompt, isActive) { | |
return client.agent.create({ | |
name, |
openapi: 3.0.0 | |
info: | |
title: ThingAPI | |
description: Does a thing. | |
version: v1.0.0 | |
servers: | |
- url: https://api.drymergeqa.com | |
paths: | |
/execute/DryMerge/~/demo.api: | |
post: |
This guide shows you how to deploy the Superagent API to Render.com
Create a new Web service
from within the Render dashboard.
Select Build and deploy from a Git repository
.
// npm i superagentai-js | |
import { SuperAgentClient } from "superagentai-js"; | |
const GITHUB_REPO_URL = "https://github.com/homanp/nagato"; | |
const PROMPT = `You are a helpful AI assistant that's an expert at answering questions about the following Github repository: ${GITHUB_REPO_URL}\n\nAlways use the functions provided to answer all questions by the user.`; | |
interface Agent { | |
id: string; | |
name: string; |
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN}); | |
const superagentToken = ""; | |
const agentId = ""; | |
const channelId = context.params.event.channel_id; | |
const authorId = context.params.event.author.id; | |
const [response] = await Promise.all([ | |
fetch(`https://api.beta.superagent.sh/api/v1/agents/${agentId}/invoke`, { | |
method: "POST", | |
headers: { | |
"content-type": "application/json", |