Skip to content

Documentation / @agentick/gateway / GatewayConfig

Interface: GatewayConfig ​

Defined in: gateway/src/types.ts:32

Properties ​

apps ​

apps: Record<string, App>

Defined in: gateway/src/types.ts:53

App definitions


auth? ​

optional auth: AuthConfig

Defined in: gateway/src/types.ts:63

Authentication configuration


configPath? ​

optional configPath: string

Defined in: gateway/src/types.ts:140

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

Default ​

ts
"./agentick.config.json"

configStore? ​

optional configStore: ConfigStore

Defined in: gateway/src/types.ts:134

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


defaultApp ​

defaultApp: string

Defined in: gateway/src/types.ts:58

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


embedded? ​

optional embedded: boolean

Defined in: gateway/src/types.ts:70

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

Default ​

ts
false

host? ​

optional host: string

Defined in: gateway/src/types.ts:43

Host to bind to (ignored in embedded mode)

Default ​

ts
"127.0.0.1"

httpCorsOrigin? ​

optional httpCorsOrigin: string

Defined in: gateway/src/types.ts:109

CORS origin for HTTP transport

Default ​

ts
"*"

httpPathPrefix? ​

optional httpPathPrefix: string

Defined in: gateway/src/types.ts:103

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

Default ​

ts
""

httpPort? ​

optional httpPort: number

Defined in: gateway/src/types.ts:115

HTTP port when using "both" mode

Default ​

ts
port + 1

id? ​

optional id: string

Defined in: gateway/src/types.ts:48

Gateway ID (auto-generated if not provided)


methods? ​

optional methods: MethodNamespace

Defined in: gateway/src/types.ts:129

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: gateway/src/types.ts:81

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


port? ​

optional port: number

Defined in: gateway/src/types.ts:37

Port to listen on (ignored in embedded mode)

Default ​

ts
18789

socketPath? ​

optional socketPath: string

Defined in: gateway/src/types.ts:88

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: gateway/src/types.ts:75

Persistence configuration


transport? ​

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

Defined in: gateway/src/types.ts:97

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.