How micro/go-micro works
Go Micro is a distributed-systems framework whose documented product spans RPC services, discovery and messaging, plus agents that use services as tools. A user can chat with the framework’s agent from the terminal; agents use models, conversation history and tools, with background tasks and recovery. Services can also be exposed to other applications and agents through the HTTP/MCP gateway. The graph preserves these major branches and names core runtime layers. Relationships are limited to README statements and indexed source references; unsampled implementation details are not inferred.
Main entry points: agent.go Agent Runtime · service.go Service Lifecycle · rpc_client.go RPC Client · server.go HTTP Gateway
Components 20
Service Runtime
- Service Lifecycle
service/service.go - RPC Server
server/server.go - RPC Routing
server/rpc_router.go - Durable Flows
flow/steps.go
Agent Runtime
- Agent Runtime
agent/agent.go - Background Tasks
agent/tasks.go - Conversation History
agent/memory.go - Recovery
agent/checkpoint.go - Model Providers
model/model.go - LiteLLM Provider
model/litellm/litellm.go
Connectivity
- RPC Client
client/rpc_client.go - Service Discovery
registry/registry.go - Messaging
broker/broker.go - Storage
store/store.go - Configuration
config/config.go
External Interfaces
- Terminal Chat
cmd/micro/chat/chat.go - HTTP Gateway
cmd/micro/gateway/server.go - MCP Gateway
gateway/mcp/mcp.go - Web Service
web/service.go
Other components
- User
Connections 19
- User → Terminal Chat: starts chat
README.md - Terminal Chat → Agent Runtime: invokes agent
- Agent Runtime → Model Providers: uses models
README.md - Agent Runtime → Conversation History: uses history
README.md - Agent Runtime → Background Tasks: supports tasks
README.md - Agent Runtime → Recovery: supports recovery
README.md - Agent Runtime → RPC Client: uses client
- Agent Runtime → Storage: stores tasks
- LiteLLM Provider → Model Providers: implements model
model/litellm/litellm.go - Service Lifecycle → RPC Server: starts server
service/service.go - Service Lifecycle → RPC Client: uses client
service/service.go - Service Lifecycle → Storage: scopes state
service/service.go - RPC Server → RPC Routing: routes requests
- RPC Client → Service Discovery: discovers services
client/rpc_client.go - RPC Client → Messaging: publishes messages
client/rpc_client.go - Durable Flows → Service Lifecycle: coordinates services
- HTTP Gateway → MCP Gateway: exposes MCP
cmd/micro/gateway/server.go - HTTP Gateway → Service Lifecycle: exposes services
README.md - Web Service → Service Discovery: registers service
web/service.go