[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75780":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":13,"lastSyncTime":27,"discoverSource":28},75780,"locoagent","LocoreMind\u002Flocoagent","LocoreMind","AI-powered social media agent with real browser automation",null,"TypeScript",1007,48,2,0,34,904,3,80.07,"MIT License",false,"main",true,[],"2026-06-12 04:01:18","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fbanner.svg\" alt=\"LocoAgent\" width=\"800\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FQesPS8xPaDA\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdemo-YouTube-red\" alt=\"Demo\">\u003C\u002Fa>\n  \u003Ca href=\"#installation\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fruntime-Bun-f472b6\" alt=\"Bun\">\u003C\u002Fa>\n  \u003Ca href=\"#installation\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-TypeScript-3178c6\" alt=\"TypeScript\">\u003C\u002Fa>\n  \u003Ca href=\"#model-providers\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLLM-multi--provider-00b4aa\" alt=\"Multi-Provider\">\u003C\u002Fa>\n  \u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green\" alt=\"License\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n---\n\n## What is LocoAgent?\n\nLocoAgent is an AI-powered social media agent that autonomously operates social media accounts through real browser automation. It combines an LLM-driven agentic loop with [`agent-browser`](https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fagent-browser) CLI to perceive, decide, and act on live web pages — performing tasks like liking posts, writing replies, following users, and publishing content.\n\n**Key differentiators:**\n\n- **Real browser, real sessions** — Operates through Chrome CDP with your actual login cookies, not API hacks\n- **Platform skill system** — Injects full platform operation playbooks (32+ operations for X.com) so the agent completes composite tasks in one pass\n- **Workflow engine** — Pure browser-automation pipelines that run without LLM involvement, controlled by the agent as a supervisor\n- **Operation log** — Persistent deduplication across sessions prevents repeated actions\n- **Multi-provider LLM** — Works with any OpenAI-compatible API (OpenRouter, DeepSeek, Ollama, etc.)\n\n---\n\n## Installation\n\n### Prerequisites\n\n| Requirement | Version | Notes |\n|-------------|---------|-------|\n| [Bun](https:\u002F\u002Fbun.sh) | Latest | Runtime and package manager |\n| Node.js | >= 18 | Required by some dependencies |\n| [agent-browser](https:\u002F\u002Fgithub.com\u002Fvercel-labs\u002Fagent-browser) | Latest | Browser automation CLI |\n| Git | Any | For context features |\n\n### Setup\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FLocoreMind\u002Flocoagent.git\ncd locoagent\nbun install\n```\n\n### Configuration\n\nCreate a `.env` file in the project root (auto-loaded at startup):\n\n```env\n# LLM Provider (pick one)\n\n# Option A: OpenRouter (access 200+ models)\nCLAUDE_CODE_USE_OPENAI=1        # Enable OpenAI-compatible provider\nOPENAI_API_KEY=sk-or-v1-...\nOPENAI_BASE_URL=https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1\nOPENAI_MODEL=anthropic\u002Fclaude-sonnet-4.5\n\n# Option B: DeepSeek (with thinking mode support)\nCLAUDE_CODE_USE_OPENAI=1\nOPENAI_API_KEY=sk-...\nOPENAI_BASE_URL=https:\u002F\u002Fapi.deepseek.com\nOPENAI_MODEL=deepseek-v4-flash\n\n# Option C: Anthropic direct (omit CLAUDE_CODE_USE_OPENAI)\nANTHROPIC_API_KEY=sk-ant-...\n\n# Agent behavior\nSKIP_PERMISSIONS=1               # Required for non-interactive\u002Fautomated mode\n```\n\n### Run\n\n```bash\n# Interactive mode\nbun start\n\n# Single query (headless)\nbun start -p \"open X.com and like the first post about AI agents\"\n\n# With specific model\nbun start --model anthropic\u002Fclaude-sonnet-4.5\n```\n\n---\n\n## Model Providers\n\nLocoAgent supports any OpenAI-compatible API through a built-in translation shim. The rest of the system is provider-agnostic.\n\n| Provider | Base URL | Notes |\n|----------|----------|-------|\n| OpenRouter | `https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1` | Access 200+ models |\n| DeepSeek | `https:\u002F\u002Fapi.deepseek.com` | Thinking mode (`reasoning_content`) fully supported |\n| OpenAI | `https:\u002F\u002Fapi.openai.com\u002Fv1` | GPT-4o, o1, etc. |\n| Ollama | `http:\u002F\u002Flocalhost:11434\u002Fv1` | Local models |\n| LM Studio | `http:\u002F\u002Flocalhost:1234\u002Fv1` | Local models |\n| Anthropic | (native SDK) | Set `ANTHROPIC_API_KEY` only |\n| AWS Bedrock | (native SDK) | AWS credentials |\n| Google Vertex AI | (native SDK) | GCP credentials |\n\n---\n\n## Browser Automation\n\nLocoAgent uses `agent-browser` CLI to control a real Chrome browser via CDP (Chrome DevTools Protocol).\n\n### Why Chrome CDP?\n\nSocial media platforms detect and block headless browsers and API-based automation. LocoAgent operates through a copy of your real Chrome profile — same cookies, same login sessions, same fingerprint.\n\n### Setup\n\n```bash\n# One-time: copy Chrome profile + launch with CDP\nbun run setup-chrome\n\n# agent-browser connects to the running Chrome\nagent-browser connect 9222\n```\n\n### How the Agent Uses It\n\n```bash\nagent-browser open https:\u002F\u002Fx.com\u002Fhome        # Navigate\nagent-browser snapshot -i                      # Perceive: get interactive elements with @ref IDs\nagent-browser click @e5                        # Act: click a like button\nagent-browser fill @e3 \"Great research!\"       # Act: type in a reply box\nagent-browser screenshot result.png            # Verify: capture result\n```\n\nThe full `agent-browser` CLI reference is embedded in the agent's system prompt, so it knows every command natively.\n\n---\n\n## Platform Skills\n\nSkills are operation playbooks loaded on demand via slash commands. Each skill injects a complete manual into the agent's context, enabling composite task execution in one pass.\n\n### Available Skills\n\n| Platform | Command | Operations | Description |\n|----------|---------|------------|-------------|\n| X.com | `\u002Fx-com` | 32+ | Browse, engage, post, social graph, profile, navigation, lists |\n\n### Usage\n\n```bash\n# Interactive: load skill then give task\n> \u002Fx-com open home timeline, like first 3 posts about AI, reply to the best one\n\n# Headless\nbun start -p \"\u002Fx-com like 5 posts about 'large language models', then follow the authors\"\n```\n\n### Adding a New Platform\n\n```bash\nmkdir -p skills\u002Flinkedin\n```\n\nCreate `skills\u002Flinkedin\u002FSKILL.md`:\n\n```markdown\n---\ndescription: \"LinkedIn platform operations playbook\"\nallowed-tools:\n  - Bash\nuser-invocable: true\n---\n\n# LinkedIn Operations\n\n## 1. Navigation\n...\n```\n\nThe skill auto-discovers at startup and becomes available as `\u002Flinkedin`.\n\n---\n\n## Workflow Engine\n\nWorkflows are **deterministic browser-automation pipelines** that run without any LLM involvement. The agent acts as a supervisor — it can inspect status, start\u002Fstop workflows, but the execution is pure scripted automation.\n\n### Built-in Workflows\n\n| Workflow | ID | Schedule | Description |\n|----------|----|----------|-------------|\n| HuggingFace Papers Fetcher | `hf-daily-papers` | Daily | Fetch paper list, abstracts, and thumbnails from HuggingFace |\n| HuggingFace → X.com | `hf-papers-to-x` | Daily | Full pipeline: fetch HF papers → download thumbnails → post as tweets |\n| X.com Search & Reply | `x-search-reply` | Daemon | Search X.com → read posts → generate AI reply → post reply |\n| LinkedIn Search & Comment | `linkedin-search-reply` | Daemon | Search LinkedIn → read posts → generate AI comment → post comment |\n\n### CLI\n\n```bash\nbun run workflow list                          # List all workflows + status\nbun run workflow run --id hf-papers-to-x       # Run once (blocking)\nbun run workflow start --id hf-papers-to-x     # Run once (background)\nbun run workflow daemon --id x-search-reply --interval 3   # Run every 3 min\nbun run workflow stop --id x-search-reply      # Stop at next checkpoint\nbun run workflow status                        # Show status of all workflows\nbun run workflow history --id hf-papers-to-x   # Show execution history\n```\n\n### Creating a Custom Workflow\n\nWorkflows are code-driven pipelines that can include browser automation, LLM API calls, or any scripted logic. You can create your own in two files:\n\n**Step 1.** Create the definition — `workflows\u002F\u003Cid>.json`:\n\n```json\n{\n  \"id\": \"my-workflow\",\n  \"name\": \"My Custom Workflow\",\n  \"description\": \"What this workflow does\",\n  \"schedule\": \"daily\",\n  \"executor\": \"executors\u002Fmy-workflow.ts\",\n  \"config\": {\n    \"searchQuery\": \"ai agent\",\n    \"maxPosts\": 5,\n    \"cdpPort\": 9222\n  }\n}\n```\n\n**Step 2.** Create the executor — `workflows\u002Fexecutors\u002Fmy-workflow.ts`:\n\n```typescript\n#!\u002Fusr\u002Fbin\u002Fenv bun\nimport { execSync } from 'node:child_process'\n\n\u002F\u002F Parse config from workflow engine\nconst configArg = process.argv.find((_, i, a) => a[i - 1] === '--config')\nconst config = JSON.parse(configArg!)\n\n\u002F\u002F agent-browser helper\nfunction ab(cmd: string): string {\n  return execSync(`agent-browser --cdp ${config.cdpPort} ${cmd}`, {\n    encoding: 'utf-8', timeout: 30000,\n  }).trim()\n}\n\n\u002F\u002F Logs go to stderr (visible during execution)\nconsole.error('[my-workflow] Step 1: ...')\n\u002F\u002F ... your automation logic using ab() ...\n\n\u002F\u002F Final JSON summary goes to stdout (last line, required)\nconsole.log(JSON.stringify({ stepsCompleted: 1, stepsTotal: 1 }))\n```\n\n**Step 3.** Test:\n\n```bash\nbun run workflow run --id my-workflow\n```\n\nThe executor contract: accept `--config \u003Cjson>`, log to `stderr`, output a JSON summary with `stepsCompleted` and `stepsTotal` as the last line on `stdout`.\n\nFor the full development guide covering deduplication, checkpoint protocol, LLM integration, and daemon mode, see [docs\u002Fworkflow-development-guide.md](docs\u002Fworkflow-development-guide.md).\n\n---\n\n## Operation Log\n\nPersistent memory across sessions. The agent checks the log before acting and records every action after — preventing duplicate likes, follows, and replies.\n\n```bash\n# Check before acting (exit 0 = already done, exit 1 = not done)\nbun run scripts\u002Flog-operation.ts check \\\n  --platform x --action like --url \"https:\u002F\u002Fx.com\u002F...\u002Fstatus\u002F123\"\n\n# Record after acting\nbun run scripts\u002Flog-operation.ts add \\\n  --platform x --action like --url \"https:\u002F\u002Fx.com\u002F...\u002Fstatus\u002F123\" \\\n  --status success --note \"AI agents research post\"\n\n# View recent operations\nbun run scripts\u002Flog-operation.ts recent --limit 20\n\n# 30-day summary (auto-injected into system prompt at startup)\nbun run scripts\u002Flog-operation.ts summary --days 30\n```\n\nState stored in `persona\u002Foperation-log.json` (human-readable JSON).\n\n---\n\n## Task Scheduling\n\nStructured daily\u002Fweekly task execution replaces ad-hoc prompts.\n\n### Define Tasks\n\nEdit `persona\u002Ftasks.md`:\n\n```markdown\n## Daily Tasks\n1. Engage with relevant content (like posts matching topic queries)\n2. Monitor own project mentions\n3. Leave 1 technical comment on the most relevant post\n\n## Weekly Tasks (Monday)\n4. Follow 3-5 relevant researchers\n5. Post 1 original tweet about recent research findings\n\n## Session Constraints\n| Action   | Max per session |\n|----------|----------------|\n| Likes    | 10             |\n| Comments | 2              |\n| Follows  | 5              |\n| Posts    | 1              |\n```\n\n### Run\n\n```bash\nbun run run-tasks              # Execute today's tasks\nbun run run-tasks:dry          # Preview the prompt without running\nbun run run-tasks -- --platform x   # Restrict to one platform\n```\n\n---\n\n## Realtime Trajectory Monitor\n\n`--print` mode is a black box. The trajectory monitor watches the session log and prints live execution status.\n\n```bash\n# Terminal 1: start the monitor\nbun run tail\n\n# Terminal 2: run the agent\nbun start -p \"\u002Fx-com open timeline, like first post\"\n```\n\nOutput:\n\n```\n═══ New Task ═══\n\u002Fx-com open timeline, like first post\n\n[6:30:47 PM] ⚡ Bash: agent-browser connect 9222\n[6:30:47 PM] ✓ Result: Done\n[6:31:10 PM] ⚡ Bash: agent-browser open https:\u002F\u002Fx.com\u002Fhome\n[6:31:27 PM] ⚡ Bash: agent-browser snapshot -i -c -s 'article'\n[6:31:44 PM] ● Agent: Found first post, like button ref=e136\n[6:31:44 PM] ⚡ Bash: agent-browser click e136\n[6:31:45 PM] ✓ Result: Done\n```\n\n```bash\nbun run tail:history           # Replay latest session from beginning\nbun run tail:list              # List recent sessions\nbun run tail \u003Cid>              # Watch specific session\n```\n\n---\n\n## Project Structure\n\n```\nlocoagent\u002F\n├── src\u002F\n│   ├── entrypoints\u002F         # CLI entry point\n│   ├── services\u002Fapi\u002F        # LLM provider layer (multi-provider shim)\n│   ├── tools\u002F               # 43 tool implementations\n│   ├── skills\u002F              # Bundled skills (20)\n│   ├── commands\u002F            # Slash commands (90+)\n│   ├── components\u002F          # Terminal UI components (130+)\n│   ├── screens\u002F             # REPL screen\n│   ├── hooks\u002F               # React hooks (80+)\n│   ├── services\u002Fmcp\u002F        # MCP server management\n│   ├── query.ts             # Agentic loop engine\n│   └── constants\u002Fprompts.ts # System prompt assembly\n├── scripts\u002F\n│   ├── setup-chrome.sh      # Chrome CDP setup\n│   ├── log-operation.ts     # Operation log CLI\n│   ├── run-tasks.ts         # Task scheduler\n│   ├── tail-agent.ts        # Trajectory monitor\n│   └── workflow-engine.ts   # Workflow lifecycle manager\n├── workflows\u002F\n│   ├── *.json               # Workflow definitions\n│   ├── executors\u002F           # Workflow executor scripts\n│   └── state.json           # Workflow state persistence\n├── persona\u002F\n│   ├── tasks.md             # Task schedule definitions\n│   └── operation-log.json   # Action history for dedup\n├── docs\u002F                       # Public documentation (tracked in git)\n├── internal-docs\u002F              # Internal documentation (gitignored)\n├── .env                     # Local config (auto-loaded)\n└── package.json\n```\n\n---\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|-----------|\n| Runtime | Bun |\n| Language | TypeScript (TSX) |\n| UI | React + Ink (terminal rendering, custom fork) |\n| CLI | Commander.js |\n| Browser automation | agent-browser + Chrome CDP |\n| LLM integration | Multi-provider (Anthropic SDK + OpenAI-compatible shim) |\n| Extension protocol | MCP (Model Context Protocol) |\n\n---\n\n## Contributing\n\nContributions welcome. Key areas:\n\n- **New platform skills** — Add playbooks for LinkedIn, Reddit, etc.\n- **New workflows** — Automated pipelines for content creation\u002Fdistribution ([development guide](docs\u002Fworkflow-development-guide.md))\n- **New tools** — Extend agent capabilities\n- **Bug fixes** — Especially in browser automation edge cases\n\n---\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","LocoAgent 是一个基于 AI 的社交媒体代理，通过真实浏览器自动化来自主操作社交媒体账号。其核心功能包括利用 LLM（大语言模型）驱动的代理循环与 `agent-browser` CLI 结合，实现对网页内容的理解、决策及互动，如点赞、回复、关注用户和发布内容等。技术特点上，它使用真实的 Chrome CDP 会话而非 API 操作，支持多平台技能系统，具有工作流引擎以控制纯浏览器自动化流程，并且能够跨会话持久化去重操作记录。此外，该项目兼容多种 OpenAI 兼容 API。LocoAgent 适用于需要在社交媒体平台上执行复杂任务或自动化日常互动的场景。","2026-06-11 03:53:19","CREATED_QUERY"]