Skip to content

OpAgent — Go Agent Framework and Multi-Agent OS Runtime

简体中文

OpAgent is an Apache-2.0, Go-native Agent framework and multi-agent OS runtime for building secure, file-native agent applications. Its Runtime, embedding API, permission and sandbox layer, and generic Server are implemented in Go.

Go-native runtime, cross-language protocol. OpAgent Protocol is a language-neutral wire contract built on typed JSON-RPC/MCP operations. Agents, tools, runtimes, servers, and user interfaces can be implemented in different languages and still interoperate. The official SDKs currently provided in this repository are Go and TypeScript.

Why OpAgent

  • Files are durable state. Agent manifests, skills, tools, thread JSONL, and generated artifacts remain visible and portable.
  • The runtime is a kernel, not a product. Product identity, account state, managed services, and trust decisions stay in host-owned hooks.
  • Authority stays local. Permissions are compiled by the runtime; prompts, repositories, tools, and remote nodes cannot grant themselves more access.
  • Protocol before integration. Language-neutral JSON-RPC/MCP operations let Go, TypeScript, and other implementations interoperate without depending on one frontend or process.
  • One source of conversation truth. Runtime thread JSONL is authoritative; the generic server does not create a second chat database.

Packages

Package Purpose
opagent-runtime Go implementation of the embeddable runtime, agent loop, file-native threads, permissions, sandbox, tools, skills, and subagents
opagent-protocol Cross-language wire specification with official Go and TypeScript SDKs
opagent-server Go loopback HTTP/SSE host with authentication and an embedded single-Workspace Web console
agents Reusable Coder and Simple Memory agents
tools Reusable tool packages, including managed rg-search
skills Reusable skills, including deterministic Word document review

Quick start

The Runtime, Server, and Go SDK require Go 1.26.3. The cross-language Protocol's TypeScript SDK additionally requires Node.js.

git clone https://github.com/colinagent/opagent.git
cd opagent
go test ./opagent-runtime/... ./opagent-server/...
scripts/start-web.sh

The command opens ~/.opagent/workspace as the default browser Workspace and creates it when needed. Pass an explicit path to scripts/start-web.sh to open a different Workspace. Configure a model Token and Base URL in Models, then chat with the default full-access Workspace Agent. The server listens only on 127.0.0.1:19531; standalone state defaults to ~/.opagent. See the Web Workspace guide, Quick Start, or the scriptable examples/http-chat/run.sh.

Design documentation

Stability

The v0.1 API intentionally supports one Runtime instance per process. Public Go modules are versioned independently from the repository root; protocol wire changes follow the compatibility rules in the protocol specification.

Contributing and security

See CONTRIBUTING.md and SECURITY.md. Do not report vulnerabilities in public issues.

License

Apache License 2.0. See LICENSE and NOTICE. Individual third-party files retain their original compatible license notices.

About

Go-native Agent framework and multi-agent OS runtime with a cross-language protocol and official Go/TypeScript SDKs.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages