Skip to content
qdxiaoPublic

About

A Go agent runtime with resumable runs, host-owned storage, durable approvals, and a standard-library-only core.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-go

A Go agent runtime with resumable runs, host-owned storage, and a standard-library-only core.

中文文档 · Runnable example · Architecture · MIT license

Build agents inside your own service. You provide the model, tools, identity, and persistence; pi-go coordinates execution.

Try it without an API key

Requires Go 1.23.7 or newer.

git clone https://github.com/qdxiao/pi-go.git
cd pi-go
go run ./examples/basic

The deterministic example calls an order-lookup tool and prints the paid order status. It needs no model account, database, or cloud service.

Install the public release candidate

From an existing Go module:

go get github.com/qdxiao/pi-go@v1.0.0-rc.1
# Optional provider adapter
go get github.com/qdxiao/pi-go/adapters/chatcompletions@v1.0.0-rc.1

Try approval and resume

From the repository checkout, run the focused tutorial test. The fake tool stays idle while approval is pending, and saving the decision does not execute it. An explicit resume runs it once in this test.

go -C tests/tutorial test -run '^TestApprovalRequiresHostDecisionAndExplicitResume$' -v

See the tutorial requirements and limits. No model API key is needed.

What it provides

  • Run/resume, cancellation, execution ownership, and recovery for unknown tool outcomes.
  • Sessions, immutable history, branching, follow-up input, and context compaction.
  • Host-injected model, tool executor, storage, memory, and resource interfaces.
  • Durable approvals, budgets, atomic events, replay, and observability hooks.
  • Optional Chat Completions, SQL/GORM, JSON Schema, MCP HTTP, cloud storage, and OpenTelemetry adapters in separate Go modules.

The runtime does not start a server or worker. Hosts supply authentication and downstream idempotency. See the runtime contracts before integrating recovery into a service.

Learn and verify

go test ./...
go run ./tests/check

The second command covers all independent modules, including race tests, vet, and install checks. Live model, MCP, cloud storage, and external database tests are opt-in; passing local tests does not certify those integrations for production.

Status

Initial public release candidate. APIs may change as integrations are exercised. Please report concrete integration problems or minimal reproductions in Issues. Local reference measurements are documented under tests/; they are not universal performance guarantees.

Pi is a behavioral reference; this project does not claim compatibility with its CLI, session format, or TypeScript plugin API. See NOTICE for dependency and upstream context.

About

A Go agent runtime with resumable runs, host-owned storage, durable approvals, and a standard-library-only core.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages