actx start
actx start
Section titled “actx start”Start the AgentCTX gateway. This boots the middleware pipeline, connects to backends, and begins accepting CTX operations.
actx start [options]Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--transport <type> | "stdio" | Transport type: stdio or sse |
--protocol <type> | — | Extension protocol: stdio (newline-delimited JSON) |
--port <port> | "3100" | HTTP port for SSE transport |
--http-port <port> | "3100" | HTTP entry point port |
--tcp-port <port> | "3101" | TCP entry point port |
--no-http | — | Disable the HTTP entry point |
--no-tcp | — | Disable the TCP entry point |
--compact | — | Enable automatic context compaction on every agent turn |
Transport Modes
Section titled “Transport Modes”stdio (default)
Section titled “stdio (default)”Best for IDE extensions and agent frameworks (VS Code, Cursor, etc.):
actx startactx start --transport stdioThe gateway reads CTX statements from stdin and writes GatewayResult JSON to stdout. Diagnostic messages go to stderr.
SSE (Server-Sent Events)
Section titled “SSE (Server-Sent Events)”Best for HTTP clients, web applications, and multi-agent setups:
actx start --transport sse --port 3100Starts an HTTP SSE server. Agents connect via EventSource and send CTX via POST requests.
Extension Protocol
Section titled “Extension Protocol”For the VS Code extension, use the structured protocol mode:
actx start --protocol stdioThis sends newline-delimited ServerMessage JSON on stdout and receives ClientMessage JSON on stdin. Different from raw MCP stdio.
Entry Points
Section titled “Entry Points”In addition to the primary transport, the gateway can expose HTTP and TCP entry points for non-MCP clients:
# All entry points enabled (default)actx start --transport sse --port 3100 --http-port 3100 --tcp-port 3101
# Disable TCPactx start --transport sse --no-tcp
# Disable HTTPactx start --transport sse --no-httpContext Compaction
Section titled “Context Compaction”The --compact flag enables automatic context compaction using the CTX-ACCE engine:
actx start --compactThis runs the compactor on every agent turn, reducing context window usage by removing stale or redundant entries.
Licensing & Enforcement
Section titled “Licensing & Enforcement”By default, running actx start locally utilizes the Free Tier WASM Sidecar. This binary is hardcoded via a compilation-boundary limit to strictly enforce a 1-concurrent agent local restriction.
It provides you the full Apache-2.0 core protocol experience but locks multi-tenant orchestration and fleet-wide Convergent Encryption Deduplication behind the enterprise ctx-gateway BSL 1.1 builds.
What Happens on Start
Section titled “What Happens on Start”- Reads
.context/actx.yamlconfiguration - Initializes
CryptoManager(loads Ed25519 keypair) - Boots the 15-stage middleware pipeline
- Connects to SurrealDB (if
SURREAL_URLis set) - Connects to NATS (if
NATS_URLis set) - Starts the configured transport listener
- Optionally starts HTTP/TCP entry points
Example
Section titled “Example”$ actx start --transport sse --port 3100🚀 Starting AgentCTX gateway... Transport: sse Port: 3100 HTTP entry point: :3100 TCP entry point: :3101✅ Gateway readySee Also
Section titled “See Also”- actx init — initialize a project first
- actx query — test queries against the gateway
- Configuration — environment variables and config