Downcity
Integration Patterns

Expose an Agent over HTTP

Turn a local Agent into an HTTP service for other processes or clients

Expose an Agent over HTTP

If the caller and executor do not live in the same process, expose the local Agent as an HTTP service:

await agent.start({
  http: {
    host: "127.0.0.1",
    port: 15314,
  },
});

Then connect to it from another process using RemoteAgent.

This creates a very natural local client-server shape:

  • the local Agent executes
  • RemoteAgent consumes

Table of Contents