AgentOven

TypeScript SDK

Fully typed, tree-shakeable TypeScript client with Zod validation.


The TypeScript SDK is fully typed with Zod validation, tree-shakeable, and works in Node.js, Deno, and edge runtimes.

Requires Node.js 18+ · Install with npm install @agentoven/sdk


Installation

terminal

$ npm install @agentoven/sdk
# or
$ yarn add @agentoven/sdk
# or
$ pnpm add @agentoven/sdk
Quick Start

typescript

import { AgentOven } from "@agentoven/sdk";

const oven = new AgentOven("http://localhost:8080");

await oven.agents.register({
  name: "research-bot",
  framework: "langchain",
  skills: ["web-search", "summarization"],
});

await oven.agents.bake("research-bot");

const result = await oven.a2a.sendTask({
  agent: "research-bot",
  message: "Summarize AI safety papers",
});
console.log(result.text);
Streaming Responses

typescript

import { AgentOven } from "@agentoven/sdk";

const oven = new AgentOven("http://localhost:8080");

// Stream via SSE
const stream = oven.a2a.sendTaskStream({
  agent: "research-bot",
  message: "Write a detailed analysis of quantum computing",
});

for await (const chunk of stream) {
  process.stdout.write(chunk.text);
}
console.log("\nDone!");
Managing Agents

typescript

import { AgentOven } from "@agentoven/sdk";

const oven = new AgentOven("http://localhost:8080");

// List all agents
const agents = await oven.agents.list();
for (const agent of agents) {
  console.log(agent.name, agent.status, agent.tasksCompleted);
}

// Get detailed status
const status = await oven.agents.status("research-bot");
console.log("Uptime:", status.uptime);
console.log("Health:", status.health);

// Cool and re-bake
await oven.agents.cool("research-bot");
await oven.agents.bake("research-bot");
Recipes

typescript

import { AgentOven } from "@agentoven/sdk";
import { readFile } from "fs/promises";

const oven = new AgentOven("http://localhost:8080");

// Run a recipe
const yaml = await readFile("pipeline.yaml", "utf-8");
const result = await oven.recipes.run(yaml, {
  params: { topic: "AI safety", depth: "detailed" },
});

console.log("Completed in", result.duration, "seconds");
for (const step of result.steps) {
  console.log(step.agent, "—", step.status);
}
Error Handling

typescript

import {
  AgentOven,
  AgentNotFoundError,
  TaskTimeoutError,
  RateLimitError,
} from "@agentoven/sdk";

const oven = new AgentOven("http://localhost:8080");

try {
  const result = await oven.a2a.sendTask({
    agent: "research-bot",
    message: "Analyze data",
    timeout: 30_000,
  });
} catch (err) {
  if (err instanceof AgentNotFoundError) {
    console.error("Agent not registered or not baked");
  } else if (err instanceof TaskTimeoutError) {
    console.error("Task exceeded timeout");
  } else if (err instanceof RateLimitError) {
    console.error("Retry after", err.retryAfter, "ms");
  }
}