@bs-ap/agent
v0.1.5
Published
Serve AI agents as a standard HTTP server, with every request tied to a verified end user.
Readme
@bs-ap/agent
Serve AI agents as a standard HTTP server, with every request tied to a verified end user.
npm install @bs-ap/agent aiimport { createServer, defineAgent } from "@bs-ap/agent"
import { serveNode } from "@bs-ap/agent/node"
import { ToolLoopAgent } from "ai"
const support = defineAgent({
name: "support",
create: ({ user }) => new ToolLoopAgent({ model, tools: toolsFor(user) }),
})
serveNode(createServer({ agents: [support], config }), { port: 3001 })| Route | Does |
| ---------------------------- | ------------------------------------------- |
| POST /v1/agents/:name/chat | Streams the reply; useChat reads it as is |
| GET /manifest | Agents, tools and version |
| GET /healthz | Liveness |
@bs-ap/agent/buildship adds BuildShip's services as a plugin.
