- Reset master to upstream/main (16,697 commits) - Overlay 2,271 local-only files (skills, tools, workspace, configs, apps) - Restore IDENTITY.md and USER.md templates - Build verified, gateway running, Discord working Co-Authored-By: Claude Opus 4.6 <[email protected]>
2.2 KiB
2.2 KiB
ARCHITECTURE.md — James Implementation Overview
James is a local-first, event-driven operations layer. Watchers emit events, agents analyze them, policy gates actions, and an optional voice layer summarizes outcomes.
Data Flow
Nodes -> Watchers -> Redis -> Analyst/Mail -> Policy -> Action Router -> Outputs
| |
| -> Audit
-> Voice Stub (optional)
Components
Redis Backbone
- Role: event bus and short-term cache
- Config:
workspace/james/redis/redis.conf - Systemd:
workspace/james/systemd/james-redis.service
Watcher Agent
- Code:
workspace/james/agents/watcher/watcher.py - Inputs:
/proc, Docker CLI, optionalnvidia-smi - Output channel:
james.events.system
Analyst Agent
- Code:
workspace/james/agents/analyst/analyst.py - Inputs:
james.events.system,james.events.mail - Output channel:
james.decisions
Mail Agent (dry-run)
- Code:
workspace/james/agents/mail/mail_agent.py - Inputs: JSON fixtures, local parsing (no live inbox)
- Output channel:
james.events.mail
Policy Engine
- Code:
workspace/james/agents/policy/policy_engine.py - Logic:
workspace/james/lib/policy.py - Output channel:
james.actions
Voice Stub
- Code:
workspace/james/agents/voice/voice_stub.py - Inputs:
james.actions,james.decisions,james.events.* - Output channel:
james.events.voice
Audit Logger
- Code:
workspace/james/tools/audit_logger.py - Inputs: all channels
- Output: JSON lines to
workspace/james/audit/audit.log
Channels
james.events.system— watcher eventsjames.events.mail— mail agent eventsjames.events.voice— voice prompt eventsjames.decisions— analyst decisionsjames.actions— policy outputsjames.audit— audit replay channel
Deployment Notes
- All agents are Python and run from
PYTHONPATH=<repo-root>/workspace. - Systemd unit files live under
workspace/james/**/systemd/. - Schema validation is enabled by default via
JAMES_VALIDATE_SCHEMA=1.