88 lines
3.1 KiB
Markdown
88 lines
3.1 KiB
Markdown
# APEX OS Employee Factory
|
|
|
|
## Overview
|
|
The Employee Factory is a standardized system for creating new AI employees (Letta agents) with consistent configuration, constitution compliance, and API access.
|
|
|
|
## Components
|
|
|
|
### 1. Master Template
|
|
- **Location:** `/opt/apex/templates/employee-template.json`
|
|
- **Version:** 1.0
|
|
- **Features:**
|
|
- APEX Constitution (5 Laws) auto-injected
|
|
- Standard API access (LiteLLM, Gitea, Status API, PostgreSQL)
|
|
- Shared memory hooks (mem0.shared_knowledge)
|
|
- Lifecycle enforcement (PLAN > BUILD > DEPLOY > REFLECT)
|
|
|
|
### 2. Spawn Script
|
|
- **Location:** `/opt/apex/tools/spawn_employee.sh`
|
|
- **Usage:** `spawn_employee.sh <RoleName> <SpecializedTask>`
|
|
- **Example:** `spawn_employee.sh "Marketing Agent" "Create social media content"`
|
|
|
|
**Process:**
|
|
1. Loads master template
|
|
2. Determines next employee ID
|
|
3. Creates dedicated Gitea repository
|
|
4. Generates customized system prompt
|
|
5. Creates Letta agent with APEX Constitution
|
|
6. Logs hiring event to database
|
|
|
|
### 3. APEX Constitution (Auto-Injected)
|
|
Every employee inherits these 5 immutable laws:
|
|
1. All decisions must be logged in `apex.engineer_decisions` before execution.
|
|
2. Query `apex.reflections` and `mem0.shared_knowledge` before starting unfamiliar tasks.
|
|
3. All deployments must pass through Docker (no direct system installs).
|
|
4. Create backups before modifying ANY infrastructure configuration.
|
|
5. Follow the Engineering Lifecycle: PLAN > BUILD > DEPLOY > REFLECT (no shortcuts).
|
|
|
|
## Current Employees
|
|
|
|
### Employee 1: Engineer
|
|
- **Agent ID:** agent-4e3c3862-d0ba-47c6-8f2e-74249e1cfe4a
|
|
- **Role:** Principal Engineer
|
|
- **Repository:** engineer/apex-os-docs
|
|
- **Specialization:** Infrastructure, deployment, AI employee creation
|
|
|
|
### Employee 3: Documentation Agent
|
|
- **Agent ID:** agent-f8706c2d-51b5-4678-abc7-2864d9845e6a
|
|
- **Role:** Documentation Auditor
|
|
- **Repository:** engineer/documentation-agent-workspace
|
|
- **Specialization:** Audit and improve Markdown documentation
|
|
|
|
## For CEO: How to Hire a New Employee
|
|
|
|
1. SSH into the VPS:
|
|
```bash
|
|
ssh root@62.72.3.145 -i <path-to-engineer-ssh-key>
|
|
```
|
|
|
|
2. Run the spawn script:
|
|
```bash
|
|
/opt/apex/tools/spawn_employee.sh "Role Name" "Specialized Task Description"
|
|
```
|
|
|
|
3. Interact with the new employee via Letta API:
|
|
```bash
|
|
curl -X POST http://localhost:8283/v1/agents/<AGENT_ID>/messages/ \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"messages": [{"role": "user", "content": "Your task here"}]}'
|
|
```
|
|
|
|
## Monitoring
|
|
|
|
### Grafana Dashboard
|
|
- **URL:** http://grafana.apex.unstuck-path.com
|
|
- **Dashboard:** "APEX OS - Executive Overview"
|
|
- **Dashboard UID:** a5jdct
|
|
|
|
### Dashboard Panels:
|
|
1. **System Health** - Real-time status of 6 critical services
|
|
2. **Active Projects Pipeline** - Current projects and statuses
|
|
3. **Deployment Success Rate** - 24-hour deployment metrics
|
|
4. **Engineer Brain Activity** - Latest reflections and decisions
|
|
5. **Auto-Recovery Events** - System self-healing activity
|
|
6. **Lifecycle Executions** - Total engineering cycles completed
|
|
7. **Knowledge Entries** - Company brain size
|
|
8. **Constitution Violations** - Compliance tracking
|
|
9. **Active Employees** - Current team size
|