Back to projects

OpAgent

A Go-native agent framework and multi-agent OS runtime. Files are the state. The runtime is the kernel. A cross-language protocol keeps implementations interoperable.

A kernel, not another chat box

OpAgent is an Apache-2.0 open-source project: a Go runtime, plus a cross-language protocol that lets agents, tools, servers, and UIs talk to each other.

The problem is not “how do I wire one agent workflow in code.” It is how agents get installed, started, isolated, and coordinated, and how conversations and artifacts stay around. A directory is a workspace. A conversation is a file. Authority stays local. I call that layer AgentOS.

Why it is built this way

  • Files are durable state. Agent manifests, skills, tools, thread JSONL, and generated work stay visible and portable.
  • The runtime is a kernel. Product identity, accounts, managed services, and trust decisions live in host-owned hooks.
  • Authority stays local. Prompts, repositories, tools, and remote nodes cannot grant themselves more access.
  • Protocol before integration. Typed JSON-RPC/MCP operations let Go, TypeScript, and other implementations interoperate without locking to one frontend.
  • One source of conversation truth. Runtime thread JSONL is authoritative. The generic server does not create a second chat database.

What is in the repo

  • opagent-runtime: embeddable Go runtime for the agent loop, file-native threads, permissions, sandbox, tools, skills, and subagents
  • opagent-protocol: language-neutral wire spec, with official Go and TypeScript SDKs
  • opagent-server: loopback HTTP/SSE host with authentication and a single-workspace web console
  • agents / tools / skills: reusable coder, memory, search, and document-review packages

How to run it

The runtime, server, and Go SDK need Go 1.26.3. The TypeScript protocol SDK also needs Node.js.

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

That opens ~/.opagent/workspace and creates it if needed. Set a token, base URL, and model ID under Models, then talk to the default full-access workspace agent. The server listens only on 127.0.0.1:19531.

Source

GitHub: https://github.com/colinagent/opagent

This is still v0.1: one runtime instance per process. Public Go modules version independently. Protocol wire changes follow the compatibility rules in the spec.