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? ​
optionalauth:AuthConfig
Defined in: gateway/src/types.ts:63
Authentication configuration
configPath? ​
optionalconfigPath:string
Defined in: gateway/src/types.ts:140
Path to config file (used when configStore not provided).
Default ​
"./agentick.config.json"configStore? ​
optionalconfigStore: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? ​
optionalembedded:boolean
Defined in: gateway/src/types.ts:70
Run in embedded mode (no standalone server). Use handleRequest() to process requests from your framework.
Default ​
falsehost? ​
optionalhost:string
Defined in: gateway/src/types.ts:43
Host to bind to (ignored in embedded mode)
Default ​
"127.0.0.1"httpCorsOrigin? ​
optionalhttpCorsOrigin:string
Defined in: gateway/src/types.ts:109
CORS origin for HTTP transport
Default ​
"*"httpPathPrefix? ​
optionalhttpPathPrefix:string
Defined in: gateway/src/types.ts:103
HTTP path prefix (e.g., "/api")
Default ​
""httpPort? ​
optionalhttpPort:number
Defined in: gateway/src/types.ts:115
HTTP port when using "both" mode
Default ​
port + 1id? ​
optionalid:string
Defined in: gateway/src/types.ts:48
Gateway ID (auto-generated if not provided)
methods? ​
optionalmethods: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? ​
optionalplugins:GatewayPlugin[]
Defined in: gateway/src/types.ts:81
Plugins — connectors, integrations, outbound capabilities. Also addable at runtime via gateway.use().
port? ​
optionalport:number
Defined in: gateway/src/types.ts:37
Port to listen on (ignored in embedded mode)
Default ​
18789socketPath? ​
optionalsocketPath: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? ​
optionalstorage:StorageConfig
Defined in: gateway/src/types.ts:75
Persistence configuration
transport? ​
optionaltransport:"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 ​
"websocket"