Transform Claude Code into a fully autonomous agent system with persistent memory, scheduled operations, computer use, and task queuing. Replaces standalone age
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-autonomous-agent-harness-db737f3d91d1 ,按照其中的说明把「autonomous-agent-harness」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Combine Claude Code's session tools with separately configured scheduling, memory, and computer-use integrations. This is a setup pattern, not a bundled always-on runtime.
Autonomous operation must be explicitly requested and scoped by the user. Do not create schedules, dispatch remote agents, write persistent memory, use computer control, post externally, modify third-party resources, or act on private communications unless the user has approved that capability and the target workspace for the current setup.
Prefer dry-run plans and local queue files before enabling recurring or event-driven actions. Keep credentials, private workspace exports, personal datasets, and account-specific automations out of reusable ECC artifacts.
┌──────────────────────────────────────────────────────────────┐
│ Claude Code Runtime │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────────┐ │
│ │ Crons │ │ Dispatch │ │ Memory │ │ Computer │ │
│ │ Schedule │ │ Remote │ │ Store │ │ Use │ │
│ │ Tasks │ │ Agents │ │ │ │ │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └──────┬──────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ ECC Skill + Agent Layer │ │
│ │ │ │
│ │ skills/ agents/ commands/ hooks/ │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ MCP Server Layer │ │
│ │ │ │
│ │ memory github exa supabase browser-use │ │
│ └──────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
Use Claude Code's built-in memory system enhanced with MCP memory server for structured data.
Built-in memory (~/.claude/projects/*/memory/):
MCP memory server (structured knowledge graph):
Memory patterns:
# Short-term: current session context
Use TodoWrite for in-session task tracking
# Medium-term: project memory files
Write to ~/.claude/projects/*/memory/ for cross-session recall
# Long-term: MCP knowledge graph
Use mcp__memory__create_entities for permanent structured data
Use mcp__memory__create_relations for relationship mapping
Use mcp__memory__add_observations for new facts about known entities
Use Claude Code's native scheduled tasks for recurring prompts within an interactive session. These tasks are session-scoped; an external scheduler is required for work that must run independently of an open session. No scheduling MCP server is required for /loop.
Setting up a cron:
# In an interactive Claude Code session
/loop 30m Review open PRs in this repository and summarize CI failures.
For a one-shot run from a shell, set the working directory before invoking the CLI:
cd "/path/to/repo" && claude -p "Review open PRs and summarize"
Use an OS scheduler or CI schedule to invoke that command repeatedly when no interactive session is running. Configure the runner's authentication and tool permissions separately.
Useful cron patterns:
| Pattern | Schedule | Use Case |
|---|---|---|
| Daily standup | 0 9 * * 1-5 | Review PRs, issues, deploy status |
| Weekly review | 0 10 * * 1 | Code quality metrics, test coverage |
| Hourly monitor | 0 * * * * | Production health, error rate checks |
| Nightly build | 0 2 * * * | Run full test suite, security scan |
| Pre-meeting | */30 * * * * | Prepare context for upcoming meetings |
Have an authenticated CI job or webhook receiver invoke Claude Code in a workspace it owns. The supported entrypoint is programmatic CLI mode, not a public Anthropic dispatch endpoint.
Dispatch patterns:
# Run inside the CI workspace
cd "/path/to/repo" && claude -p "Build failed on main. Diagnose the failure."
# Trigger from webhook
# GitHub webhook -> authenticated CI runner -> claude -p -> reviewable result
# Trigger from another agent
claude -p "Analyze the output of the security scan and create issues for findings"
Computer control needs a separately configured integration. Anthropic's computer-use tool and reference environment require an application to execute tool calls in an isolated desktop environment. Adding an MCP package name does not supply that environment.
Capabilities:
Use cases within the harness:
Manage a persistent queue of tasks that survive session boundaries.
Implementation:
# Task persistence via memory
Write task queue to ~/.claude/projects/*/memory/task-queue.md
# Task format
---
name: task-queue
type: project
description: Persistent task queue for autonomous operation
---
## Active Tasks
- [ ] PR #123: Review and approve if CI green
- [ ] Monitor deploy: check /health every 30 min for 2 hours
- [ ] Research: Find 5 leads in AI tooling space
## Completed
- [x] Daily standup: reviewed 3 PRs, 2 issues
| Hermes Component | ECC Equivalent | How |
|---|---|---|
| Gateway/Router | CLI + external scheduler | An authenticated runner starts agent sessions |
| Memory System | Claude memory + MCP memory server | Built-in persistence + knowledge graph |
| Tool Registry | MCP servers | Dynamically loaded tool providers |
| Orchestration | ECC skills + agents | Skill definitions direct agent behavior |
| Computer Use | Separately configured integration | Browser or desktop control in an isolated environment |
| Context Manager | Session management + memory | ECC 2.0 session lifecycle |
| Task Queue | Memory-persisted task list | TodoWrite + memory files |
Memory MCP is optional. The MCP reference memory server is published as @modelcontextprotocol/server-memory; version 2026.8.31 was verified on the public npm registry on 2026-09-07. It is a reference implementation, not an ECC-bundled service.
After reviewing that package and approving its use, merge this entry into the user-scoped MCP configuration in ~/.claude.json, preserving existing settings. Replace MEMORY_FILE_PATH with an absolute path in a private directory you own. See Claude Code MCP configuration for CLI registration and Windows cmd /c npx configuration.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory@2026.8.31"],
"env": {
"MEMORY_FILE_PATH": "/absolute/path/to/private/memory.jsonl"
}
}
}
}
Do not register guessed or unpublished npm packages: npx -y would execute whatever is later published under that name. Verify the exact package, publisher, and version before adding another server. Scheduling and computer use do not require the three unpublished package names previously listed here.
For polling during an interactive session, enter:
/loop 30m Review open PRs in this repository and summarize CI failures.
For daily or weekly work that must survive a closed session, configure an external scheduler, such as an OS cron job or GitHub Actions, to run the one-shot command from Step 2 of Core Components. Calling claude -p to request a schedule does not provision an always-on scheduler. Choose the schedule, workspace, and allowed actions explicitly before enabling it.
# Bootstrap your identity and context
claude -p "Create memory entities for: me (user profile), my projects, my key contacts. Add observations about current priorities."
Follow the computer-use reference environment linked above, or the documentation for a specific browser integration you have reviewed. Grant only the required permissions and verify a harmless action in the isolated environment before adding it to scheduled workflows.
Cron: every 30 min during work hours
1. Check for new PRs on watched repos
2. For each new PR:
- Pull branch locally
- Run tests
- Review changes with code-reviewer agent
- Post review comments via GitHub MCP
3. Update memory with review status
Cron: daily at 6 AM
1. Check saved search queries in memory
2. Run Exa searches for each query
3. Summarize new findings
4. Compare against yesterday's results
5. Write digest to memory
6. Flag high-priority items for morning review
Trigger: 30 min before each calendar event
1. Read calendar event details
2. Search memory for context on attendees
3. Pull recent email/Slack threads with attendees
4. Prepare talking points and agenda suggestions
5. Write prep doc to memory