[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80513":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":15,"stars7d":15,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":16,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},80513,"agentic-harness","codejunkie99\u002Fagentic-harness","codejunkie99","Rust-native agent runtime, SDK, and CLI for software agents",null,"Rust",79,12,77,0,1,3,45.94,"Apache License 2.0",false,"main",true,[],"2026-06-12 04:01:28","\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fbanner.svg\" alt=\"agentic-harness\" width=\"100%\">\n\u003C\u002Fdiv>\n\n\u003Cbr>\n\n\u003Cdiv align=\"center\">\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fcodejunkie99\u002Fagentic-harness?style=flat-square&color=e05d00)](LICENSE)\n[![Rust 2021](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frust-2021_edition-e05d00?style=flat-square&logo=rust&logoColor=white)](https:\u002F\u002Fwww.rust-lang.org)\n[![v0.1.1](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-v0.1.1-e05d00?style=flat-square&logo=github)](https:\u002F\u002Fgithub.com\u002Fcodejunkie99\u002Fagentic-harness\u002Freleases)\n[![docs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-docs%2F-8b949e?style=flat-square&logo=readthedocs&logoColor=white)](docs\u002F)\n\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  Build agents that read a repo, plan, edit files, run tests, and report back —\u003Cbr>\n  then ship the \u003Cem>same binary\u003C\u002Fem> to your laptop, CI, a remote Linux sandbox, or the edge.\u003Cbr>\n  \u003Csub>Native Rust end to end. No JavaScript anywhere.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n\u003Cbr>\n\n---\n\n## Architecture\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Farchitecture.svg\"\n    alt=\"Three-layer architecture: Your Rust Code → Harness (SDK · CLI · HTTP · Sessions) → Execution Targets\"\n    width=\"100%\">\n\u003C\u002Fdiv>\n\n> Full docs live in [`docs\u002F`](docs\u002F). Architecture, execution targets, runtime config,\n> HTTP SessionEnv protocol, Cloudflare runtime, deployment guides, feature status, and\n> release notes — all there.\n\n---\n\n## Install\n\n\u003Cdetails open>\n\u003Csummary>\u003Cb>Tarball &nbsp;·&nbsp; recommended\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```bash\ncurl -L -o agentic-harness-v0.1.1.tar.gz \\\n  https:\u002F\u002Fgithub.com\u002Fcodejunkie99\u002Fagentic-harness\u002Farchive\u002Frefs\u002Ftags\u002Fv0.1.1.tar.gz\ntar -xzf agentic-harness-v0.1.1.tar.gz\ncd agentic-harness-0.1.1\n.\u002Fscripts\u002Finstall.sh\nexport PATH=\"$HOME\u002F.agentic-harness\u002Fbin:$PATH\"\nagentic-harness --version\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Source checkout\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fcodejunkie99\u002Fagentic-harness.git\ncd agentic-harness\n.\u002Fscripts\u002Finstall.sh\nexport PATH=\"$HOME\u002F.agentic-harness\u002Fbin:$PATH\"\nagentic-harness --version\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Homebrew\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```bash\nHOMEBREW_DEVELOPER=1 brew install --formula --build-from-source \\\n  .\u002FFormula\u002Fagentic-harness.rb\nagentic-harness --version\n```\n\n> Use `--HEAD` only when you explicitly want the latest `main` instead of the tagged release.\n\n\u003C\u002Fdetails>\n\nSet `AGENTIC_HARNESS_PREFIX` to install somewhere other than `$HOME\u002F.agentic-harness`.\n\n---\n\n## Quick Start\n\n| Goal | Command |\n|------|---------|\n| **Use the harness on a repo** | `agentic-harness guide`, then `agentic-harness code --workspace . --llm auto` |\n| **Create a new agent project** | `agentic-harness new .\u002Fmy-agent --template coding` |\n| **Serve an existing agent** | `agentic-harness setup hosting --workspace .`, then `agentic-harness host --workspace .` |\n| **Build for deployment** | `agentic-harness build --target native\\|node\\|cloudflare` |\n| **Embed the SDK** | `use agentic_harness::prelude::*;` |\n\n---\n\n## Core Concepts\n\n| Abstraction | Description |\n|-------------|-------------|\n| **`AgentApp`** | Root registry — wire handlers, load workspace context, spawn the runtime |\n| **`Session`** | Persistent conversation with a model, scoped to an agent invocation + ID |\n| **`Task`** | One-shot child session with fresh history; shares the workspace |\n| **`Role`** | Per-call system-prompt overlay, loaded from `.agentic-harness\u002Froles\u002F` |\n| **`Skill`** | Auto-discovered behavior descriptor in workspace Markdown |\n| **`SessionEnv`** | Execution environment: local, `HttpSessionEnv` (remote sandbox), or Workers |\n| **`ModelClient`** | Provider-neutral trait — swap backends without touching handlers |\n| **`Connector`** | Recipe for wiring a third-party sandbox, MCP server, or model gateway |\n\nAgent identity is the URL path: `POST \u002Fagents\u002F\u003Cname>\u002F\u003Cid>` — reuse `\u003Cid>` to continue a\nsession, use a new one to start fresh.\n\n---\n\n## Coding Agent Loop\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fflow.svg\"\n    alt=\"Coding agent loop: Inspect → Brief → LLM + Tools → Edit + Test → Commit · PR (with iterate arrow)\"\n    width=\"100%\">\n\u003C\u002Fdiv>\n\n```bash\nagentic-harness code --workspace . --llm auto \\\n  --prompt \"Add a flag to skip the network call in test mode\" \\\n  --deny-path .env \\\n  --approve-dependencies \\\n  --commit \"feat: --offline flag\" \\\n  --pr\n```\n\nEach run writes `.agentic-harness\u002Fruns\u002F\u003Cid>\u002F` — `coding-brief.md`, `summary.md`,\n`run.json`, `events.jsonl`, `diff.patch`, `checks.json`, `agent-instructions.md`.\n\n---\n\n## Examples\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Quickstart — minimal webhook agent\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```rust\nuse agentic_harness::prelude::*;\nuse serde::Deserialize;\nuse serde_json::json;\n\n#[derive(Deserialize)]\nstruct HelloPayload { name: Option\u003CString> }\n\nfn app() -> Result\u003CAgentApp, AgenticHarnessError> {\n    Ok(AgentApp::new()\n        .with_workspace(\".\")\n        .load_workspace_context()?\n        .agent(AgentDefinition::webhook(\"hello\", |ctx: AgentContext| {\n            let payload: HelloPayload = ctx.payload()?;\n            let name = payload.name.unwrap_or_else(|| \"World\".to_string());\n            Ok(json!({ \"id\": ctx.id(), \"message\": format!(\"Hello, {name}!\") }))\n        })))\n}\n\nfn main() {\n    std::process::exit(app().and_then(run_cli).unwrap_or(1));\n}\n```\n\n```bash\nagentic-harness new .\u002Fmy-agent --template hello\nagentic-harness run hello --workspace .\u002Fmy-agent --id demo --payload '{\"name\":\"Ada\"}'\n```\n\nUse `--template coding`, `code-review`, `test-fixer`, `docs-writer`, `repo-analyst`,\nor another built-in template when you want a fuller software-agent starter.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>CI snapshot repair — bless safe snapshot diffs automatically\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```rust\nfn app() -> Result\u003CAgentApp, AgenticHarnessError> {\n    Ok(AgentApp::new()\n        .with_workspace(\".\")\n        .load_workspace_context()?\n        .agent(AgentDefinition::cli(\"snapshot-repair\", |ctx: AgentContext| {\n            let Payload { failing } = ctx.payload()?;\n            let session = ctx.session_with_id(ctx.id());\n\n            let report = session.prompt_with_options(\n                format!(\n                    \"Review these failing snapshots and bless only the safe ones:\\n\\n{}\",\n                    failing.join(\"\\n\"),\n                ),\n                PromptOptions::new().role(\"snapshot-reviewer\"),\n            )?;\n\n            Ok(json!({ \"report\": report.text() }))\n        })))\n}\n```\n\n```bash\nSNAPS=$(find . -name '*.snap.new' | jq -Rsc 'split(\"\\n\") | map(select(length>0))')\nagentic-harness run snapshot-repair --workspace . --id \"ci-$RUN\" \\\n  --payload \"{\\\"failing\\\":$SNAPS}\"\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Parallel tasks — codebase cartographer\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\nFan out one `session.task()` per top-level module, merge the results into `ARCHITECTURE.md`:\n\n```rust\nlet mut sections = Vec::new();\nfor entry in session.readdir(&src)?.into_iter().filter(|e| e.is_dir) {\n    let child = session.task_with_id(\n        format!(\"module-{}\", entry.name),\n        format!(\n            \"Summarize the public surface of {src}\u002F{name}. \\\n             List entry points and cross-module imports.\",\n            src = src, name = entry.name,\n        ),\n        TaskOptions::new().role(\"module-summarizer\"),\n    )?;\n    sections.push(format!(\"## {}\\n\\n{}\\n\", entry.name, child.text()));\n}\nsession.write(\"ARCHITECTURE.md\", &sections.join(\"\\n\"))?;\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Remote sandbox — Linux reproducer over HttpSessionEnv\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\nThe agent stays a native Rust binary on your laptop; shell and file operations\nrun on the other side of an HTTP boundary.\n\n```rust\nuse agentic_harness::HttpSessionEnv;\n\nlet sandbox = HttpSessionEnv::new(std::env::var(\"SANDBOX_URL\")?, \"\u002Fworkspace\")\n    .header(\"Authorization\", format!(\"Bearer {}\", std::env::var(\"SANDBOX_TOKEN\")?));\n\nlet session = ctx.session_with_id_and_env(\"repro\", sandbox);\nsession.shell(\"git clone {repo} \u002Fworkspace\u002Frepo && git -C \u002Fworkspace\u002Frepo checkout {branch}\")?;\nlet probe = session.shell(\"cd \u002Fworkspace\u002Frepo && cargo test --no-fail-fast 2>&1 | tail -200\")?;\nsession.write(\"\u002Fworkspace\u002Frepro-report.md\",\n    &format!(\"## exit: {}\\n\\n```\\n{}\\n```\\n\", probe.status, probe.stdout))?;\n```\n\n```bash\nagentic-harness setup sandbox --target e2b --endpoint $SANDBOX_URL\nagentic-harness sandbox exec \"uname -a && rustc --version\" --json\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>MCP tools — Sentry integration\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```rust\nuse agentic_harness::McpServerOptions;\n\nlet sentry = ctx.connect_mcp(\n    \"sentry\",\n    McpServerOptions::new(\"https:\u002F\u002Fmcp.sentry.io\u002Fmcp\")\n        .header(\"Authorization\", format!(\"Bearer {}\", std::env::var(\"SENTRY_TOKEN\")?)),\n)?;\n\nlet session = ctx.session_with_id(ctx.id()).with_tools(sentry);\nlet plan = session.prompt(\n    \"Find the highest-volume new error in the last 24h, locate the commit that \\\n     introduced it, and draft a hot-fix plan with rollback steps.\",\n)?;\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Schema-guided output — typed \u003Ccode>cargo audit\u003C\u002Fcode> results\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```rust\n#[derive(Deserialize)]\nstruct CrateAudit {\n    advisories: Vec\u003CAdvisory>,\n    risk: Risk,\n    next_action: String,\n}\n\nlet audit: CrateAudit = session.prompt_json_with_options(\n    \"Run `cargo audit`, group by severity, pick the smallest safe upgrade plan.\",\n    PromptOptions::new().result_schema(json!({\n        \"type\": \"object\",\n        \"required\": [\"advisories\", \"risk\", \"next_action\"],\n        \"properties\": {\n            \"advisories\": { \"type\": \"array\", \"items\": { \"type\": \"object\",\n                \"properties\": { \"id\": {\"type\":\"string\"}, \"package\": {\"type\":\"string\"},\n                  \"severity\": {\"enum\":[\"low\",\"medium\",\"high\",\"critical\"]} } } },\n            \"risk\": { \"enum\": [\"none\",\"low\",\"medium\",\"high\",\"critical\"] },\n            \"next_action\": { \"type\": \"string\" }\n        }\n    })),\n)?;\n```\n\nBuilt-in `---RESULT_START---` \u002F `---RESULT_END---` extraction means the model can\nreturn reasoning prose alongside the typed payload — no manual JSON wrangling.\n\n\u003C\u002Fdetails>\n\n---\n\n## Sessions, Tasks & Roles\n\n```bash\n# Start a session\ncurl http:\u002F\u002Flocalhost:3583\u002Fagents\u002Fhello\u002Fsession-abc \\\n  -H \"Content-Type: application\u002Fjson\" -d '{\"name\":\"Ada\"}'\n\n# Continue the same session (same id)\ncurl http:\u002F\u002Flocalhost:3583\u002Fagents\u002Fhello\u002Fsession-abc \\\n  -H \"Content-Type: application\u002Fjson\" -d '{\"name\":\"Ada\"}'\n\n# New session (new id)\ncurl http:\u002F\u002Flocalhost:3583\u002Fagents\u002Fhello\u002Fsession-xyz \\\n  -H \"Content-Type: application\u002Fjson\" -d '{\"name\":\"Ada\"}'\n```\n\n**Tasks** run a focused one-shot child agent with fresh history, sharing the workspace:\n\n```rust\nlet research = session.task(\n    \"Research the auth flow and summarize the key files.\",\n    TaskOptions::new().role(\"researcher\"),\n)?;\nlet plan = session.prompt(format!(\n    \"Use this research to draft the implementation plan:\\n\\n{}\", research.text()\n))?;\n```\n\n**Roles** live in `.agentic-harness\u002Froles\u002F`, **Skills** in `.agents\u002Fskills\u002F` — both\nauto-discovered. Precedence: *call role > session role > agent role*, applied as\ncall-scoped system-prompt overlays that never pollute persisted message history.\n\n**Automatic compaction** keeps long-running sessions inside a context budget:\n\n```rust\nlet response = session.prompt_with_options(\n    \"Continue from the current plan.\",\n    PromptOptions::new().compaction(\n        CompactionSettings::new()\n            .context_window_tokens(128_000)\n            .reserve_tokens(16_384)\n            .keep_recent_messages(12),\n    ),\n)?;\n```\n\n---\n\n## CLI Reference\n\n| Command | Description |\n|---------|-------------|\n| `agentic-harness guide` | Interactive TUI — guided front door |\n| `agentic-harness code` | Run the coding-agent loop on a workspace |\n| `agentic-harness new \u003Cpath>` | Scaffold a new agent project from a template |\n| `agentic-harness dev` | Watch-mode dev server with auto-reload |\n| `agentic-harness run \u003Cname>` | One-shot CLI invocation of any agent |\n| `agentic-harness serve` | Start the HTTP server (production mode) |\n| `agentic-harness host` | Long-running local server from `hosting.toml` |\n| `agentic-harness build` | Build for `--target native`, `node`, or `cloudflare` |\n| `agentic-harness doctor` | Workspace readiness check |\n| `agentic-harness dashboard` | Status, templates, recent runs, next steps |\n| `agentic-harness inspect` | Read latest coding-run summary |\n| `agentic-harness sandbox` | Manage remote Linux sandboxes |\n| `agentic-harness add` | Add a connector recipe |\n| `agentic-harness smoke` | Post-install end-to-end check |\n| `agentic-harness package` | Stage release packages with manifest and checksums |\n\n**Connectors** are recipes you pipe to your coding agent — it writes the small Rust\nadapter for you:\n\n```bash\nagentic-harness add                      # list available connectors\nagentic-harness add daytona | claude     # pipe to your coding agent\nagentic-harness add e2b     | codex\nagentic-harness add https:\u002F\u002Fe2b.dev\u002Fdocs --category sandbox | claude\n```\n\n---\n\n## Why Rust\n\n- **One toolchain** — `cargo` builds, tests, ships, and runs everything. No bundler,\n  transpile step, or language runtime to install on the target.\n- **One artifact** — self-contained native executable plus `manifest.json`.\n- **Typed end-to-end** — handler boundaries have compile-time checking;\n  `ModelClient` is a trait, so providers swap without touching handlers.\n- **Easy to test** — file\u002Fsearch\u002Fedit\u002Fshell helpers are ordinary Rust methods.\n  The suite covers SDK behavior, CLI behavior, generated build artifacts,\n  env-file loading, session persistence, and HTTP route behavior.\n\n---\n\n## Workspace\n\n| Crate | Contents |\n|-------|----------|\n| [`crates\u002Fagentic-harness`](crates\u002Fagentic-harness) | SDK — agent registry, context, sessions, roles, skills, tools, HTTP serving |\n| [`crates\u002Fagentic-harness-cli`](crates\u002Fagentic-harness-cli) | CLI — `wizard`, `code`, `new`, `template`, `setup`, `doctor`, `build`, `dev`, `run`, `serve`, `manifest`, `add` |\n| [`examples\u002Fhello-world`](examples\u002Fhello-world) | Native Rust example agent workspace |\n\n---\n\n## Documentation\n\n| Doc | Description |\n|-----|-------------|\n| [docs\u002FREADME.md](docs\u002FREADME.md) | Documentation index — start here |\n| [execution-targets.md](docs\u002Fexecution-targets.md) | Local \u002F CI \u002F sandbox \u002F Cloudflare target details |\n| [runtime-config.md](docs\u002Fruntime-config.md) | Provider defaults and model registration |\n| [http-session-env.md](docs\u002Fhttp-session-env.md) | HttpSessionEnv wire format for remote sandboxes |\n| [cloudflare-runtime.md](docs\u002Fcloudflare-runtime.md) | Worker boundary, Durable Objects, adapter ABI |\n| [deploy-node.md](docs\u002Fdeploy-node.md) | Node hosting around the native binary |\n| [connectors.md](docs\u002Fconnectors.md) | Sandbox connector helpers |\n| [virtual-sandbox.md](docs\u002Fvirtual-sandbox.md) | Hostless in-memory filesystem and shell subset |\n| [feature-status.md](docs\u002Ffeature-status.md) | What's shipped, with code\u002Ftest\u002Fdoc evidence |\n| [immediate-goals.md](docs\u002Fimmediate-goals.md) | Roadmap and non-goals |\n| [release-smoke-test.md](docs\u002Frelease-smoke-test.md) | Pre-publish checklist |\n\n---\n\n## Development\n\n```bash\ncargo fmt --all --check\ncargo test --workspace\ncargo clippy --workspace -- -D warnings\n```\n\n---\n\n## License\n\n[LICENSE](LICENSE)\n","agentic-harness 是一个用 Rust 构建的软件代理运行时、SDK 和命令行工具。它支持构建能够读取代码仓库、规划任务、编辑文件、运行测试并反馈结果的代理程序，并且可以将相同的二进制文件部署到本地、CI\u002FCD 系统、远程 Linux 沙箱或边缘设备上。该项目采用纯 Rust 实现，不依赖任何 JavaScript 代码，提供了 SDK、CLI 以及 HTTP 会话环境协议等多种交互方式。适用于需要在不同环境中统一执行自动化任务的场景，如持续集成流水线、云端函数服务或边缘计算节点等。",2,"2026-06-11 04:01:04","CREATED_QUERY"]