Note
This is a template for a gptme-based agent. See the agents documentation for more information about gptme agents and how they work.
Fork it to create a new agent with its own identity.
The name of the agent is gptme-agent.
This git repository is the brain of gptme-agent. It is a workspace of their thoughts and ideas.
- gptme-agent will write their thoughts, plans, and ideas in this repository.
- gptme-agent's agent harness, including this repo, is in-progress.
- gptme-agent is encouraged to suggest improvements to their harness.
Information about gptme-agent can be found in ABOUT.md, including their personality and goals.
Information about gptme-agent's harness and architecture can be found in ARCHITECTURE.md.
Before forking or using this template, ensure you have the required dependencies installed.
Quick Check:
./scripts/install-deps.shAuto-Install (where possible):
./scripts/install-deps.sh --install| Dependency | Purpose | Installation |
|---|---|---|
git |
Version control | Package manager |
python3 |
Python 3.10+ runtime | Package manager |
pipx |
Python CLI tool installer | python3 -m pip install --user pipx |
uv |
Fast Python package manager | curl -LsSf https://astral.sh/uv/install.sh | sh |
gptme |
Agent framework | pipx install gptme |
| Dependency | Purpose | Installation |
|---|---|---|
tree |
Directory visualization | apt/brew/dnf install tree |
jq |
JSON processing | apt/brew/dnf install jq |
gh |
GitHub CLI | cli.github.com |
pre-commit |
Git hooks | pipx install pre-commit |
shellcheck |
Shell script linter | apt/brew/dnf install shellcheck |
The easiest way to create a new agent from this template is with the gptme-agent CLI (included with gptme):
pipx install gptme
# Create a new agent workspace from this template
gptme-agent create ~/my-agent --name MyAgent
cd ~/my-agent
# Run the agent interactively
gptme "hello"The agent's context is automatically loaded via gptme.toml which configures the files and context command to include.
The template also supports Claude Code as an alternative backend:
# Install Claude Code
npm install -g @anthropic-ai/claude-code
# Authenticate
claude /login
# Run interactively (reads AGENTS.md automatically)
claude
# Run autonomously
./scripts/runs/autonomous/autonomous-run-cc.shThe scripts/build-system-prompt.sh script reads gptme.toml and builds a system prompt for Claude Code, so both backends share the same identity files and context.
After creating or forking an agent workspace, verify everything is configured correctly:
gptme-agent doctorThis checks core files, configuration, directories, tools, and submodules. Use --fix to auto-fix simple issues (create missing directories, initialize submodules).
Requires gptme >= v0.32
Run the agent interactively with gptme or Claude Code:
gptme "hello"
# or: claudeAgents can run autonomously on a schedule using systemd (Linux) or launchd (macOS).
# Install as a system service (runs every 30 minutes by default)
gptme-agent install
# Customize the schedule
gptme-agent install --schedule "*:00" # Every hour
# Manage the agent
gptme-agent status # Check status
gptme-agent logs --follow # Monitor logs
gptme-agent run # Trigger immediate run
gptme-agent stop # Pause scheduled runsSee the gptme agents documentation for service installation and management commands.
To customize the autonomous behavior, edit the run script for your backend:
- gptme:
scripts/runs/autonomous/autonomous-run.sh - Claude Code:
scripts/runs/autonomous/autonomous-run-cc.sh
See: scripts/runs/autonomous/README.md for complete documentation.
Features:
- CASCADE workflow (Loose Ends → Task Selection → Execution)
- Two-queue system (manual + generated priorities)
- Safety guardrails (GREEN/YELLOW/RED operation classification)
- Session documentation and state management
- Multi-backend: Supports both gptme and Claude Code backends
If you prefer to fork manually instead of using gptme-agent create:
git clone https://github.com/gptme/gptme-agent-template
cd gptme-agent-template
git submodule update --init --recursive
./scripts/fork.sh <path> [<agent-name>]Then follow the instructions in the output.
- gptme-agent keeps track of tasks in
TASKS.md - gptme-agent keeps a journal in
./journal/ - gptme-agent keeps a knowledge base in
./knowledge/
- gptme-agent can add files to
gptme.tomlto always include them in their context
queue-manual.md- Manually maintained work queue with strategic contextqueue-generated.md- Auto-generated queue from tasks and GitHub- See
state/README.mdfor detailed documentation
context.sh- Main context generation orchestratorgptodo- Task management CLI (install from gptme-contrib)
lessons/: Behavioral patterns and constraints
- Prevents known failure modes through structured guidance
- See
lessons/README.mdfor lesson system documentation