gptme
AGENTS.md4.4k starsChanged 6 months agoMITView on GitHub
This file provides agent-specific guidance for working on gptme. For general project information, see README.md and docs. Run tests before submitting PRs: Key directories: - gptme/ - Core library code - gptme/cli/ - CLI entry points - gptme/tools/ - Tool implementations - gptme/llm/ - LLM provider integrations - gptme/server/ - REST API server - tests/ - Test suite - docs/ - Sphinx documentation (RST + MD) - scripts/ - Build and utility scripts We aim to keep gptme core small…
- Commits and pushes
Trending
Quiet since January.thin dataabout the whole repository
Who's talking about gptme/gptme
- gptme/gptme-contrib“feat(tasks): add tracking activity detection since waiting_since”GitHub · Jan 12, 2026 · 2 reactions
- gptme/gptme-contrib“feat(tasks): add import command and utils.py with Linear support”GitHub · Jan 10, 2026 · 2 reactions
- gptme/gptme-contrib“feat(tasks): add import command to create tasks from GitHub/Linear issues”GitHub · Jan 10, 2026 · 2 reactions
- gptme/gptme-contrib“feat(plugins): Add example-hooks plugin demonstrating hook system”GitHub · Nov 25, 2025 · 2 reactions
- gptme/gptme-webui“feat: implement auto-naming for conversations”GitHub · Aug 19, 2025 · 2 reactions
The biggest 5 of 7 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 7
Talked about on GitHub and Hacker News (7 times).
On GitHub · 6
- Jan 12, 2026feat(tasks): add tracking activity detection since waiting_since — gptme/gptme-contrib2 reactions · 2 comments
- Jan 10, 2026feat(tasks): add import command and utils.py with Linear support — gptme/gptme-contrib2 reactions · 27 comments
- Jan 10, 2026feat(tasks): add import command to create tasks from GitHub/Linear issues — gptme/gptme-contrib2 reactions · 16 comments
- Nov 25, 2025feat(plugins): Add example-hooks plugin demonstrating hook system — gptme/gptme-contrib2 reactions · 1 comment
- Aug 19, 2025feat: implement auto-naming for conversations — gptme/gptme-webui2 reactions
1 more on GitHub
- Apr 11, 2025Browser automation instead of paid APIs — langgenius/dify2 reactions · 5 comments
On Hacker News · 1
- Mar 11, 2025Gptme v0.27 released – general purpose agent in your terminal1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- webui/AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 9 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 8
Never push directly to master: - always use branches and PRs
- Distinctive: line 10
Commit format: Use Conventional Commits
- Distinctive: line 15
Stage files explicitly: Never use git add . or git commit -a
- Very specific: line 16
Create PRs: Use gh pr create after pushing branch
- Distinctive: line 20
Type hints: All functions must have type annotations
- Distinctive: line 23
KISS: Keep it simple - avoid over-engineering
- Distinctive: line 25
Minimal mocking: Prefer integration tests over heavy mocking
- Distinctive: line 29
Run tests before submitting PRs:
- Very specific: line 64
When in doubt, start in gptme-contrib.
- Distinctive: line 92
Run recall once to surface the entries most relevant to the current task:
- Very specific: line 98
If gptme-rag (with the lexical extra) is installed the TF-IDF backend is used automatically.
- Distinctive: line 105
When you learn something worth keeping across sessions — a user preference, a project decision, a recurring pattern — persist it:
- Very specific: line 116
Default write root is project memory/ if that directory exists, else ~/.claude/projects/<workspace-hash>/memory/.
- Very specific: line 147
Add tests in tests/test_tools_toolname.py
- Very specific: line 164
Every docs page declares its target audience — :audience: user|power-user|developer as the first line of .rst files, audience: front matter …
- Very specific: line 170
After make docs, review the rendered structure with make docs-structure.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Instructions for gptme
This file provides agent-specific guidance for working on gptme. For general project information, see README.md and docs.
Git Workflow
- Never push directly to master - always use branches and PRs
- Branch naming:
feat/,fix/,docs/,refactor/prefixes - Commit format: Use Conventional Commits
feat:for new features (not just docs)fix:for bug fixesdocs:for documentation onlyrefactor:,test:,chore:as appropriate
- Stage files explicitly: Never use
git add .orgit commit -a - Create PRs: Use
gh pr createafter pushing branch
Code Style
- Type hints: All functions must have type annotations
- Formatting:
ruff formatandruff check(run via pre-commit) - Type checking:
mypymust pass - KISS: Keep it simple - avoid over-engineering
- Small functions: Refactor deeply nested code into smaller units
- Minimal mocking: Prefer integration tests over heavy mocking
Testing
Run tests before submitting PRs:
make test # Fast tests (excludes slow/eval)
make test SLOW=1 # Include slow tests
make typecheck # mypy
make lint # ruff + other checksProject Structure
Key directories:
gptme/- Core library codegptme/cli/- CLI entry pointsgptme/tools/- Tool implementationsgptme/llm/- LLM provider integrationsgptme/server/- REST API server
tests/- Test suitedocs/- Sphinx documentation (RST + MD)scripts/- Build and utility scripts
Core vs gptme-contrib
We aim to keep gptme core small and focused. See docs/arewetiny.rst.
Belongs in core (gptme):
- Essential tools (shell, save, patch, browser, vision)
- Core infrastructure (chat loop, message handling, LLM providers)
- Features needed by most users
Belongs in gptme-contrib:
- Specialized tools (Twitter/X, Discord, email)
- Experimental features
- Integrations with specific services
- Multi-agent patterns (consortium)
When in doubt, start in gptme-contrib. If widely adopted, consider upstreaming.
Performance
We track startup time and code size. See docs/arewetiny.rst.
CI benchmarks enforce startup thresholds.
Key Concepts
- Tool: A function the assistant can execute (shell, save, patch, etc.)
- ToolUse: Parsed representation of a tool invocation in a message
- Message: A single message in the conversation
- LogManager: Manages conversation history persistence
- Step: One LLM generation + tool execution cycle
- Turn: Complete user→assistant exchange (may include multiple steps)
See docs/glossary.md for full terminology.
Memory
gptme uses a cross-harness memory store that is shared between gptme, Claude
Code, and Codex sessions. Memories are Claude Code–compatible Markdown files
in layered roots: project memory/ when that directory exists, then the
Claude Code per-project directory, then agent/user roots.
Recall at session start
Run recall once to surface the entries most relevant to the current task:
gptme-util memory recall "<one-line task description>" -k 5If gptme-rag (with the lexical extra) is installed the TF-IDF backend is
used automatically; a deterministic token-overlap fallback is used otherwise.
The output line always names the backend that ran (backend=tfidf or
backend=overlap). Recall searches every layered root.
Save a memory
When you learn something worth keeping across sessions — a user preference, a project decision, a recurring pattern — persist it:
gptme-util memory save <slug> "<one-line description>" --type <type> <<'EOF'
<body — as many lines as useful>
EOFValid --type values: user, feedback, project, reference.
Default write root is project memory/ if that directory exists, else
~/.claude/projects/<workspace-hash>/memory/. Existence is the only check —
an unwritable project directory is an error, not a fallback. recall (and
the Claude Code hook) search every layered root, so other harnesses see the
entry on their next recall. gptme's session-start workspace prompt loads
the indexes of every existing layered root (64 KB shared budget), but Claude
Code's native MEMORY.md auto-load reads only the CC root; pass --scope cc
when the memory must appear in Claude Code without recall.
Inspect and manage
gptme-util memory roots # Which roots are active for this workspace
gptme-util memory list # All living entries across all roots
gptme-util memory show <slug> # Full text of one entry
gptme-util memory index --write # Regenerate MEMORY.md in the write rootSee docs/memory.rst or https://gptme.org/docs/memory.html for the full reference.
Subsystem Guides
- webui/AGENTS.md - Web UI architecture and gotchas
Common Tasks
Adding a new tool
- Create
gptme/tools/toolname.py - Implement
ToolSpecwithexecute()function - Tools are auto-discovered - no manual registration needed
- Add tests in
tests/test_tools_toolname.py
Running the server
uv run gptme-server --port 5000Working on the web UI
See webui/AGENTS.md for full setup including dev servers, testing, and architecture notes.
Building docs
make docsWriting docs
Every docs page declares its target audience — :audience: user|power-user|developer
as the first line of .rst files, audience: front matter in .md — and the build
fails without it. Keep content at the page's level: move power-user or developer
detail to a more technical page and link to it, and flag mismatches in review.
Hub pages list their subpages near the top; leaf pages have no toctree and no
.. contents::. Don't nest a lone related page under a content-heavy page.
After make docs, review the rendered structure with make docs-structure. See "Documentation" in docs/contributing.rst.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

