Boyan is a standalone local service for grounded temporal memory for AI agents.
It owns:
- canonical temporal memory state in Badger
- a rebuildable Bleve search projection
- HTTP/JSON ingest for completed turns and explicit boundaries
- Streamable HTTP MCP tools for search, trace, and controlled forgetting
- an isolated runtime-backed derivation worker
Boyan is local-first. The default service binds loopback only and stores all state under one explicit state root.
- Module:
github.com/baldaworks/boyan - Public host API:
github.com/baldaworks/boyan/pkg/boyan - Public Go contract:
github.com/baldaworks/boyan/pkg/memory - Binary:
boyan - Deployment model: one local process, one local state root
- Ingest API:
/v1/ingest/turns,/v1/ingest/boundaries - Health API:
/livez,/readyz - MCP endpoint:
/mcp
This repository already builds and runs locally. Remote publication and any downstream integration work are outside this standalone quick-start scope.
Build the standalone binary locally:
go build -o ./bin/boyan ./cmd/boyanOr install it into your Go bin path:
go install ./cmd/boyanInspect the available commands:
go run ./cmd/boyan --help
go run ./cmd/boyan serve --help- Copy the example config:
cp -f boyan.example.yaml ./boyan.yaml-
Set a buildable derivation provider in
boyan.yaml. -
Start the service:
go run ./cmd/boyan serve --config ./boyan.yaml- Check health:
curl -sS http://127.0.0.1:8686/livez
curl -sS http://127.0.0.1:8686/readyzBy default Boyan stores data in ./.state/boyan with this layout:
.state/boyan/
├── badger/
└── bleve/
Boyan loads configuration from:
- built-in defaults
--config <path>YAMLBOYAN_*environment variables- command flags for
--state-dirand--listen
See boyan.example.yaml and docs/OPERATIONS.md.
Boyan now exposes one first-class in-process host surface in pkg/boyan.
boyan.Config,boyan.DefaultConfig(), andConfig.Validate()own the public host config shapeboyan.New(...)andboyan.NewHost(...)compose one embedded host withoutinternal/*importsHost.Start,Run,Wait,Stop, andCloseown lifecycleHost.Handler,MCP,Search,Trace,ForgetSource, andForgetScopeexpose the supported in-process capabilities
See pkg/boyan/example_test.go for a compiling public example.
Boyan separates audience-facing usage surfaces from internal implementation surfaces.
- Public host embedding API:
pkg/boyan - Public contract/types:
pkg/memory - Deterministic remote API: HTTP ingest plus
livezandreadyz - Machine-readable HTTP contract:
docs/openapi.yaml - Typed HTTP client:
client/httpfor the HTTP surface - Agent tool API: MCP
- Operator API: CLI
See docs/API.md and docs/openapi.yaml.
pkg/boyanis the public host embedding and lifecycle API.pkg/memoryis the standalone public Boyan memory contract: raw wire types, canonical records, derived records, and ordered-ingest DTOs.client/httpis the typed client for Boyan's deterministic HTTP surface.internal/contains service-only orchestration, adapters, and transport code.
MIT. See LICENSE.