const KEY = "gb_sk_...";
const BASE = "https://api.gigabrain.gg/v1/superagents";
const headers = {
Authorization: `Bearer ${KEY}`,
"Content-Type": "application/json",
};
// Launch an agent
const agent = await fetch(BASE, {
method: "POST",
headers,
body: JSON.stringify({
name: "ETH Scalper",
soul_md: "You are an aggressive ETH scalper. Focus on short timeframes.",
}),
}).then((r) => r.json());
console.log(`Launched: ${agent.agent_id}`);
// Chat with it
const reply = await fetch(`${BASE}/${agent.agent_id}/chat`, {
method: "POST",
headers,
body: JSON.stringify({ message: "What's your current view on ETH?" }),
}).then((r) => r.json());
console.log(reply.content);