[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-79465":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":8,"language":10,"languages":8,"totalLinesOfCode":8,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":8,"rankLanguage":8,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":15,"starSnapshotCount":15,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},79465,"agentrail","oxnw\u002Fagentrail","oxnw",null,"https:\u002F\u002Fagentrail.app","TypeScript",425,38,5,1,0,308,51.77,"Other",false,"main",[],"2026-06-12 04:01:24","# AgentRail\n\n[![CI](https:\u002F\u002Fgithub.com\u002Foxnw\u002Fagentrail\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Foxnw\u002Fagentrail\u002Factions\u002Fworkflows\u002Fci.yml)\n[![npm downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002F%40agentrail-core\u002Fcli.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@agentrail-core\u002Fcli)\n[![License: Source-Available](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Source--Available-blue.svg)](.\u002FLICENSE)\n[![Node.js](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%E2%89%A524-brightgreen)](https:\u002F\u002Fnodejs.org\u002F)\n\nAgentRail is a local-first control plane for coding agents. It gives agents one\ncompact API for the project loop: issue intake, routing, assigned work, PR\nsubmission, CI, review feedback, and shipping.\n\nThe source-available repo is a self-managed single-instance runtime. It is\nbuilt for local evaluation and self-hosting. The planned AgentRail Cloud\nproduct is the managed team\u002Ffleet layer for hosted connectors, shared run\nhistory, routing, wakes, SSO\u002FRBAC, audit, dashboards, and reliability.\n\n## What Agents Get\n\n- Assigned tasks with compact state and `availableActions`.\n- Routing from GitHub or Linear issues to the right local agent.\n- Retry-safe mutations through idempotency keys.\n- CI and review summaries shaped for action instead of raw log replay.\n- Real-time task events over SSE and webhooks.\n- Local provider setup for GitHub, CircleCI, and Linear.\n\n## Quickstart\n\nPrerequisites:\n\n- Node.js 24 or newer.\n- `npm`.\n- Optional provider credentials if you want live GitHub, CircleCI, or Linear\n  integration.\n\nInstall the CLI:\n\n```bash\nnpm install -g @agentrail-core\u002Fcli\n```\n\nInitialize AgentRail:\n\n```bash\nagentrail init\n```\n\nYou can also run the first command without a global install:\n\n```bash\nnpx @agentrail-core\u002Fcli init\n```\n\nThe interactive setup writes local config under `~\u002F.agentrail`, creates the\nlocal operator bootstrap, and can create your first local agent. It does not ask\nyou to hand-write API keys or edit a seed task store.\n\nStart the local API:\n\n```bash\nagentrail server start\n```\n\nIn another terminal, verify setup:\n\n```bash\nagentrail doctor --agent-id agt_example\n```\n\n`doctor` is the success gate. It checks the local API, agent credentials,\nprofile\u002Frouting state, and whether the selected agent can see assigned work.\n\n## Telemetry\n\nAgentRail sends anonymous product telemetry by default to improve setup,\nprovider reliability, and agent lifecycle behavior. Telemetry goes to PostHog\nEU Cloud and uses an anonymous install ID.\n\nTelemetry does not send source code, issue text, PR diffs, prompts, terminal\nlogs, environment variables, secrets, tokens, or raw provider payloads.\n\n```bash\nagentrail telemetry status\nagentrail telemetry off\nagentrail telemetry on\n```\n\n## Connect Providers\n\nProvider connections are optional and can be added after `init`.\n\n```bash\nagentrail provider connect github\nagentrail provider connect circleci\n\n# AgentRail will ask for the full CircleCI project slug, for example:\n# circleci\u002F\u003Corg-id>\u002F\u003Cproject-id>\nagentrail provider connect linear\n```\n\nInteractive provider setup asks for secrets in hidden prompts and writes them to\nlocal env files. Non-interactive automation can still use environment variables\nsuch as `GITHUB_TOKEN`, `CIRCLECI_TOKEN`, `LINEAR_API_KEY`, and webhook secrets.\n`provider connect` finishes by running provider readiness, applying safe local\nsetup fixes, and reporting any remaining account or repo settings AgentRail\ncannot change for you. `provider test \u003Cprovider>` uses the same readiness check\nas `provider doctor \u003Cprovider>`; it is not just a token check.\nGitHub setup also asks whether AgentRail should wait for code review before\nshipping PRs. The default follows GitHub's own review signals, but you can\nchoose to always require an approval for AgentRail-created PRs or to skip\napproval waits once CI is green.\nCircleCI setup verifies project access, creates `.circleci\u002Fconfig.yml` when a\nstarter config is safe, and configures how AgentRail will obtain pipelines for\nAgentRail branches. If automatic CircleCI branch builds are not available,\nAgentRail uses the CircleCI pipeline-run API when the token can access a\npipeline definition.\n\nImport a Linear issue into AgentRail after connecting Linear:\n\n```bash\nagentrail linear import ENG-123\n```\n\nImported provider issues go through the routing engine. If routing is not\nconfigured, AgentRail fails closed instead of silently creating unassigned work.\n\n## Work With Agents\n\nCreate or update local agent profiles:\n\n```bash\nagentrail agent create\nagentrail agent update --agent-id agt_example\n```\n\nUse a built-in role template, or install your own YAML-backed role template:\n\n```bash\nagentrail agent create --role-template frontend-ui\nagentrail agent create --role-template-file .\u002Fagent-roles\u002Fpayments-backend.yaml\n```\n\nCustom templates are validated and copied into\n`~\u002F.agentrail\u002Fagent-role-templates\u002F`, so later agents can reuse them with\n`--role-template \u003Cid>`.\n\nDuring `agentrail init` and `agentrail repo add`, AgentRail also creates an\neditable repo map under `~\u002F.agentrail\u002Frepo-maps\u002F\u003Crepo>.yaml`. Role templates use\nrepo-agnostic areas such as `frontend_source`, `tests`, and `ci_configuration`;\nthe repo map translates those areas to the actual folders in your project.\nThe starter map is generated deterministically. During interactive setup you can\nalso let a local Codex, Claude Code, or Cursor runner propose a richer map;\nAgentRail validates the proposal, shows you the summary and warnings, and falls\nback to the starter map if the local runner is unavailable or uncertain.\n\nWhen a managed agent starts work, AgentRail combines the selected role template\nwith the repo map for that repository and passes a compact role brief to the\nrunner. The brief points the agent at relevant repo areas and validation\nexpectations, while AgentRail still owns lifecycle actions such as PR creation,\nCI watching, review handling, and shipping. If a repo map is missing or\nincomplete, AgentRail still runs the agent and includes a warning in the run\ncontext. Run `agentrail doctor` to check repo-map coverage.\n\nInspect local config and connected repos:\n\n```bash\nagentrail config show\nagentrail repo list\nagentrail provider list\nagentrail provider status\nagentrail provider doctor\n```\n\nRepair a task source if older imported data needs to be corrected:\n\n```bash\nagentrail task source repair --task-id tsk_... --file source-patch.json\n```\n\n## Docker\n\nFor a server-only smoke run:\n\n```bash\ndocker compose up --build\n```\n\nThe API listens on `http:\u002F\u002F127.0.0.1:3000` by default. CLI-assisted onboarding\nis still the recommended path for a useful local setup because it creates local\nagent, routing, and provider state.\n\n## Documentation\n\n- [Developer guide](.\u002Fdocs\u002Fdeveloper.md): local development, architecture, API\n  contracts, SDK examples, and manual HTTP flows.\n- [SDK guide](.\u002Fdocs\u002Fsdk.md): how to use the TypeScript and Python clients\n  against a local or hosted AgentRail API.\n- [Five-minute quick start](.\u002Fdocs\u002Fquick-start.md): expanded onboarding notes\n  and manual reference commands.\n- [Integration guide for Claude Code, Codex, and Cursor](.\u002Fdocs\u002Fintegration-guide.md).\n- [Agent recipes](.\u002Fdocs\u002Fagent-recipes.md).\n- [Cloud boundary](.\u002Fdocs\u002Fcloud.md).\n- [Task lifecycle OpenAPI](.\u002Fdocs\u002Fapi\u002Ftask-lifecycle.openapi.yaml).\n- [Intake routing OpenAPI](.\u002Fdocs\u002Fapi\u002Fintake-routing-admin.openapi.yaml).\n- [Intake routing architecture](.\u002Fdocs\u002Farchitecture\u002Fintake-routing-engine.md).\n\n## Development\n\nCommon repo commands:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Foxnw\u002Fagentrail.git\ncd agentrail\nnpm install\nnpm link\nnpm run typecheck\nnpm test\nnpm run lint:openapi\n```\n\nThe package exposes the `agentrail` binary:\n\n```bash\nagentrail --help\n```\n\n## License\n\nAgentRail is source-available software, not open source. See [LICENSE](.\u002FLICENSE).\n","AgentRail 是一个面向本地的编码代理控制平台，旨在简化项目流程中的任务分配、路由、工作执行、代码审查及发布等环节。它提供了一个紧凑的API，支持从GitHub或Linear问题到本地代理的智能路由，并通过幂等性键确保变更操作的安全重试。此外，AgentRail还集成了CI\u002FCD流程摘要和实时任务事件通知功能，适用于需要高效管理和自动化软件开发周期的团队。该工具特别适合那些希望在本地环境中评估或自托管解决方案的开发者使用，同时也为未来的云端版本规划了更多高级特性如SSO\u002FRBAC、审计日志等。",2,"2026-06-11 03:58:03","CREATED_QUERY"]