### Manual Install (Dev Mode) Source: https://github.com/1mancompany/onemancompany/blob/main/README.md Steps to clone the repository, start the application, and open it in a browser for development. ```bash # 1. Clone git clone https://github.com/1mancompany/OneManCompany.git cd OneManCompany # 2. Start (auto-installs UV + Python if needed) bash start.sh # 3. Open browser open http://localhost:8000 ``` -------------------------------- ### Install and Run OneManCompany Source: https://github.com/1mancompany/onemancompany/blob/main/docs/docs/guide/getting-started/index.html Run this command to install and automatically set up OneManCompany. It installs Node.js 16+, Python 3.12, clones the repository, sets up a virtual environment, installs dependencies, and launches the setup wizard. ```bash npx @carbonkite/onemancompany ``` -------------------------------- ### Windows Installation and Launch Source: https://github.com/1mancompany/onemancompany/blob/main/README.md Instructions for Windows users to install Git and Node.js, followed by launching OneManCompany. The launch command handles the installation of UV, Python 3.12, and dependencies. ```powershell # Install Git: https://git-scm.com/download/win # Install Node.js: https://nodejs.org/ # Launch (auto-installs UV + Python 3.12 + dependencies) npx @1mancompany/onemancompany ``` -------------------------------- ### Linux (Ubuntu/Debian) Installation and Launch Source: https://github.com/1mancompany/onemancompany/blob/main/README.md Steps for Linux (Ubuntu/Debian) users to install prerequisites like Git and Node.js, then launch OneManCompany. The launch command installs UV, Python 3.12, and dependencies. ```bash # Install prerequisites sudo apt update && sudo apt install -y git nodejs npm # Launch (auto-installs UV + Python 3.12 + dependencies) npx @1mancompany/onemancompany ``` -------------------------------- ### macOS Installation and Launch Source: https://github.com/1mancompany/onemancompany/blob/main/README.md Steps for macOS users to install Git and launch OneManCompany. The launch command automatically installs UV, Python 3.12, and other dependencies. ```bash # Install Git (if not already installed) xcode-select --install # Launch (auto-installs UV + Python 3.12 + dependencies) npx @1mancompany/onemancompany ``` -------------------------------- ### Start OneManCompany from Cloned Directory Source: https://github.com/1mancompany/onemancompany/blob/main/docs/docs/guide/getting-started/index.html Clone the repository and use this command to start OneManCompany. ```bash # Option 2: from cloned directory cd OneManCompany && bash start.sh ``` -------------------------------- ### Install Bun Runtime Source: https://github.com/1mancompany/onemancompany/blob/main/CONTRIBUTING.md Install the Bun runtime environment, which is a prerequisite for gstack. ```bash curl -fsSL https://bun.sh/install | bash ``` -------------------------------- ### Run OneManCompany Source: https://github.com/1mancompany/onemancompany/blob/main/README.md Install and run the OneManCompany agent operating system with a single command. No additional setup like Python or Docker is required. ```bash npx @1mancompany/onemancompany ``` -------------------------------- ### Re-run OneManCompany Setup Wizard Source: https://github.com/1mancompany/onemancompany/blob/main/docs/docs/guide/getting-started/index.html Execute this command to re-run the setup wizard for reconfiguration. ```bash # Re-run setup wizard bash start.sh init ``` -------------------------------- ### Clone and Install Project Dependencies Source: https://github.com/1mancompany/onemancompany/blob/main/CONTRIBUTING.md Clone the repository and install development dependencies using uv. ```bash git clone https://github.com/1mancompany/OneManCompany.git cd OneManCompany uv venv && uv pip install -e ".[dev]" ``` -------------------------------- ### Start Development Server Source: https://github.com/1mancompany/onemancompany/blob/main/CONTRIBUTING.md Launch the OneManCompany server in development mode. ```bash .venv/bin/python -m onemancompany.main ``` -------------------------------- ### Another Good system_prompt_template Example Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/README.md This example demonstrates a system prompt for a UX Designer, emphasizing user-centric design principles and iterative feedback. ```yaml You are a UX Designer focused on creating intuitive and engaging user experiences. Always start by understanding user needs and business goals. Employ an iterative design process, incorporating feedback from stakeholders and user testing to refine your designs. Your output should be user-friendly, accessible, and visually appealing. ``` -------------------------------- ### Start OneManCompany with npx Source: https://github.com/1mancompany/onemancompany/blob/main/docs/docs/guide/getting-started/index.html Use this command to start OneManCompany, which automatically updates to the latest version. ```bash # Option 1: npx (auto-updates) npx @carbonkite/onemancompany ``` -------------------------------- ### Start OneManCompany Service Source: https://github.com/1mancompany/onemancompany/blob/main/docs/PRODUCT_OVERVIEW.md Launches the OneManCompany service on port 8000. Navigate to the OneManCompany directory and execute the start script. ```bash cd OneManCompany && bash start.sh ``` -------------------------------- ### Tool Success Return Format Example Source: https://github.com/1mancompany/onemancompany/blob/main/docs/tool-template.md Example of a successful tool execution, returning a 'status' of 'ok' along with relevant data. ```json {"status": "ok", "path": "/path/to/file", "employee_id": "00004"} ``` -------------------------------- ### Start Talent Market Service Source: https://github.com/1mancompany/onemancompany/blob/main/docs/PRODUCT_OVERVIEW.md Launches the Talent Market service on port 9000. Navigate to the talentmarket directory and execute the start script. ```bash cd talentmarket && bash start.sh ``` -------------------------------- ### Tool Registration Example Source: https://github.com/1mancompany/onemancompany/blob/main/docs/tool-template.md Demonstrates how to register a new tool with its metadata in the tool registry. ```python tool_registry.register(my_tool, ToolMeta(name="my_tool", category="base")) ``` -------------------------------- ### Start OneManCompany on a Custom Port Source: https://github.com/1mancompany/onemancompany/blob/main/docs/docs/guide/getting-started/index.html Use this command to start OneManCompany on a specific custom port. ```bash # Custom port bash start.sh --port 8080 ``` -------------------------------- ### Good system_prompt_template Example Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/README.md An example of a well-written system prompt template focusing on capability and behavior, adhering to conciseness and second-person address. ```yaml You are a Senior Software Engineer specializing in backend development. You prioritize writing clean, maintainable, and efficient code. When faced with a complex problem, break it down into smaller, manageable steps and consider potential edge cases before implementing a solution. Always document your code clearly and adhere to established coding standards. ``` -------------------------------- ### Workflow Schema Example Source: https://github.com/1mancompany/onemancompany/blob/main/company/operations/sops/workflow_schema.md An example demonstrating the structure of a workflow file, including header metadata and phase definitions. ```markdown # Onboarding Workflow - **Flow ID**: onboarding - **Owner**: HR - **Trigger**: New employee joins --- ## Phase 1: Prepare Workstation - **Goal**: Ensure workstation and accounts are ready before day one - **Responsible**: COO - **Steps**: 1. Set up computer and access credentials 2. Add to company communication channels - **Output**: Workstation ready checklist ## Phase 2: Welcome Orientation - **Goal**: New hire understands company culture and their role - **Responsible**: HR - **Depends on**: Phase 1 - **Steps**: 1. Walk through company handbook 2. Introduce to team members - **Output**: Signed onboarding confirmation ``` -------------------------------- ### Task Tree Example Source: https://github.com/1mancompany/onemancompany/blob/main/mkdocs-docs/guide/task-management.md Demonstrates a hierarchical project structure with subtasks and explicit dependency declarations. ```text Build a puzzle game (Project) ├── Design game mechanics (Simple) ├── Create art assets (Simple) │ └── blocked by: Design game mechanics ├── Implement game logic (Simple) │ └── blocked by: Design game mechanics ├── QA testing (Simple) │ └── blocked by: Implement game logic, Create art assets └── Polish and ship (Simple) └── blocked by: QA testing ``` -------------------------------- ### System Prompt Template - Bad Example (Vague) Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/AI_CODER_GUIDE.md An example of a bad system prompt that is too vague and lacks specific instructions. ```text You are a helpful assistant. Be professional and do your best. ``` -------------------------------- ### Starting MCP Server as Coprocess Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/README.md This bash snippet shows how to start the MCP server as a coprocess, capture its PID, and access its standard input and output file descriptors for communication. ```bash # Start MCP server as coprocess PROJECT_ROOT="$(cd "$EMPLOYEE_DIR/../../../.." && pwd)" PYTHON="${PROJECT_ROOT}/.venv/bin/python" coproc MCP_PROC { exec "$PYTHON" -m onemancompany.tools.mcp.server 2>/dev/null } MCP_PID=$MCP_PROC_PID # MCP_PROC[0] = stdout fd (read) # MCP_PROC[1] = stdin fd (write) # Communicate with MCP server via JSON-RPC 2.0 protocol ``` -------------------------------- ### tool.yaml Manifest Example Source: https://github.com/1mancompany/onemancompany/blob/main/company/assets/tools/README.md Example of a tool manifest file (tool.yaml) defining metadata, UI sections, access control, and optional OAuth/environment variable configurations. ```yaml # Required fields id: your_tool # Unique identifier (must match folder name) name: Your Tool Name # Display name description: > What this tool does. This text is shown in the tool list and injected into the employee's prompt. added_by: CEO type: langchain_module # Always "langchain_module" for Python tools sprite: desk_equipment # Pixel art sprite name for the office view # Access control (pick one): # Option A: Open to all employees (omit allowed_users entirely) # Option B: Restrict to specific employees allowed_users: - "00007" # Optional: OAuth configuration (auto-generates login UI) oauth: service_name: your_service # Token cache key authorize_url: https://... # OAuth authorize endpoint token_url: https://... # OAuth token endpoint scopes: scope1 scope2 # Space-separated scopes client_id_env: YOUR_CLIENT_ID # Env var name for client ID client_secret_env: YOUR_SECRET # Env var name for client secret # Optional: Environment variables (auto-generates config UI) env_vars: - name: YOUR_API_KEY label: API Key secret: true # Masks input field placeholder: sk-... - name: YOUR_ENDPOINT label: Endpoint URL secret: false ``` -------------------------------- ### Example manifest.json for Talent Settings Source: https://github.com/1mancompany/onemancompany/blob/main/docs/joining-the-party.md Defines the structure for a talent's settings UI, including input fields for API keys and other configurations. This is used when a talent requires user-specific setup. ```json { "id": "my-claude-agent", "name": "My Claude Agent", "version": "1.0.0", "role": "Engineer", "hosting": "company", "settings": { "sections": [ { "id": "connection", "title": "Connection", "fields": [ {"key": "api_key", "type": "secret", "label": "API Key", "required": true} ] } ] }, "prompts": { "skills": ["skills/*/SKILL.md"] }, "tools": { "builtin": ["read_file", "write_file", "bash"], "custom": [] } } ``` -------------------------------- ### Install OpenClaw CLI Source: https://github.com/1mancompany/onemancompany/blob/main/mkdocs-docs/guide/execution-modes.md Installs the OpenClaw CLI for macOS and Linux systems. Verify the installation using the version command. ```bash # macOS / Linux npm install -g openclaw # Verify installation openclaw --version ``` -------------------------------- ### Install Claude Code CLI Source: https://github.com/1mancompany/onemancompany/blob/main/mkdocs-docs/guide/execution-modes.md Installs the Claude Code CLI for macOS and Linux systems. Verify the installation using the version command. ```bash # macOS / Linux npm install -g @anthropic-ai/claude-code # Verify installation claude --version ``` -------------------------------- ### Initialize Ontology Storage and Schema Source: https://github.com/1mancompany/onemancompany/blob/main/company/human_resource/employees/00002/skills/ontology/SKILL.md Commands to set up the ontology storage directory and create a basic schema file. ```bash # Initialize ontology storage mkdir -p memory/ontology touch memory/ontology/graph.jsonl # Create schema (optional but recommended) cat > memory/ontology/schema.yaml << 'EOF' types: Task: required: [title, status] Project: required: [name] Person: required: [name] EOF ``` -------------------------------- ### Initialize Ontology Storage Source: https://github.com/1mancompany/onemancompany/blob/main/company/human_resource/employees/00005/skills/ontology/SKILL.md Commands to set up the directory and an empty graph file for ontology storage. ```bash # Initialize ontology storage mkdir -p memory/ontology touch memory/ontology/graph.jsonl ``` -------------------------------- ### Example .env File for Channel Credentials Source: https://github.com/1mancompany/onemancompany/blob/main/docs/joining-the-party.md Configures various channel credentials and API keys for OpenClaw. This file should be placed in the project root and is loaded by launch.sh. ```bash # OpenClaw OPENROUTER_API_KEY=sk-or-... # Telegram TELEGRAM_BOT_TOKEN=123456:ABC... # Discord DISCORD_BOT_TOKEN=MTIz... # Slack SLACK_APP_TOKEN=xapp-... SLACK_BOT_TOKEN=xoxb-... # Optional ELEVENLABS_API_KEY=... BRAVE_API_KEY=... ``` -------------------------------- ### Async Test Example Source: https://github.com/1mancompany/onemancompany/blob/main/vibe-coding-guide.md An example of an asynchronous test using pytest. Ensure async functions are awaited correctly. ```python import pytest @pytest.mark.asyncio async def test_something(): result = await some_async_function() assert result["status"] == "ok" ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/README.md Install necessary Python packages for standalone execution. Include langchain-anthropic if using Anthropic models. ```bash pip install langchain-openai langgraph pyyaml # If using Anthropic: pip install langchain-anthropic ``` -------------------------------- ### Complete Bash Example with OpenRouter API Call Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/README.md This comprehensive bash script demonstrates setting up environment variables, making a call to the OpenRouter API for LLM completion, parsing the JSON response, and outputting a structured JSON result. ```bash #!/usr/bin/env bash set -euo pipefail EMPLOYEE_DIR="${1:?Usage: launch.sh }" EMPLOYEE_DIR="$(cd "$EMPLOYEE_DIR" && pwd)" PROJECT_ROOT="$(cd "$EMPLOYEE_DIR/../../../.." && pwd)" PYTHON="${PROJECT_ROOT}/.venv/bin/python" cleanup() { :; } trap cleanup EXIT >&2 echo "[launch.sh] Employee=${OMC_EMPLOYEE_ID} Task=${OMC_TASK_ID}" # Call LLM (OpenRouter example) RESULT=$(curl -s https://openrouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer ${OPENROUTER_API_KEY}" \ -H "Content-Type: application/json" \ -d "{ \"model\": \"google/gemini-3.1-pro-preview\", \"messages\": [{\"role\": \"user\", \"content\": $(echo "$OMC_TASK_DESCRIPTION" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')}] }") # Parse response OUTPUT=$(echo "$RESULT" | python3 -c 'import json,sys; r=json.load(sys.stdin); print(r["choices"][0]["message"]["content"])') MODEL=$(echo "$RESULT" | python3 -c 'import json,sys; r=json.load(sys.stdin); print(r.get("model",""))' 2>/dev/null || echo "") IN_TOKENS=$(echo "$RESULT" | python3 -c 'import json,sys; r=json.load(sys.stdin); print(r.get("usage",{}).get("prompt_tokens",0))' 2>/dev/null || echo "0") OUT_TOKENS=$(echo "$RESULT" | python3 -c 'import json,sys; r=json.load(sys.stdin); print(r.get("usage",{}).get("completion_tokens",0))' 2>/dev/null || echo "0") # Output JSON (only this single line to stdout) python3 -c " import json, sys print(json.dumps({ 'output': sys.argv[1], 'model': sys.argv[2], 'input_tokens': int(sys.argv[3]), 'output_tokens': int(sys.argv[4]), })) " "$OUTPUT" "$MODEL" "$IN_TOKENS" "$OUT_TOKENS" ``` -------------------------------- ### Install Self-Improving Agent Source: https://github.com/1mancompany/onemancompany/blob/main/company/human_resource/employees/00002/skills/self-improving-agent/README.md Command to create a symbolic link for installing the self-improving agent, typically linking to the agent-playbook skills directory. ```bash ln -s ~/path/to/agent-playbook/skills/self-improving-agent ~/.claude/skills/self-improving-agent ``` -------------------------------- ### Tool Docstring Example Source: https://github.com/1mancompany/onemancompany/blob/main/docs/tool-template.md Illustrates the required structure for tool docstrings, including a one-line summary, usage guidance, argument descriptions, and constraints. ```python """Update an employee's work principles. Use this instead of write()/edit() for work principles — it handles dirty-marking and ensures the frontend updates immediately. To add a new principle: read the current principles from your task context, then call this with the full updated content including the new principle. Args: target_employee_id: The employee ID (e.g. "00004"). Use list_colleagues() to find valid IDs. content: Complete new work principles in Markdown format. employee_id: Your own employee ID (auto-filled by the system). """ ``` -------------------------------- ### Git Workflow Example Source: https://github.com/1mancompany/onemancompany/blob/main/vibe-coding-guide.md Demonstrates the correct Git workflow for making changes, including creating a new branch, pushing, and creating a pull request. It also highlights the banned practice of pushing directly to main. ```bash git checkout -b fix/my-bugfix # ... make changes, commit ... git push -u origin fix/my-bugfix gh pr create --title "fix: description" --body "..." # NEVER do this: git push origin main # ← BANNED ``` -------------------------------- ### Tool Error Return Format Example Source: https://github.com/1mancompany/onemancompany/blob/main/docs/tool-template.md Example of a tool execution failure, returning a 'status' of 'error' with an actionable error message. ```json {"status": "error", "message": "Employee 99999 not found. Use list_colleagues() to find valid IDs."} ``` -------------------------------- ### Launch Script - Company-Hosted (Foreground Mode) Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/AI_CODER_GUIDE.md Demonstrates the bash command to launch a task in foreground mode using `SubprocessExecutor` and lists essential environment variables automatically injected by the platform. ```bash bash launch.sh ``` -------------------------------- ### Example Skill Update Notification Source: https://github.com/1mancompany/onemancompany/blob/main/company/human_resource/employees/00002/skills/self-improving-agent/README.md A markdown-formatted example of an automatic skill update notification, detailing a newly added pattern and its source. ```markdown ## Auto-Update (2025-01-11) ### Pattern Added **Callback Verification**: Always verify that callback functions passed as props are not empty and actually execute logic. **Source**: Episode ep-2025-01-11-003 (3 occurrences) **Action**: Added to debugger checklist ``` -------------------------------- ### Example Learning Episode Source: https://github.com/1mancompany/onemancompany/blob/main/company/human_resource/employees/00002/skills/self-improving-agent/README.md An example of a learning episode detailing a skill, the situation, root cause, identified pattern, and resulting updates. ```yaml Skill: debugger Situation: Form submission doesn't refresh data Root Cause: Empty callback function Pattern: Always verify callbacks have implementations Confidence: 0.95 → Updates: debugger, prd-implementation-precheck ``` -------------------------------- ### System Prompt Layering Example Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/AI_CODER_GUIDE.md Illustrates the priority order for different prompt components, showing where the talent persona defined by system_prompt_template fits in. ```text Priority 10: Identity — "You are Xiao Ming, Manager in Product Dept" (system-generated) Priority 12: Talent Persona — <- system_prompt_template goes here Priority 30: Skills — Full content of skills/*.md Priority 35: Tools — Authorized tool list Priority 50: Work Principles — Personal work principles after CEO 1-on-1 Priority 70: Context — Current time, team status ``` -------------------------------- ### System Prompt Template - Bad Example (Identity Repetition) Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/AI_CODER_GUIDE.md An example of a bad system prompt that repeats the AI's identity unnecessarily. ```text You are a senior engineer named Alice in the Engineering Department. ``` -------------------------------- ### Ontology Storage Example (JSONL) Source: https://github.com/1mancompany/onemancompany/blob/main/company/human_resource/employees/00002/skills/ontology/SKILL.md Illustrates how to store ontology data using JSON Lines format, including create and relate operations. ```jsonl {"op":"create","entity":{"id":"p_001","type":"Person","properties":{"name":"Alice"}}} {"op":"create","entity":{"id":"proj_001","type":"Project","properties":{"name":"Website Redesign","status":"active"}}} {"op":"relate","from":"proj_001","rel":"has_owner","to":"p_001"} ``` -------------------------------- ### Example: Complex Task Execution with Agent Loop Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/README.md Demonstrates executing a complex task using the agent loop mode. The task is defined in 'task.txt' and the execution is limited to 20 iterations. ```bash echo "Refactor this project's test framework to achieve 80% coverage" > task.txt OPENROUTER_API_KEY=sk-or-v1-xxx ./launch.sh 20 ``` -------------------------------- ### Launch Script - Company-Hosted Environment Variables Source: https://github.com/1mancompany/onemancompany/blob/main/src/onemancompany/talent_market/AI_CODER_GUIDE.md Lists environment variables automatically injected by the platform for company-hosted foreground mode execution, including employee, task, and project details. ```text Variable | Description |----------|-------------| | `OMC_EMPLOYEE_ID` | Employee ID | | `OMC_TASK_ID` | Task ID | | `OMC_PROJECT_ID` | Project ID | | `OMC_PROJECT_DIR` | Project working directory | | `OMC_TASK_DESCRIPTION_FILE` | Path to temp file containing the task prompt | | `OMC_SERVER_URL` | Backend URL | | `OMC_MAX_ITERATIONS` | Max agent iteration count (default 20) ```