@runbit/agent
v0.1.1
Published
`agent()` and `team()` — a model plus tools, as a `Runnable`. The agent knows `ChatModel`, never a provider.
Readme
@runbit/agent
agent() and team() — a model plus tools, as a Runnable. The agent knows ChatModel, never a provider.
npm install @runbit/agent @runbit/openaiimport { agent, team } from "@runbit/agent";
import { openai } from "@runbit/openai";
const assistant = agent({
model: openai("gpt-4o-mini"),
tools: [weather],
system: "You are a concise travel assistant.",
});
const result = await app.run(assistant, { message: "Weather in Tokyo?" });
console.log(result.text);
// Chain agents: each receives the previous one's output.
const crew = team({ agents: [researcher, writer, editor] });The agent loops: call the model, run any requested tools, feed results back, repeat until it answers (bounded by maxSteps). Emits agent:start/agent:end plus tool and llm events.
Part of Runbit — the AI Runtime. Everything executes through one small, event-driven runtime; agents, workflows, RAG, and observability are packages on top.
- Umbrella:
@runbit/runtime - License: MIT
