This guide covers practical usage with coding agents like Codex and Claude Code.
- choose or confirm the working scope
- run recall/context before starting work
- perform the task
- store key outcomes with remember
- promote durable outcomes into knowledge artifacts
If your agent supports hooks, wire Postbrain into:
- post-tool events (
snapshot) - session-end events (
summarize-session)
This keeps memory up to date without manual overhead.
Codex hooks are experimental and currently disabled on Windows. On macOS/Linux, enable hooks in Codex config and add
Postbrain hook commands in ~/.codex/hooks.json or <repo>/.codex/hooks.json.
Example:
# ~/.codex/config.toml
[features]
codex_hooks = true{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "postbrain-cli snapshot --scope \"$POSTBRAIN_SCOPE\""
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "postbrain-cli summarize-session --scope \"$POSTBRAIN_SCOPE\""
}
]
}
]
}
}Codex now supports plugins in app and CLI (/plugins). Treat plugin usage similarly to Claude command workflows:
- install plugins for reusable workflows/integrations
- install project-local Postbrain skills for repo-specific conventions
- keep scope and token restrictions the same across both agent surfaces
Install both agent skill files when a repository is shared by multiple tools:
postbrain-cli install-codex-skill --target /path/to/project
postbrain-cli install-claude-skill --target /path/to/projectUse --url to set the backend URL explicitly (useful in CI or when the server is not on localhost):
postbrain-cli install-codex-skill --target /path/to/project --url https://postbrain.example.com
postbrain-cli install-claude-skill --target /path/to/project --url https://postbrain.example.comWhen using published team skills:
postbrain-cli skill sync --scope project:your-org/your-repo --agent claude-codeUse stable conventions:
- project scope for repo-specific memory
- team/company scopes for reusable standards
Avoid broad scopes for automation tasks that only need narrow access.
- write concise
summaryand detailedcontent - tag key entities (files, services, technologies, decisions)
- keep transient notes as working memory
- publish durable decisions as knowledge
For end-to-end usage patterns, see Common Usage Workflows.