SDKs and APIs

A3S Code provides Rust, Node.js, Python, and Go SDKs. Install the a3s CLI when you want the terminal application. Treat each registry and GitHub Releases as the source of truth for package versions and release status.

EntryPackage or commandDocumentationUse it for
Terminala3s codeA3S CLIRun a coding agent directly in your terminal
Rusta3s-code-coredocs.rsUse the complete runtime API or extension traits
Node.js@a3s-lab/codenpmSubscribe to async events in a Node.js application
Pythona3s-codePyPIUse synchronous or asynchronous Python APIs
Gogithub.com/A3S-Lab/Code/sdk/go/v6Setup belowUse a pure-Go API backed by the native runtime

Install

SHELLSCRIPT
# Rust
cargo add a3s-code-core
# Node.js
npm install @a3s-lab/code
# Python
python -m pip install a3s-code
# Go
go get github.com/A3S-Lab/Code/sdk/go/v6

Go module and bridge

The Go 1.23+ API is pure Go and does not require CGO. One long-lived a3s-code-go-bridge process owns the native runtime and carries multiplexed requests and EventEnvelopeV1 values over a versioned JSONL protocol.

A Go-enabled repository release publishes a path-prefixed module tag sdk/go/vX.Y.Z, matching release vX.Y.Z, together with a3s-code-go-bridge-SHA256SUMS and x86-64 bridge executables:

SystemAsset target
Linuxx86_64-unknown-linux-gnu
macOSx86_64-apple-darwin
Windowsx86_64-pc-windows-msvc.exe

Download the bridge from GitHub Releases, verify it against the published SHA-256 file, and keep its version equal to the Go module version. Put it on PATH, set A3S_CODE_GO_BRIDGE, or pass code.WithBridgePath:

SHELLSCRIPT
export A3S_CODE_GO_BRIDGE=/opt/a3s/bin/a3s-code-go-bridge
POWERSHELL
$env:A3S_CODE_GO_BRIDGE = 'C:\a3s\a3s-code-go-bridge.exe'

For an architecture without a release asset, build it from a source checkout:

SHELLSCRIPT
bash .github/setup-workspace.sh
cargo build --release --package a3s-code-go-bridge --bin a3s-code-go-bridge

code.Create performs a fail-closed handshake for the transport protocol, event protocol, and complete operation inventory. Go failures use stable *code.Error codes while context cancellation and deadlines remain available through errors.Is. The bridge covers the complete serializable Agent/Session surface plus Go-backed hooks, budget guards, slash commands, and pipeline callbacks. Arbitrary Rust trait-object implementations remain a Rust-native extension mechanism; the other SDKs use their equivalent value configuration, callback, direct-tool, or MCP boundary.

What the SDKs share

All four SDKs use the same session lifecycle, event format, and snapshots. A UI can subscribe to the same AgentEvent / EventEnvelopeV1 stream and resume saved work by session ID.

The shared guides place Go beside Node.js and Python for the complete common SDK capability surface. Start with quick start, then continue to streaming, direct tools, sessions, verification, MCP, and persistence.

All four SDKs can configure persistence, memory, local/S3 workspaces, remote Git, permissions and confirmation, hooks, MCP, queues, deterministic replay, and orchestration. Rust additionally accepts arbitrary in-process trait implementations such as a custom LlmClient or ContextProvider; other languages integrate custom services through callbacks, direct tools, or MCP. For UI integration, start with sessions and event streams.