Reminix TypeScript SDK - v0.7.1
    Preparing search index...

    Function serve

    • Start a server hosting the provided agents.

      Parameters

      • agents: Agent | Agent[]

        A single agent or array of agents to serve

      • options: ServeOptions = {}

        Server options (host, port)

      Returns void

      const agent = new Agent('my-agent');
      agent.onInvoke(async (input) => ({ output: 'hello' }));

      serve(agent, { port: 8080 });
      // or
      serve([agent1, agent2], { port: 8080 });