@locoremind/locoagent
ALocoAgent is an AI-powered social-media agent that autonomously operates real accounts through genuine browser automation.
Install
agr install @locoremind/locoagent --target claudeThis artifact does not publish files for Claude.
Document
{ "name": "locoagent", "version": "1.1.0", "description": "LocoAgent - AI-powered social media agent by LocoreMind", "type": "module", "bin": { "claude-clean": "./src/entrypoints/cli.tsx" }, "scripts": { "start": "bun run --preload ./stubs/globals.ts ./src/entrypoints/cli.tsx", "setup-chrome": "bun run scripts/setup-chrome.ts", "setup-chrome:win": "bun run scripts/setup-chrome.ts", "doctor": "bun run scripts/doctor.ts", "run-tasks": "bun run scripts/run-tasks.ts", "run-tasks:dry": "bun run scripts/run-tasks.ts --dry-run", "tail": "bun run scripts/tail-agent.ts", "tail:history": "bun run scripts/tail-agent.ts --from-start", "tail:list": "bun run scripts/tail-agent.ts --list", "workflow": "bun run scripts/workflow-engine.ts", "workflow:list": "bun run scripts/workflow-engine.ts list", "workflow:status": "bun run scripts/workflow-engine.ts status", "workflow:summary": "bun run scripts/workflow-engine.ts summary", "workflow:run": "bun run scripts/workflow-engine.ts run", "workflow:daemon": "bun run scripts/workflow-engine.ts daemon", "typecheck": "tsc --noEmit", "test": "bun test scripts" }, "dependencies": { "@alcalzone/ansi-tokenize": "^0.1.0", "@ant/claude-for-chrome-mcp": "file:./stubs/@ant/claude-for-chrome-mcp", "@ant/computer-use-mcp": "file:./stubs/@ant/computer-use-mcp", "@ant/computer-use-swift": "file:./stubs/@ant/computer-use-swift", "@ant/computer-use-input": "file:./stubs/@ant/computer-use-input", "@anthropic-ai/claude-agent-sdk": "file:./stubs/@anthropic-ai/claude-agent-sdk", "@anthropic-ai/mcpb": "file:./stubs/@anthropic-ai/mcpb", "@anthropic-ai/sandbox-runtime": "file:./stubs/@anthropic-ai/sandbox-runtime", "@anthropic-ai/sdk": "^0.39.0", "@aws-sdk/client-bedrock-runtime": "^3.700.0", "commander": "~13.1.0", "@commander-js/extra-typings": "^13.0.0", "@growthbook/growthbook": "^1.3.0", "@modelcontextprotocol/sdk": "^1.12.0", "@opentelemetry/api": "^1.9.0", "@opentelemetry/api-logs": "^0.200.0", "@opentelemetry/core": "^2.0.0", "@opentelemetry/resources": "^2.0.0", "@opentelemetry/sdk-logs": "^0.200.0", "@opentelemetry/sdk-metrics": "^2.0.0", "@opentelemetry/sdk-trace-base": "^2.0.0", "@opentelemetry/semantic-conventions": "^1.30.0", "ajv": "^8.17.0", "asciichart": "^1.5.0", "auto-bind": "^5.0.0", "axios": "^1.7.0", "bidi-js": "^1.0.0", "chalk": "^5.4.0", "chokidar": "^4.0.0", "cli-boxes": "^3.0.0", "code-excerpt": "^4.0.0", "diff": "^7.0.0", "emoji-regex": "^10.4.0", "env-paths": "^3.0.0", "execa": "^9.5.0", "figures": "^6.1.0", "fuse.js": "^7.0.0", "get-east-asian-width": "^1.3.0", "google-auth-library": "^9.15.0", "highlight.js": "^11.11.0", "https-proxy-agent": "^7.0.0", "ignore": "^7.0.0", "indent-string": "^5.0.0", "ink": "^5.1.0", "jsonc-parser": "^3.3.0", "lodash-es": "^4.17.0", "lru-cache": "^11.0.0", "marked": "^15.0.0", "p-map": "^7.0.0", "picomatch": "^4.0.0", "proper-lockfile": "^4.1.0", "qrcode": "^1.5.0", "react": "^19.0.0", "react-reconciler": "^0.33.0", "semver": "^7.7.0", "shell-quote": "^1.8.0", "signal-exit": "^4.1.0", "stack-utils": "^2.0.0", "strip-ansi": "^7.1.0", "supports-hyperlinks": "^3.1.0", "tree-kill": "^1.2.0", "type-fest": "^4.32.0", "undici": "^7.4.0", "usehooks-ts": "^3.1.0", "vscode-jsonrpc": "^8.2.0", "vscode-languageserver-protocol": "^3.17.0", "vscode-languageserver-types": "^3.17.0", "wrap-ansi": "^9.0.0", "ws": "^8.18.0", "xss": "^1.0.0", "zod": "^3.25.0" }, "devDependencies": { "@types/bun": "latest", "@types/react": "^19.0.0", "@types/lodash-es": "^4.17.0", "@types/semver": "^7.5.0", "@types/ws": "^8.5.0", "@types/diff": "^7.0.0", "@types/shell-quote": "^1.7.0", "@types/proper-lockfile": "^4.1.0", "@types/qrcode": "^1.5.0", "typescript": "^5.7.0" }, "overrides": { "@ant/claude-for-chrome-mcp": "file:./stubs/@ant/claude-for-chrome-mcp", "@ant/computer-use-mcp": "file:./stubs/@ant/computer-use-mcp", "@ant/computer-use-swift": "file:./stubs/@ant/computer-use-swift", "@ant/computer-use-input": "file:./stubs/@ant/computer-use-input", "@anthropic-ai/mcpb": "file:./stubs/@anthropic-ai/mcpb", "@anthropic-ai/sandbox-runtime": "file:./stubs/@anthropic-ai/sandbox-runtime", "@anthropic-ai/claude-agent-sdk": "file:./stubs/@anthropic-ai/claude-agent-sdk", } }
Repository README
Describes LocoreMind/locoagent as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.
๐ Table of Contents
- โจ What is LocoAgent?
- ๐๏ธ How It Works
- ๐ Installation
- โ๏ธ Configuration
- ๐ง Model Providers
- ๐ Browser Automation
- ๐ฏ Platform Skills
- ๐ Multi-Platform Targets
- ๐ Workflow Engine
- ๐ Operation Log
- ๐๏ธ Task Scheduling
- ๐ก Trajectory Monitor
- ๐ฉบ Doctor โ Health Check
- ๐ Project Structure
- ๐งฉ Tech Stack
- ๐ค Contributing
- ๐ License
โจ What is LocoAgent?
LocoAgent is an AI-powered social-media agent that autonomously operates real accounts through genuine browser automation. It pairs an LLM-driven agentic loop with the agent-browser CLI to perceive โ decide โ act on live web pages โ liking posts, writing replies, following users, and publishing content the way a human would.
Under the hood it is a fork of the Claude Code CLI source tree, re-purposed for social automation: the battle-tested agent loop, ~40 tools, ~90 slash commands, and Ink/React terminal UI are reused, with a thin LocoAgent-specific layer (skills, workflows, persona, operation log) layered on top.
๐ Why LocoAgent?
| Feature | Description | |
|---|---|---|
| ๐ฅ๏ธ | Real browser, real sessions | Drives Chrome via CDP with your actual login cookies โ no fragile API hacks, no headless fingerprint |
| ๐ฏ | Platform skill system | Loads complete operation playbooks (37 operations for X.com) so the agent finishes composite tasks in a single pass |
| ๐ | Workflow engine | Deterministic, LLM-free browser pipelines that the agent supervises โ start, stop, schedule as a daemon |
| ๐ | Operation log | Persistent cross-session deduplication so the agent never repeats a like, follow, or reply |
| ๐ง | Multi-provider LLM | Any OpenAI-compatible API โ OpenRouter, DeepSeek (thinking mode), OpenAI, Ollama, LM Studio, plus native Anthropic / Bedrock / Vertex |
| ๐ | Multi-platform, concurrently | Drive X, LinkedIn, and Reddit at the same time โ one isolated Chrome per platform, same-platform serial, cross-platform parallel |
| ๐ฅ๏ธ | Cross-OS | One codebase runs on Windows, macOS, and Linux via a host/device abstraction layer |
๐๏ธ How It Works
flowchart LR
User([๐ค User / Task]) --> Loop
subgraph Agent["๐ค LocoAgent Core"]
Loop["Agentic Loop<br/>(query.ts)"]
Prompt["System Prompt<br/>(prompts.ts)"]
Loop <--> Prompt
end
Loop <-->|"Anthropic / OpenAI shim"| LLM["๐ง LLM Provider"]
Loop --> Tools["๐ ๏ธ Tools ยท Bash"]
Tools --> AB["๐ agent-browser CLI"]
AB --> CDP["Chrome CDP :9222"]
CDP --> Web[("๐ Live Web Page")]
Skills["๐ฏ Platform Skills"] -. inject playbook .-> Prompt
Persona["๐ชช persona/"] -. persona + tasks .-> Prompt
OpLog[("๐ Operation Log")] -. dedup .-> Prompt
WF["๐ Workflow Engine"] --> AB
The agent perceives a page with agent-browser snapshot, the LLM decides the next action, a tool acts (click, fill, open), and the result is verified before the loop continues โ checking the operation log first so nothing gets done twice.
๐ Installation
โ Prerequisites
| Requirement | Version | Notes |
|---|---|---|
| ๐ฅ Bun | Latest | Runtime and package manager (Node is not enough) |
| ๐ฉ Node.js | โฅ 18 | Required by some dependencies |
| ๐ agent-browser | Latest | Browser-automation CLI |
| ๐ต Google Chrome | Latest | Driven over CDP |
| ๐ฟ Git | Any | Powers context features |
โก One-click install (recommended)
One command installs Bun + agent-browser, clones the repo, scaffolds .env, and runs the health check. When run in a terminal it asks you to pick a provider (DeepSeek / Anthropic / OpenAI), enter your API key, then pick a model (Enter takes the latest; c lets you type any model name). The base URL is fixed per provider โ no need to type it.
macOS / Linux / WSL2
curl -fsSL https://raw.githubusercontent.com/LocoreMind/locoagent/main/install.sh | bash
Windows (PowerShell)
irm https://raw.githubusercontent.com/LocoreMind/locoagent/main/install.ps1 | iex
Installs into the current directory (an empty folder is used as-is; otherwise a ./locoagent subfolder is created; override with LOCO_DIR). The installer prints the exact target and lets you confirm it. Re-running from inside the checkout updates it in place. Afterwards: bun run setup-chrome && bun start. Chrome and Git are detected (not auto-installed) โ install them if the script warns.
๐ฅ Manual setup
git clone https://github.com/LocoreMind/locoagent.git
cd locoagent
bun install
# Verify your environment before first run
bun run doctor
โถ๏ธ Run
# Interactive REPL
bun start
# Single query (headless / print mode)
bun start -p "open X.com and like the first post about AI agents"
# With a specific model
bun start --model anthropic/claude-sonnet-4.5
[!TIP]
bun run doctorchecks Bun, agent-browser, Chrome, and your.envin one shot. Add--check-cdpto probe the CDP port too.
โ๏ธ Configuration
Create a .env file in the project root โ it is auto-loaded at startup (via the preloaded stubs/globals.ts). Configure your provider through the four neutral LLM_* variables; they are translated to the right internal settings at startup, so you never juggle provider-specific variable names:
# โโ LLM Provider โ pick ONE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
LLM_PROVIDER=deepseek # deepseek | openai | anthropic | custom
LLM_API_KEY=sk-...
LLM_MODEL=deepseek-chat # blank = provider default
LLM_BASE_URL= # only for `custom` / self-hosted OpenAI-compatible APIs
# Examples:
# OpenAI โ LLM_PROVIDER=openai LLM_MODEL=gpt-5.5
# Anthropic โ LLM_PROVIDER=anthropic LLM_MODEL=claude-sonnet-4-6
# Custom โ LLM_PROVIDER=custom LLM_BASE_URL=http://localhost:1234/v1 LLM_MODEL=...
# โโ Agent behavior โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SKIP_PERMISSIONS=1 # required for non-interactive / automated runs
[!TIP] The
LLM_*block is the recommended front door. Under the hood it maps to the legacyCLAUDE_CODE_USE_OPENAI/OPENAI_*/ANTHROPIC_*variables, which still work directly for existing setups โ an explicitly-set legacy value always wins. DeepSeek, OpenAI, OpenRouter, and every OpenAI-compatible endpoint share the sameOPENAI_*namespace internally; the provider is decided by the base URL + model, not by the variable name.
[!NOTE]
SKIP_PERMISSIONS=1makesstubs/globals.tsinject--dangerously-skip-permissionsinto argv so automated/headless runs don't stop on permission prompts.
๐ง Model Providers
LocoAgent talks to any OpenAI-compatible API through a built-in translation shim (src/services/api/openaiShim.ts), keeping the rest of the system provider-agnostic.
| Provider | Base URL | Notes |
|---|---|---|
| ๐ OpenRouter | https://openrouter.ai/api/v1 | Access 200+ models with one key |
| ๐ณ DeepSeek | https://api.deepseek.com | Thinking mode (reasoning_content) fully supported |
| ๐ข OpenAI | https://api.openai.com/v1 | GPT-4o, o-series, etc. |
| ๐ฆ Ollama | http://localhost:11434/v1 | Local models |
| ๐ป LM Studio | http://localhost:1234/v1 | Local models |
| ๐ ฐ๏ธ Anthropic | (native SDK) | Set ANTHROPIC_API_KEY only |
| โ๏ธ AWS Bedrock | (native SDK) | AWS credentials |
| ๐ฅ๏ธ Google Vertex AI | (native SDK) | GCP credentials |
Pick any of these with LLM_PROVIDER + LLM_BASE_URL (e.g. LLM_PROVIDER=custom, LLM_BASE_URL=https://openrouter.ai/api/v1). The neutral front door maps to the shim automatically; advanced users can still set CLAUDE_CODE_USE_OPENAI=1 and the OPENAI_* vars directly.
Behind a TLS-intercepting proxy (corporate VPN / campus FortiGate / Zscaler)
If a request fails with unable to get local issuer certificate or untrusted root, your network is re-signing TLS with its own CA. Export that gateway's root certificate to a .pem file and point NODE_EXTRA_CA_CERTS at it in .env โ LocoAgent then trusts it on every provider path, including the DeepSeek/OpenAI shim. If the provider host is outright blocked on that network, switch networks (e.g. a phone hotspot) or pick a provider that is allowed.
๐ Browser Automation
LocoAgent controls a real Chrome browser over CDP (Chrome DevTools Protocol) using agent-browser.
๐ Why Chrome CDP?
Social platforms detect and block headless browsers and API automation. LocoAgent runs through a real, full Chrome โ same engine, same fingerprint โ so it behaves like you actually do. It uses a dedicated, isolated, persistent profile (separate from your everyday Chrome): you log into your accounts once and the session sticks, while your normal browsing is never disturbed.
๐ ๏ธ Setup
# One-time: launch the isolated Chrome with CDP (same command on Windows / macOS / Linux).
# It never kills your normal Chrome and never wipes your session.
bun run setup-chrome
# First run only: log into X / your socials in the window that opens โ it persists.
# Re-running just reconnects. To wipe the isolated profile and log in fresh:
bun run setup-chrome --reset
# Multi-platform: launch one target, or every target at once (one Chrome each).
bun run setup-chrome --target linkedin
bun run setup-chrome --all
๐ The Perceive โ Act โ Verify Loop
agent-browser open https://x.com/home # ๐งญ Navigate
agent-browser snapshot -i # ๐ Perceive โ interactive elements with @ref IDs
agent-browser click @e5 # ๐ Act โ click a like button
agent-browser fill @e3 "Great research!" # โจ๏ธ Act โ type into a reply box
agent-browser screenshot result.png # โ
Verify โ capture the result
The full agent-browser CLI reference is embedded in the agent's system prompt, so it knows every command natively โ skills and workflows reference operations by name rather than re-explaining them.
๐ฏ Platform Skills
Skills are operation playbooks loaded on demand via slash commands. Loading one injects a complete manual into the agent's context, enabling composite task execution in a single pass.
๐ Available Skills
| Platform | Command | Operations | Coverage |
|---|---|---|---|
| ๐ฆ X.com (Twitter) | /x-com | 37 | Browse ยท Engagement ยท Content creation ยท Social graph ยท Profile ยท Navigation ยท Lists |
๐ฌ Usage
# Interactive โ load the skill, then give a task
> /x-com open home timeline, like first 3 posts about AI, reply to the best one
# Headless
bun start -p "/x-com like 5 posts about 'large language models', then follow the authors"
โ Adding a New Platform
Create skills/<platform>/SKILL.md with YAML frontmatter:
---
description: "LinkedIn platform operations playbook"
allowed-tools:
- Bash
user-invocable: true
---
# LinkedIn Operations
## 1. Navigation
...
## 2. Engagement
...
The skill auto-discovers at startup and becomes available as /linkedin. Design each operation as a self-contained section with preconditions, agent-browser commands, a verification step, and known pitfalls (see skills/x-com/SKILL.md for the established format).
๐ Multi-Platform Targets
Run several social platforms at the same time โ each in its own isolated Chrome, on its own CDP port, behind its own proxy. A single registry, config/browser-targets.json, is the source of truth:
{
"targets": {
"x": { "cdpPort": 9222, "proxy": "http://127.0.0.1:6738" },
"linkedin": { "cdpPort": 9223, "proxy": null },
"reddit": { "cdpPort": 9224, "proxy": null }
}
}
setup-chrome --all/--target, the workflow engine, and doctor --check-cdp all read from it โ add a platform once and every tool picks it up.
bun run setup-chrome --all # ๐ one isolated Chrome per platform
bun run doctor --check-cdp # ๐ฉบ probe every target's CDP port
๐ Same-platform serial ยท cross-platform parallel
The engine reads each workflow's "platform" field and injects the matching target (cdpPort, profile, proxy, device) into the executor โ you never hard-code a port. A per-platform file lock then keeps same-platform runs serial (one active tab per profile) while different platforms run concurrently:
# x + x โ serialized; linkedin โ in parallel with them. Automatically.
bun run workflow orchestrate --ids hf-papers-to-x,x-search-reply,linkedin-search-reply
๐ Workflow Engine
Workflows are deterministic browser-automation pipelines that run without any LLM in the control flow (an LLM may still be called as a single step). The agent acts as a supervisor โ it can inspect status and start/stop runs, while execution stays scripted and reproducible.
๐ฆ Built-in Workflows
| Workflow | ID | Schedule | Description |
|---|---|---|---|
| ๐ฐ HuggingFace Daily Papers | hf-daily-papers | daily | Fetch top papers โ titles, abstracts, thumbnails โ and save to local data files |
| ๐ฆ HF Papers โ X.com | hf-papers-to-x | daily | Full pipeline: fetch HF papers โ download thumbnails โ post each as an image + text tweet |
| ๐ X.com Search & AI Reply | x-search-reply | hourly | Search X.com Latest โ read each post โ generate a reply via LLM โ post reply |
| ๐ผ LinkedIn Search & AI Comment | linkedin-search-reply | hourly | Search LinkedIn Latest โ read each post โ generate a comment via LLM โ post comment |
๐ฅ๏ธ CLI
bun run workflow list # ๐ List all workflows + status
bun run workflow run --id hf-papers-to-x # โถ๏ธ Run once (blocking)
bun run workflow start --id hf-papers-to-x # ๐ Run once (background)
bun run workflow daemon --id x-search-reply --interval 3 # ๐ Run every 3 minutes
bun run workflow orchestrate --ids a,b,c # ๐ Multi-platform: same serial, cross parallel
bun run workflow stop --id x-search-reply # ๐ Stop at next checkpoint
bun run workflow reset --id x-search-reply # โป๏ธ Clear stopped state โ idle
bun run workflow status # ๐ Status of all workflows
bun run workflow history --id hf-papers-to-x # ๐ Execution history
๐งฑ Creating a Custom Workflow
Step 1 โ Definition (workflows/<id>.json):
{
"id": "my-workflow",
"name": "My Custom Workflow",
"description": "What this workflow does",
"schedule": "daily",
"platform": "x",
"executor": "executors/my-workflow.ts",
"config": { "searchQuery": "ai agent", "maxPosts": 5 }
}
[!TIP] Set
"platform"(e.g.x/cdpPort. The engine injects the target'scdpPort,profile,proxy, anddevicefromconfig/browser-targets.jsonintoconfigat run time, and locks the platform for the run.
Step 2 โ Executor (workflows/executors/my-workflow.ts):
#!/usr/bin/env bun
import { execSync } from 'node:child_process'
const configArg = process.argv.find((_, i, a) => a[i - 1] === '--config')
const config = JSON.parse(configArg!)
function ab(cmd: string): string {
return execSync(`agent-browser --cdp ${config.cdpPort} ${cmd}`, {
encoding: 'utf-8', timeout: 30000,
}).trim()
}
console.error('[my-workflow] Step 1: ...') // ๐ logs โ stderr
// ... your automation logic using ab() ...
console.log(JSON.stringify({ stepsCompleted: 1, stepsTotal: 1 })) // ๐ค summary โ last line of stdout
Step 3 โ Test:
bun run workflow run --id my-workflow
[!IMPORTANT] Executor contract: accept
--config <json>, log to stderr, and emit a single JSON object ({stepsCompleted, stepsTotal}) as the last line of stdout. Missing or malformed output marks the run as failed.
๐ Full guide: docs/workflow-development-guide.md โ covers deduplication, the checkpoint/stop protocol, LLM integration, and daemon mode.
๐ Operation Log
Persistent memory across sessions. The agent checks the log before acting and records every action after โ preventing duplicate likes, follows, and replies. This dedup contract is the core of the agent's identity.
# ๐ Check before acting (exit 0 = already done โ skip; exit 1 = not done โ proceed)
bun run scripts/log-operation.ts check \
--platform x --action like --url "https://x.com/.../status/123"
# โ
Record after a successful action
bun run scripts/log-operation.ts add \
--platform x --action like --url "https://x.com/.../status/123" \
--status success --note "AI agents research post"
# ๐ View recent operations
bun run scripts/log-operation.ts recent --limit 20
# ๐ 30-day summary (auto-injected into the system prompt at startup)
bun run scripts/log-operation.ts summary --days 30
State lives in persona/operation-log.json (human-readable JSON). The 30-day summary is injected into every session's system prompt so the agent always knows its recent history.
๐๏ธ Task Scheduling
Replace ad-hoc prompts with structured daily/weekly task execution.
๐ Define Tasks โ persona/tasks.md
## Daily Tasks
1. Engage with relevant content (like posts matching topic queries)
2. Monitor own project mentions
3. Leave 1 technical comment on the most relevant post
## Weekly Tasks (Monday)
4. Follow 3-5 relevant researchers
5. Post 1 original tweet about recent research findings
## Session Constraints
| Action | Max per session |
|----------|:---------------:|
| Likes | 10 |
| Comments | 2 |
| Follows | 5 |
| Posts | 1 |
โถ๏ธ Run
bun run run-tasks # Execute today's tasks
bun run run-tasks:dry # Preview the generated prompt without running
bun run run-tasks -- --platform x # Restrict to one platform
[!NOTE]
persona/is gitignored and absent from a fresh clone. The agent runs fine without it โ just without persona, task, and operation-history context in the prompt.
๐ก Trajectory Monitor
--print mode is a black box. The trajectory monitor watches the session log and prints live execution status.
# Terminal 1 โ start the monitor
bun run tail
# Terminal 2 โ run the agent
bun start -p "/x-com open timeline, like first post"
โโโ New Task โโโ
/x-com open timeline, like first post
[6:30:47 PM] โก Bash: agent-browser connect 9222
[6:30:47 PM] โ Result: Done
[6:31:10 PM] โก Bash: agent-browser open https://x.com/home
[6:31:27 PM] โก Bash: agent-browser snapshot -i -c -s 'article'
[6:31:44 PM] โ Agent: Found first post, like button ref=e136
[6:31:44 PM] โก Bash: agent-browser click e136
[6:31:45 PM] โ Result: Done
bun run tail:history # ๐ Replay latest session from the beginning
bun run tail:list # ๐ List recent sessions
bun run tail <id> # ๐ฏ Watch a specific session
๐ฉบ Doctor โ Health Check
A cross-platform preflight check and onboarding aid. Run it before your first session or whenever something feels off.
bun run doctor # Check Bun, agent-browser, Chrome, .env
bun run doctor --check-cdp # โฆalso probe every platform target's CDP port
It detects your host OS (Windows / macOS / Linux), resolves the Chrome binary path, probes each target in config/browser-targets.json, and reports anything missing or misconfigured.
๐ Project Structure
locoagent/
โโโ src/ # โฌ๏ธ Vendored Claude Code CLI source โ treat as a dependency
โ โโโ entrypoints/cli.tsx # CLI entry point
โ โโโ services/api/ # Multi-provider LLM shim (openaiShim / codexShim)
โ โโโ services/mcp/ # MCP server management
โ โโโ tools/ # ~40 tool implementations
โ โโโ commands/ # ~90 slash commands
โ โโโ components/ ยท hooks/ # Ink/React terminal UI
โ โโโ query.ts # Agentic loop engine
โ โโโ constants/prompts.ts # ๐ The seam โ injects LocoAgent state into the prompt
โโโ scripts/ # ๐งฉ LocoAgent-specific tooling
โ โโโ setup-chrome.ts # Chrome + CDP launcher (cross-platform)
โ โโโ doctor.ts # Health check / onboarding
โ โโโ log-operation.ts # Operation-log CLI (dedup)
โ โโโ run-tasks.ts # Task scheduler
โ โโโ tail-agent.ts # Live trajectory monitor
โ โโโ workflow-engine.ts # Workflow lifecycle manager
โ โโโ lib/ # Platform layer โ host ยท device ยท config ยท target lock
โโโ config/
โ โโโ browser-targets.json # ๐ Per-platform target registry (cdpPort ยท proxy ยท profile)
โโโ skills/<platform>/SKILL.md # ๐ฏ Platform operation playbooks (โ /<platform>)
โโโ workflows/
โ โโโ <id>.json # Workflow definitions
โ โโโ executors/<id>.ts # Scripted pipelines
โ โโโ state.json # Runtime state (gitignored)
โโโ persona/ # ๐ชช Persona, tasks, operation log (gitignored)
โโโ docs/ # ๐ Public docs (workflow guide, cross-platform guide)
โโโ stubs/ # Preloaded globals + local package stubs
โโโ .env # Local config (auto-loaded)
โโโ package.json
[!TIP] The LocoAgent layer is small and lives outside
src/. The seam issrc/constants/prompts.ts, which shells out to inject persona, tasks, operation-log summary, and workflow status into every session's system prompt.
๐งฉ Tech Stack
| Component | Technology | |
|---|---|---|
| ๐ฅ | Runtime | Bun (Node not supported) |
| ๐ฆ | Language | TypeScript (TSX) |
| โ๏ธ | UI | React + Ink terminal renderer |
| โจ๏ธ | CLI | Commander.js |
| ๐ | Browser automation | agent-browser + Chrome CDP |
| ๐ง | LLM integration | Anthropic SDK + OpenAI-compatible shim |
| ๐ | Extension protocol | MCP (Model Context Protocol) |
๐ค Contributing
Contributions welcome! High-impact areas:
- ๐ฏ New platform skills โ LinkedIn, Reddit, Instagram playbooks
- ๐ New workflows โ automated content pipelines (development guide)
- ๐ ๏ธ New tools โ extend agent capabilities
- ๐ Bug fixes โ especially browser-automation edge cases
Branch โ change โ bun run typecheck โ commit (feat: / fix: / docs:) โ PR with What / Why / How / Testing. See CONTRIBUTING.md for the full guide.
[!NOTE] There is no unit-test suite. Verify with
bun run typecheckand a realbun start -p "..."run.bun test scriptsruns the platform-layer unit tests.
๐ License
MIT ยฉ LocoreMind
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- warnType matchbest-effort: server code not analyzed
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged โ not that the artifact is safe.
Versions
git-25fb579ac65d2026-08-06