Quickstart (Go)
Primary onboarding path — clone Trajectory IR, run Go tests, and seal a minimal trajectory.
Go is the primary SDK. Prefer this path for new work. Python is a reference / parity port.
Prerequisites
- Go 1.25.x
- Git
1. Clone and test
git clone https://github.com/Coder-s-OG-s/Trajectory-IR.git
cd Trajectory-IR/go
go test ./...2. Minimal client
Save as main.go under a module that depends on the engine repo (or run from Trajectory-IR/go examples). This uses the real client surface: OpenTrajectory → Project → SealDecision → ExecTool → CommitStep.
package main
import (
"fmt"
"os"
"github.com/Coder-s-OG-s/Trajectory-IR/go/trajir/client"
"github.com/Coder-s-OG-s/Trajectory-IR/go/trajir/effects"
"github.com/Coder-s-OG-s/Trajectory-IR/go/trajir/resume"
)
func main() {
dir, err := os.MkdirTemp("", "trajir-qs-*")
if err != nil {
panic(err)
}
defer os.RemoveAll(dir)
tr, err := client.OpenTrajectory("demo", "qs-1", client.Options{WorkDir: dir})
if err != nil {
panic(err)
}
defer tr.Close()
if _, err := tr.Project(1, map[string]any{"goal": "hello"}); err != nil {
panic(err)
}
plan := map[string]any{
"tool_calls": []any{
map[string]any{"name": "echo", "args": map[string]any{"msg": "hi"}},
},
}
if _, err := tr.SealDecision(1, plan); err != nil {
panic(err)
}
tool := resume.Tool{
Name: "echo",
Effect: effects.PURE,
Fn: func(args map[string]any) (any, error) {
return args["msg"], nil
},
}
res, err := tr.ExecTool(1, 2, tool, map[string]any{"msg": "hi"})
if err != nil {
panic(err)
}
fmt.Println(res.Result) // hi
if err := tr.CommitStep(1, 4); err != nil {
panic(err)
}
}3. Optional demos
From Trajectory-IR/go:
go run ./examples/adoption_host
go run ./examples/adoption_host -sandbox
go run ./examples/adoption_host -with-package
go run ./examples/kill_mid_deploy -workdir ./demo-dataSee Demos for what each command shows.
What's next?
- Core concepts — seals, effect classes,
.tir, sandbox - Demos
- CLI (trajirctl) & MCP — inspect a workdir or wire an MCP host
- Python reference quickstart
- Architecture
- Contributing — engine guide uses DCO (
git commit -s)
Engine source: go/QUICKSTART.md

