Personal assistant agent with persistent memory and configurable persona
Project description
Pip-Boy
A personal assistant agent with persistent memory, multi-channel support, and a configurable persona. Built on Anthropic's Claude API, it supports multi-agent teamwork, task planning, git worktree isolation, and extensible skills — accessible via CLI, WeChat, or WeCom.
Features
Core
- Conversational REPL — Interactive chat loop with readline history and UTF-8 support
- Persona System — Lead persona ("Pip-Boy") with customizable teammate personas via Markdown + YAML frontmatter
- Multi-Channel — CLI, WeChat (personal), and WeCom (enterprise) channels with unified message routing
- Web Search — Tavily integration with automatic DuckDuckGo fallback
Memory System
A three-tier pipeline that learns from conversations automatically:
- L1 Reflect — Extracts behavioral observations (user preferences, decision patterns) and objective experience (technical lessons, API insights, reusable patterns) from conversation transcripts
- L2 Consolidate — Merges observations into memories with reinforcement, decay, and conflict resolution
- L3 Axiom Distillation — Promotes high-stability memories into judgment principles (
axioms.md) - Dream Cycle — L2 + L3 run together at a configurable hour when the system is idle and enough observations have accumulated
- Memory Recall — TF-IDF search with temporal decay injects relevant memories into the system prompt
- Reflect Tool — The agent can proactively trigger reflection when meaningful work is completed
- SOP-Driven Prompts — Memory pipeline rules are maintained in an external SOP document for easy tuning
User Identity
- Owner Profile —
owner.mdis read-only and defines the workspace owner with channel identifiers - User Profiles —
remember_usertool creates and updates profiles for other users (users/*.md) - ACL — Owner and admin roles control access to sensitive operations (e.g.,
/clean,/reset) - Multi-Channel Identity — Users are tracked by channel-specific identifiers (WeChat ID, WeCom ID, CLI)
Tools
- Filesystem —
read,write,edit,glob(sandboxed to working directory) - Shell —
bashexecution with optional background mode for long-running commands - Web —
web_searchandweb_fetchfor real-time information retrieval - Memory —
memory_searchfor explicit recall,reflectfor on-demand reflection - Skills —
load_skilldynamically loads built-in and user-defined skill guides
Task Planning
- Story / Task DAG — Two-level planning: stories (epics) contain tasks with dependency tracking
- Kanban Board —
task_board_overview,task_board_detailfor status visualization - State Machine — Tasks flow through
pending→in_progress→in_review→completed/failed - Persistent Storage — JSON files under
.pip/agents/<id>/tasks/survive across sessions
Multi-Agent Team
- Teammate Spawning —
team_spawncreates daemon threads with per-session model and turn limits - Inbox Messaging — JSONL-based message bus (
send,read_inbox) between lead and teammates - Model Selection — Per-project
.pip/models.jsondefines available models for teammate assignment - Per-Agent Isolation — Each agent has its own data directory, TeamManager, and WorktreeManager
- CLI Commands —
/teamfor roster status,/inboxto peek the lead inbox
Git Worktree Isolation
- Isolated Branches — Each subagent works in its own git worktree (
.pip/.worktrees/{name}/, branchwt/{name}) - Sync / Integrate / Cleanup — Worktree lifecycle management with merge conflict detection
- Task Submission —
task_submitsyncs work and transitions task status automatically
Context Management
- Micro-Compaction — Old tool results replaced with placeholders, keeping the last N rounds intact
- Auto-Compaction — When token count exceeds threshold, the oldest ~50% is summarised by the LLM while the recent tail (~20%, minimum 4 messages) is preserved verbatim
- Overflow Recovery — On a context-overflow API error,
emergency_compactruns a three-stage fallback (aggressive micro-compact → oversized tool_result truncation → tail-preserving summary) and retries with the same profile - Transcript Persistence — Every conversation turn saves a timestamped JSON transcript; old transcripts are cleaned up after reflection
Resilience
Every messages.create call is wrapped in a three-layer retry onion (pip_agent.resilience):
- Layer 1 — Auth Rotation — Iterate through available profiles (
.env::ANTHROPIC_API_KEYas baseline + any extras in.pip/keys.json), skipping any in cooldown. Failures classify asrate_limit(120s),auth/billing(300s),timeout(60s), orunknown(120s). - Layer 2 — Overflow Recovery — On context overflow,
emergency_compactmutates the message list in place and retries up to 3 times with the same profile. - Layer 3 — Tool-Use Loop — The standard
while True + stop_reasonloop; each iteration is one Layer-1 call. - Fallback Models — After all primary profiles are exhausted, Pip-Boy tries each model in
fallback_models(per-agent YAML) before raisingResilienceExhausted. - Simulated Failures —
/simulate-failure <reason>arms the next API call to fail with a given category, letting you verify the retry path without real outages.
Built-in Skills
| Skill | Purpose |
|---|---|
task-planning |
Structured planning with story/task breakdown |
agent-team |
Multi-agent coordination and delegation |
git |
Git operations and workflow guidance |
code-review |
Code review methodology |
create-skill |
Authoring new custom skills |
Installation
Prerequisites: Python >= 3.11
pip install pip-boy
Development (from source)
git clone https://github.com/ByeDream/Pip-Boy.git
cd Pip-Boy
pip install -e ".[dev]"
Usage
# Navigate to your target project and run
cd /path/to/your/project
pip-boy
# CLI-only mode (no WeChat/WeCom channels)
pip-boy --cli
# Force WeChat QR login
pip-boy --scan
# Show version
pip-boy --version
On first launch, the scaffold automatically creates the .pip/ directory structure, .env (from template), and .gitignore entries. Edit the generated .env to fill in your ANTHROPIC_API_KEY, then run again.
The agent uses Path.cwd() as its working directory — always run it from the project you want to interact with.
Updating
From within a running session:
/update
Or manually:
pip install --upgrade pip-boy
Configuration
Environment Variables (.env)
| Variable | Required | Default | Description |
|---|---|---|---|
ANTHROPIC_API_KEY |
Conditional | — | Primary Anthropic API key; loaded as profile env and always serves as the baseline |
ANTHROPIC_BASE_URL |
No | (api.anthropic.com) | Custom API endpoint (proxy support); applied to the env profile and inherited by any keys.json profile that omits its own base_url |
KEYS_FILE_PATH |
No | .pip/keys.json |
Override the additional-profiles file location |
SEARCH_API_KEY |
No | — | Tavily API key; falls back to DuckDuckGo |
WECOM_BOT_ID |
No | — | WeCom bot ID for enterprise WeChat channel |
WECOM_BOT_SECRET |
No | — | WeCom bot secret |
VERBOSE |
No | true |
Verbose output |
PROFILER_ENABLED |
No | false |
Enable performance profiling |
At least one of ANTHROPIC_API_KEY (in .env) or a populated .pip/keys.json profile must be present.
Memory Pipeline
| Variable | Default | Description |
|---|---|---|
REFLECT_TRANSCRIPT_THRESHOLD |
10 |
New transcripts needed to trigger reflection |
TRANSCRIPT_RETENTION_DAYS |
7 |
Days to keep reflected transcripts |
DREAM_HOUR |
2 |
Local hour (0-23) for the Dream cycle |
DREAM_MIN_OBSERVATIONS |
20 |
Minimum observations before Dream can run |
DREAM_INACTIVE_MINUTES |
30 |
Agent idle time (minutes) required for Dream |
Per-Agent Configuration
Model, token limits, compaction settings, and the fallback model chain are configured per-agent via YAML frontmatter in .pip/agents/<id>/persona.md:
---
model: claude-sonnet-4-6
max_tokens: 8192
compact_threshold: 50000
compact_micro_age: 3
fallback_models:
- claude-haiku-4-5
- claude-sonnet-4-5
---
fallback_models is optional. When set, Pip-Boy falls back through each listed model after every primary profile has failed, before giving up.
Multi-Key Profiles (.pip/keys.json)
The .env::ANTHROPIC_API_KEY is always the baseline (loaded as profile env). .pip/keys.json is additive — each filled entry is appended as an extra profile for rotation:
{
"profiles": [
{ "name": "backup", "api_key": "sk-ant-...", "base_url": "" }
]
}
Pip-Boy scaffolds .pip/keys.json on first run with a blank api_key placeholder; entries with empty api_key are silently ignored, so the untouched template is a no-op. Fill in real keys to enable rotation. A profile that omits base_url inherits .env::ANTHROPIC_BASE_URL (convenient when all keys share the same proxy). Profiles are de-duplicated by api_key, so an entry that happens to equal the env key is skipped with a debug log.
Rotation honours per-reason cooldowns — rate_limit 120s, auth / billing 300s, timeout 60s. The file is covered by .gitignore.
Slash Commands (Resilience)
| Command | Description |
|---|---|
/profiles |
List all loaded API profiles, their availability, and last-good timestamp |
/cooldowns |
Show profiles currently in cooldown with remaining seconds |
/stats |
Print resilience runner counters (attempts, successes, rotations, compactions, fallbacks) |
/simulate-failure <reason> |
Arm a fake failure (rate_limit, auth, timeout, billing, overflow, unknown) for the next API call; use off to disarm |
/fallback |
Show the current agent's primary + fallback model chain |
Project Directory Structure
.pip/
├── owner.md # Owner profile (read-only)
├── models.json # Model catalog for team spawning
├── keys.json # Extra rotation profiles layered on top of .env (gitignored)
├── .scaffold_manifest.json # Scaffold version tracking
├── agents/
│ ├── bindings.json # Channel → agent routing
│ └── pip-boy/ # Per-agent directory
│ ├── persona.md # Agent persona + config (YAML frontmatter)
│ ├── state.json # Memory pipeline state
│ ├── memories.json # L2 consolidated memories
│ ├── axioms.md # L3 judgment principles
│ ├── observations/ # L1 observation files (.jsonl)
│ ├── transcripts/ # Conversation transcripts (.json)
│ ├── users/ # User profiles (.md)
│ ├── tasks/ # Task board state
│ └── team/ # Teammate data + inbox
└── .worktrees/ # Git worktree isolation
Dependencies
anthropic— Claude API clientpydantic-settings— Configuration managementtavily-python— Web search APIddgs— DuckDuckGo fallback searchpyyaml— YAML parsing for skills and personashttpx— HTTP client for channel communicationwecom-aibot-python-sdk— WeCom enterprise bot SDKqrcode— Terminal QR code rendering for WeChat loginpyreadline3— Readline for Windows
License
This project is licensed under the MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pip_boy-0.3.6.tar.gz.
File metadata
- Download URL: pip_boy-0.3.6.tar.gz
- Upload date:
- Size: 170.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d4a408a0601f23811541ec246adc53caff63c5c45c62b4fff34f0ad1fae2311
|
|
| MD5 |
0fcb10cf70aaab466e86c9d723f229a7
|
|
| BLAKE2b-256 |
2a921017d21fdb4be3aeabdb2b35f05b5bf73c2b7856453d7cdd984e1b412328
|
Provenance
The following attestation bundles were made for pip_boy-0.3.6.tar.gz:
Publisher:
publish.yml on ByeDream/Pip-Boy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pip_boy-0.3.6.tar.gz -
Subject digest:
6d4a408a0601f23811541ec246adc53caff63c5c45c62b4fff34f0ad1fae2311 - Sigstore transparency entry: 1340488971
- Sigstore integration time:
-
Permalink:
ByeDream/Pip-Boy@91b298e6f2126bf32662dc0fddfaf98cd2795374 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/ByeDream
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@91b298e6f2126bf32662dc0fddfaf98cd2795374 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pip_boy-0.3.6-py3-none-any.whl.
File metadata
- Download URL: pip_boy-0.3.6-py3-none-any.whl
- Upload date:
- Size: 137.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dde3ccd93116ee099e108304566e83a8a5fe05d5cab4470f62a36de185fc2b0d
|
|
| MD5 |
1e7712a63f9ec5e278912d3afe530048
|
|
| BLAKE2b-256 |
2c5134a7e0369bb3cc81b4201c2e989b54d77d89b6eff0a92f0cfb769bbff050
|
Provenance
The following attestation bundles were made for pip_boy-0.3.6-py3-none-any.whl:
Publisher:
publish.yml on ByeDream/Pip-Boy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pip_boy-0.3.6-py3-none-any.whl -
Subject digest:
dde3ccd93116ee099e108304566e83a8a5fe05d5cab4470f62a36de185fc2b0d - Sigstore transparency entry: 1340488973
- Sigstore integration time:
-
Permalink:
ByeDream/Pip-Boy@91b298e6f2126bf32662dc0fddfaf98cd2795374 -
Branch / Tag:
refs/tags/v0.3.6 - Owner: https://github.com/ByeDream
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@91b298e6f2126bf32662dc0fddfaf98cd2795374 -
Trigger Event:
push
-
Statement type: