
Write HTML. Render video. Built for agents.
Kratos provides a small set of explicit building blocks for Go services: servers, middleware, registry, config, logging, and encoding. It is designed around API-first development with Protobuf, generated HTTP/gRPC code, and a shared transport layer for both protocols.

Builders who are setting up Go services and want a framework with transport, middleware, config, and code generation.
You can start new microservices with a consistent API-first structure instead of wiring every service by hand.
Uses Protobuf plus generated HTTP and gRPC code to define and build services from APIs.
Provides one transport setup for both HTTP and gRPC servers.
Includes middleware for recovery, logging, validation, tracing, metrics, auth, and related request handling.
Supports registry, configuration, and encoding as separate components you can swap in or extend.
Uses `log/slog` for logging, with OpenTelemetry support available in contrib packages.
Adds optional packages for registries, config stores, middleware, encodings, and observability.
go install github.com/go-kratos/kratos/cmd/kratos/v3@latest kratos upgrade
Kratos is a lightweight Go framework for building cloud-native microservices. It provides small, explicit APIs for transport, middleware, registry, configuration, logging, encoding, and code generation so applications can focus on business logic.
log/slog based logging with OpenTelemetry extensions in contrib packages.go install github.com/go-kratos/kratos/cmd/kratos/v3@latest
kratos upgrade
kratos new helloworld
cd helloworld
go mod tidy
kratos run
Visit http://localhost:8000/helloworld/kratos after the service starts.
For a fuller generated service flow:
kratos proto add api/helloworld/helloworld.proto
kratos proto client api/helloworld/helloworld.proto
kratos proto server api/helloworld/helloworld.proto -t internal/service
go generate ./...
kratos run
package main
import (
"github.com/go-kratos/kratos/v3"
"github.com/go-kratos/kratos/v3/transport/grpc"
"github.com/go-kratos/kratos/v3/transport/http"
)
func main() {
httpSrv := http.NewServer(http.Address(":8000"))
grpcSrv := grpc.NewServer(grpc.Address(":9000"))
app := kratos.New(
kratos.Name("helloworld"),
kratos.Version("v1.0.0"),
kratos.Server(httpSrv, grpcSrv),
)
if err := app.Run(); err != nil {
panic(err)
}
}
Kratos v3 reduces core dependencies and makes previously implicit behavior explicit. Review the v2 to v3 migration guide before upgrading production services.
make test
make lint
If you discover a security vulnerability in Kratos, please contact go-kratos@googlegroups.com. Security reports are handled privately before disclosure.
Thank you for contributing to Kratos. The contribution guide is available in the Kratos documentation.
The following projects influenced Kratos design:
Kratos is open-sourced software licensed under the MIT license.
Sign in to join the discussion.
No comments yet. Be the first to say what this is good for.

Write HTML. Render video. Built for agents.
Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps
SkillOpt is a text-space optimizer that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts.

Omnigent is an open-source AI agent framework and meta-harness: orchestrate Claude Code, Codex, Cursor, Pi, and custom agents — swap harnesses without rewriting, enforce policies and sandboxing, and collaborate in real time from any device.
A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!