Open source · Go 1.26.2+

Build agent applications on a dependable Go runtime

Modu provides an agent loop, tool execution, multi-agent coordination, channels, scheduling, and a terminal UI—while your application keeps ownership of prompts, tools, and deployment.

go get github.com/openmodu/modu
main.go Go
package main

import (
  "context"
  "github.com/openmodu/modu/pkg/agent"
  "github.com/openmodu/modu/pkg/types"
)

func main() {
  ctx := context.Background()
  a := agent.NewAgent(types.Config{
    InitialState: &types.State{
      SystemPrompt: "You are a helpful assistant.",
      Model: model,
      Tools: []types.Tool{weatherTool},
    },
  })

  if err := a.Prompt(ctx, "Analyze today's weather"); err != nil {
    panic(err)
  }
}
Core capabilities

A concise, Go-native agent runtime

Composable primitives, explicit boundaries, and production-minded behavior.

01

Agent Runtime

A stable agent loop with tools, state, event streaming, interruption, and checkpoint recovery.

Learn more
runtime.go
store, _ := runtime.NewFileStore("./data")
rt := runtime.New(agent.NewAgent(cfg), store, "session-123")

if err := rt.Run(ctx, "Finish this task"); err != nil {
  log.Fatal(err)
}

resumed, err := rt.Resume(ctx)
02

Mailbox Teams

Typed messaging, task assignment, validation, and durable coordination for multiple agents.

Learn more
mailbox.go
hub := mailbox.NewHub()
hub.Register("director")
hub.Register("writer")

msg, _ := mailbox.NewTaskAssignMessage(
  "director", "task-1", "Write product copy",
)
hub.Send("writer", msg)
03

Coding Agent

Sessions, context compaction, skills, approvals, and code-native tools for terminal workflows.

Learn more
modu_code
$ go run ./cmd/modu_code

 Find the failing test and propose the smallest fix
read    pkg/agent/loop.go
grep    "TestLoop"      12 hits
bash    go test ./pkg/agent/...  ✓ ok
Documentation

Clear, practical, and runnable

From quickstart to architecture, every example maps to working code in the repository.

Quickstart

Run your first Modu agent in a few minutes.

1. Install

go get github.com/openmodu/modu

2. Run an example

package main

import "github.com/openmodu/modu/pkg/agent"

Ready to build your first agent application?

Read the complete docs, run an example, then grow from there.

Read the docs
Copied to clipboard