Start a server hosting the provided agents.
A single agent or array of agents to serve
Server options (host, port)
const agent = new Agent('my-agent');agent.onInvoke(async (input) => ({ output: 'hello' }));serve(agent, { port: 8080 });// orserve([agent1, agent2], { port: 8080 }); Copy
const agent = new Agent('my-agent');agent.onInvoke(async (input) => ({ output: 'hello' }));serve(agent, { port: 8080 });// orserve([agent1, agent2], { port: 8080 });
Start a server hosting the provided agents.