Running Your First Agent
This section will walk you through creating and running your first agent to interact with a webpage.
Create an Agent
POST https://api.assisfy.ai/agent/onboardconst createAgent = async () => {
const response = await fetch("https://api.assisfy.ai/agent/onboard", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ASSISFY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "My First Agent",
website: "https://example.com",
domain: "research", // Options: sales, marketing, research, automation, podcasting
}),
});
if (!response.ok) {
console.error("Failed to create agent:", response.statusText);
return;
}
const data = await response.json();
console.log("Agent created successfully:", data);
};
createAgent();Last updated