feat: learnings system — git-backed markdown storage with agent tools, CLI, and HTTP serving#106
Merged
priyanshujain merged 27 commits intomasterfrom Mar 19, 2026
Merged
Conversation
Avoids creating a new Store (and mutex) on every HTTP request.
Prevents leaked goroutines if the LLM call hangs indefinitely.
…rd, git user config, and human-readable list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a learnings system that lets users save, read, search, and extract learnings as human-friendly markdown files backed by git.
Closes #105
service/learnings/): git-backed markdown store with Save, Read, List, Search, and Slug operations. Each save auto-commits to a local git repo at~/.obk/learnings/.agent/tools/learnings.go): 4 tools —learnings_save,learnings_read,learnings_search,learnings_extract. Extract runs in a background goroutine with its own agent to parse source material.GET /learnings/{topic}): serves markdown files via the existing server, no auth (behind ngrok).obk learnings open|list|search): browse and search learnings from the terminal.New files (8)
service/learnings/store.goservice/learnings/store_test.goagent/tools/learnings.goagent/tools/learnings_test.gointernal/server/handler_learnings.gointernal/cli/learnings/learnings.gointernal/cli/learnings/search.gospectest/learnings_test.goModified files (6)
config/paths.goLearningsDir()agent/tools/prompt.goreg.Has("learnings_save")internal/server/routes.goGET /learnings/{topic}internal/cli/root.gochannel/telegram/session.goregisterLearningsTools()with Telegram push notificationsinternal/cli/chat.goregisterLearningsTools()(no notifier)Test plan
go test ./service/learnings/ ./agent/tools/— 24 tests passOBK_TEST_PROVIDER=gemini go test ./spectest/ -run TestSpec_Learning -v— 3 tests pass (SaveAndRead, SaveAndSearch, ListTopics)go build ./...— cleanobk learnings list, save something via chat,obk learnings listagaincurl http://localhost:8443/learnings/<topic>