mini-agent is a perception-driven personal AI agent framework.
- Perception-first, not goal-first.
- File = truth (Markdown/JSONL), no database.
- Transparency > isolation for personal-agent trust.
- Runtime:
src/(CLI/API/agent loop/memory/perception/dispatch). - Memory:
memory/(MEMORY.md,HEARTBEAT.md,SOUL.md,topics/*.md,proposals/,handoffs/). - Plugins:
plugins/*.sh(environment sensing). - Build artifacts:
dist/(generated).
Key modules:
src/agent.ts,src/loop.ts,src/memory.ts,src/dispatcher.ts,src/api.ts,src/observability.ts,src/perception-stream.ts
pnpm build: Compilesrc/todist/.pnpm typecheck: Run strict TypeScript checks without emit.pnpm test: Run Vitest once.pnpm test:watch: Run Vitest in watch mode.pnpm start: Run compiled CLI fromdist/cli.js.pnpm setup: Install deps, build, and local link.
Before PR or deploy:
pnpm typecheck && pnpm test
- Language: TypeScript (ES modules, NodeNext).
- Indentation: 2 spaces; semicolons enabled; single quotes.
- Naming: file
kebab-case, vars/functionscamelCase, types/classesPascalCase. - Keep modules focused; colocate related helpers in same domain file.
- L1 Self-Improve: may directly edit
skills/*.md,plugins/*.sh, memory files. - L2 Feature Implementation: changes touching
src/*.ts— Kuro decides autonomously, writes proposal for record, implements+deploys (authorized 2026-02-18). - L3 Architecture: large cross-cutting changes require proposal + explicit effort/impact.
- Hot/Warm/Cold + Topic memory.
[REMEMBER #topic]writes tomemory/topics/{topic}.md.HEARTBEAT.md= strategy/task board,NEXT.md= execution queue.
- Event bus:
trigger:*,action:*,log:*. - Observability subscriber routes events to logs/notify.
- Perception streams run by category interval with distinct-change behavior.
When evaluating runtime/system behavior, verify via live endpoints first (do not rely only on docs):
GET /healthGET /statusGET /loop/statusGET /logsGET /contextGET /api/dashboard/behaviors
Principle: Verification over assumption.
- Main dashboard:
/dashboard(dashboard.html). - SSE stream:
GET /api/events. - Learning digest:
/api/dashboard/learning. - Journal digest:
/api/dashboard/journal. - Behavior timeline:
/api/dashboard/behaviors.
- Framework: Vitest (
tests/**/*.test.ts). - Test files must be
*.test.tsundertests/. - Use behavior-oriented describe blocks.
- Conventional prefixes:
feat:,fix:,tidy:,learn:,revert:,improve:. - Imperative subject lines, scoped when useful.
- PR should include:
- problem/solution summary
- context/issue link
- verification evidence (commands + key output)
- Include logs/screenshots for ops/UI changes (
dashboard.html, deploy/scripts, plugin output).
CI/CD path:
commit -> push main -> GitHub Actions -> scripts/deploy.sh -> service restart -> health check
Manual fallback:
./scripts/deploy.sh
- Use
.envfor secrets; never commit credentials/tokens. - Review plugin shell safety/timeouts before enabling in
agent-compose.yaml. - If
MINI_AGENT_API_KEYis enabled, providex-api-key/Bearer for API calls.
- Alex: decisions/approval.
- Coding agent: implementation, verification, deployment.
- Kuro: perception, autonomous execution, reporting.
For cross-agent delegation, use memory/handoffs/*.md with status lifecycle:
pending -> approved -> in_progress -> completed|blocked