Skip to content

Documentation / @agentick/express / GatewayConfig

Interface: GatewayConfig

Defined in: packages/gateway/dist/types.d.ts:21

Properties

apps

apps: Record<string, App>

Defined in: packages/gateway/dist/types.d.ts:39

App definitions


auth?

optional auth: AuthConfig

Defined in: packages/gateway/dist/types.d.ts:47

Authentication configuration


configPath?

optional configPath: string

Defined in: packages/gateway/dist/types.d.ts:113

Path to config file (used when configStore not provided).

Default

ts
"./agentick.config.json"

configStore?

optional configStore: ConfigStore

Defined in: packages/gateway/dist/types.d.ts:108

Pre-loaded config store. If provided, gateway skips file loading.


defaultApp

defaultApp: string

Defined in: packages/gateway/dist/types.d.ts:43

Default app to use when session key doesn't specify one


embedded?

optional embedded: boolean

Defined in: packages/gateway/dist/types.d.ts:53

Run in embedded mode (no standalone server). Use handleRequest() to process requests from your framework.

Default

ts
false

host?

optional host: string

Defined in: packages/gateway/dist/types.d.ts:31

Host to bind to (ignored in embedded mode)

Default

ts
"127.0.0.1"

httpCorsOrigin?

optional httpCorsOrigin: string

Defined in: packages/gateway/dist/types.d.ts:86

CORS origin for HTTP transport

Default

ts
"*"

httpPathPrefix?

optional httpPathPrefix: string

Defined in: packages/gateway/dist/types.d.ts:81

HTTP path prefix (e.g., "/api")

Default

ts
""

httpPort?

optional httpPort: number

Defined in: packages/gateway/dist/types.d.ts:91

HTTP port when using "both" mode

Default

ts
port + 1

id?

optional id: string

Defined in: packages/gateway/dist/types.d.ts:35

Gateway ID (auto-generated if not provided)


methods?

optional methods: MethodNamespace

Defined in: packages/gateway/dist/types.d.ts:104

Custom methods - runs within Agentick ALS context.

Supports:

  • Simple handlers: async (params) => result
  • Streaming: async function* (params) { yield value }
  • With config: method({ schema, handler, roles, guard })
  • Namespaces: { tasks: { list, create, admin: { ... } } } (recursive)

Use method() wrapper for schema validation, roles, guards, etc. ctx param is optional - use Context.get() for idiomatic access.


plugins?

optional plugins: GatewayPlugin[]

Defined in: packages/gateway/dist/types.d.ts:62

Plugins — connectors, integrations, outbound capabilities. Also addable at runtime via gateway.use().


port?

optional port: number

Defined in: packages/gateway/dist/types.d.ts:26

Port to listen on (ignored in embedded mode)

Default

ts
18789

socketPath?

optional socketPath: string

Defined in: packages/gateway/dist/types.d.ts:68

Unix socket path. When set, gateway also listens on this socket. Orthogonal to transport — a gateway can serve WebSocket, HTTP, and Unix socket clients simultaneously.


storage?

optional storage: StorageConfig

Defined in: packages/gateway/dist/types.d.ts:57

Persistence configuration


transport?

optional transport: "both" | "websocket" | "http"

Defined in: packages/gateway/dist/types.d.ts:76

Transport mode (ignored in embedded mode)

  • "websocket": WebSocket only (default, good for CLI/native clients)
  • "http": HTTP/SSE only (good for web browsers)
  • "both": Both transports on different ports

Default

ts
"websocket"

Released under the ISC License.