Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ dist
/agentcore
/roboppi

# Local AgentCore workflow state
.agentcore-loop/
# Local Roboppi workflow state
.roboppi-loop/

# Local scratch notes (do not commit)
docs/wip/
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AGENTS.md

This repository ("Roboppi" / package name: `agentcore`) is a Bun + TypeScript (ESM)
This repository ("Roboppi" / package name: `roboppi`) is a Bun + TypeScript (ESM)
codebase that implements an execution-control runtime for agentic workers.

## Build / Lint / Test
Expand Down Expand Up @@ -57,11 +57,11 @@ bun test --watch test/unit # watch mode

### Build

Builds a native executable `./agentcore` (gitignored).
Builds a native executable `./roboppi` (gitignored).

```bash
make build # or: bun run build
make install # /usr/local/bin/agentcore
make install # /usr/local/bin/roboppi
make uninstall
```

Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.PHONY: all build test tests test-unit test-integration test-at test-branch test-all typecheck clean install uninstall dev help

BIN := roboppi
LEGACY_BIN := agentcore

# Legacy build artifacts (no longer built by default)
EXTRA_BINS := roboppi-core roboppi-workflow roboppi-daemon
Expand All @@ -20,7 +19,6 @@ all: build ## Build the binary (default)

build: ## Build a single binary (roboppi)
$(BUN) $(BUN_FLAGS) build $(BUN_BUILD_FLAGS) --compile $(SRC) --outfile $(BIN)
@ln -sf $(BIN) $(LEGACY_BIN) 2>/dev/null || cp $(BIN) $(LEGACY_BIN)

test: ## Run all tests
$(BUN) $(BUN_FLAGS) test
Expand All @@ -46,14 +44,13 @@ typecheck: ## Run TypeScript type checker
$(BUN) $(BUN_FLAGS) x tsc --noEmit

clean: ## Remove build artifacts
rm -f $(BIN) $(LEGACY_BIN) $(EXTRA_BINS)
rm -f $(BIN) $(EXTRA_BINS)

install: build ## Install binary to /usr/local/bin
install -m 755 $(BIN) /usr/local/bin/$(BIN)
@ln -sf /usr/local/bin/$(BIN) /usr/local/bin/$(LEGACY_BIN) 2>/dev/null || cp /usr/local/bin/$(BIN) /usr/local/bin/$(LEGACY_BIN)

uninstall: ## Remove binary from /usr/local/bin
rm -f /usr/local/bin/$(BIN) /usr/local/bin/$(LEGACY_BIN) $(addprefix /usr/local/bin/,$(EXTRA_BINS))
rm -f /usr/local/bin/$(BIN) $(addprefix /usr/local/bin/,$(EXTRA_BINS))

dev: ## Run in dev mode (no build)
$(BUN) $(BUN_FLAGS) run $(SRC)
Expand Down
11 changes: 5 additions & 6 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Roboppi(ろぼっぴ)は、エージェント(worker)の実行を安全
Roboppi 自身が「エージェントとして仕事をする」ことは目的にしません。外部の worker CLI(OpenCode / Claude Code / Codex CLI / シェル)に重い作業(編集/コマンド/テスト)を委譲し、Roboppi は安全の不変条件(止める/制限する/観測する/隔離する)を強制します。

注意: 主な CLI/バイナリ名は `roboppi` です。
- 互換: `agentcore` はレガシー alias として残しています。
- 環境変数/状態ディレクトリ: `ROBOPPI_` / `.roboppi-loop/` を推奨(レガシーの `AGENTCORE_` / `.agentcore-loop/` も引き続き利用可能)。
- 環境変数/状態ディレクトリ: `ROBOPPI_` / `.roboppi-loop/` を使います。

## Roboppiでできること(Capabilities)

Expand Down Expand Up @@ -184,7 +183,7 @@ ROBOPPI_ROOT="$ROBOPPI_ROOT" bun run --cwd "$ROBOPPI_ROOT" src/workflow/run.ts \

注意:

- workflow は target workspace 内に `.roboppi-loop/` と `context/` を作ります(通常は gitignore 推奨。レガシーの `.agentcore-loop/` も引き続き利用可能)。
- workflow は target workspace 内に `.roboppi-loop/` と `context/` を作ります(通常は gitignore 推奨)。
- PR 作成は `.roboppi-loop/enable_pr` による opt-in です。

## Workflow YAML の最小例
Expand Down Expand Up @@ -264,9 +263,9 @@ git repo に対する workflow 実行向けに、base branch 解決 / Branch Loc
supervised 実行では runner/daemon が Core 子プロセスを起動し、IPC 経由で step を委譲します。

- 既定: 対話実行は stdio、非対話実行は socket transport が既定
- transport 切替: `AGENTCORE_SUPERVISED_IPC_TRANSPORT=stdio|socket|tcp`
- IPC デバッグ: `AGENTCORE_IPC_TRACE=1`
- request timeout 調整: `AGENTCORE_IPC_REQUEST_TIMEOUT=2m`(または `AGENTCORE_IPC_REQUEST_TIMEOUT_MS=120000`)
- transport 切替: `ROBOPPI_SUPERVISED_IPC_TRANSPORT=stdio|socket|tcp`
- IPC デバッグ: `ROBOPPI_IPC_TRACE=1`
- request timeout 調整: `ROBOPPI_IPC_REQUEST_TIMEOUT=2m`(または `ROBOPPI_IPC_REQUEST_TIMEOUT_MS=120000`)

supervised 実行を無効化(direct 実行):

Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Roboppi (ろぼっぴ, pronounced "roh-boh-pee") is an execution-control runtime
It does not try to be "the agent". It enforces safety invariants around external worker CLIs (OpenCode / Claude Code / Codex CLI / plain shell), so your automation stops when it should, stays within budgets, and leaves a trail you can audit.

Note: the primary CLI/binary name is `roboppi`.
- Compatibility: `agentcore` remains as a legacy alias.
- Env vars/state dirs: prefer `ROBOPPI_` / `.roboppi-loop/` (legacy `AGENTCORE_` / `.agentcore-loop/` are still accepted).
- Env vars/state dirs: use `ROBOPPI_` / `.roboppi-loop/`.

## What Roboppi Can Do (Capabilities)

Expand Down Expand Up @@ -191,7 +190,7 @@ ROBOPPI_ROOT="$ROBOPPI_ROOT" bun run --cwd "$ROBOPPI_ROOT" src/workflow/run.ts \

Notes:

- The workflow writes state/artifacts under `.roboppi-loop/` and `context/` inside the target workspace (typically gitignored; legacy `.agentcore-loop/` is still accepted).
- The workflow writes state/artifacts under `.roboppi-loop/` and `context/` inside the target workspace (typically gitignored).
- PR creation is opt-in via `.roboppi-loop/enable_pr`.

## Workflow YAML At A Glance
Expand Down Expand Up @@ -273,9 +272,9 @@ Docs:
Workflows/daemon run supervised by default. In supervised mode, the runner starts a Core child process and delegates steps over IPC.

- Default: interactive runs typically use stdio; non-interactive runs default to a socket transport.
- Override transport: `AGENTCORE_SUPERVISED_IPC_TRANSPORT=stdio|socket|tcp`
- Debug IPC: `AGENTCORE_IPC_TRACE=1`
- Tune request timeouts: `AGENTCORE_IPC_REQUEST_TIMEOUT=2m` (or `AGENTCORE_IPC_REQUEST_TIMEOUT_MS=120000`)
- Override transport: `ROBOPPI_SUPERVISED_IPC_TRANSPORT=stdio|socket|tcp`
- Debug IPC: `ROBOPPI_IPC_TRACE=1`
- Tune request timeouts: `ROBOPPI_IPC_REQUEST_TIMEOUT=2m` (or `ROBOPPI_IPC_REQUEST_TIMEOUT_MS=120000`)

Disable supervised mode:

Expand Down
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions docs/daemon-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,23 +820,23 @@ Template variables available in `evaluate` / `analyze` instructions:

```bash
# start daemon
agentcore daemon start <daemon.yaml> [--verbose]
roboppi daemon start <daemon.yaml> [--verbose]

# check daemon status (from another terminal)
agentcore daemon status [--state-dir <dir>]
roboppi daemon status [--state-dir <dir>]

# manual trigger (debug)
agentcore daemon trigger <trigger_id> [--state-dir <dir>]
roboppi daemon trigger <trigger_id> [--state-dir <dir>]

# pause/resume trigger
agentcore daemon pause <trigger_id>
agentcore daemon resume <trigger_id>
roboppi daemon pause <trigger_id>
roboppi daemon resume <trigger_id>

# show execution history
agentcore daemon history [--trigger <trigger_id>] [--limit 10]
roboppi daemon history [--trigger <trigger_id>] [--limit 10]

# stop daemon
agentcore daemon stop [--state-dir <dir>]
roboppi daemon stop [--state-dir <dir>]
```

---
Expand Down Expand Up @@ -945,7 +945,7 @@ Log tags:
- [ ] TriggerEngine (filter + debounce + cooldown)
- [ ] DaemonStateStore (file-based persistence)
- [ ] Daemon class (event loop + graceful shutdown)
- [ ] CLI: `agentcore daemon start`
- [ ] CLI: `roboppi daemon start`

### Phase 2: Expand event sources

Expand Down
8 changes: 4 additions & 4 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,19 @@ Workers provide execution environments and capabilities. AgentCore calls them th
```
Scheduler (parent)
|
+-- spawn(agentcore, args...)
+-- spawn(roboppi, args...)
+-- JSON Lines IPC over stdin/stdout
+-- periodic heartbeat/health monitoring
|
+-> AgentCore (child)
+-> Roboppi Core (child)
+-- processes externally submitted jobs
+-- issues permits and delegates to workers
+-- observes, limits, cuts off, escalates
```

The Scheduler spawns AgentCore as a child process, keeps stdin/stdout open, and uses **JSON Lines** for bidirectional communication. It monitors response latency via heartbeat and checks memory/CPU thresholds periodically.
The Scheduler spawns Roboppi Core as a child process, keeps stdin/stdout open, and uses **JSON Lines** for bidirectional communication. It monitors response latency via heartbeat and checks memory/CPU thresholds periodically.

AgentCore behaves as a runtime that processes "jobs given from outside", issues Permits, and spawns/uses workers as needed.
Roboppi Core behaves as a runtime that processes "jobs given from outside", issues Permits, and spawns/uses workers as needed.

### 3.2 Crash / hang handling (Supervisor policy)

Expand Down
20 changes: 10 additions & 10 deletions docs/guide/daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ triggers: # trigger definitions (event -> workflow)
If your workflows use `step.agent`, provide an agent catalog to the daemon:

- `agents_file`: a default catalog path for the daemon (relative paths are resolved from `workspace`)
- `AGENTCORE_AGENTS_FILE`: you can also set this via environment variables (or per-trigger via `triggers.<id>.context.env`) as a colon-separated list of YAML paths
- `ROBOPPI_AGENTS_FILE`: you can also set this via environment variables (or per-trigger via `triggers.<id>.context.env`) as a colon-separated list of YAML paths

When multiple catalogs are provided, later sources override earlier ones (so a per-trigger `context.env.AGENTCORE_AGENTS_FILE` can override the daemon-wide catalog).
When multiple catalogs are provided, later sources override earlier ones (so a per-trigger `context.env.ROBOPPI_AGENTS_FILE` can override the daemon-wide catalog).

See also: `docs/guides/agents.md`.

Expand Down Expand Up @@ -703,8 +703,8 @@ name: simple-cron
version: "1"
description: "A simple daemon that runs health checks every 30 seconds"

workspace: "/tmp/agentcore-daemon-simple"
state_dir: "/tmp/agentcore-daemon-simple/.daemon-state"
workspace: "/tmp/roboppi-daemon-simple"
state_dir: "/tmp/roboppi-daemon-simple/.daemon-state"

events:
tick:
Expand Down Expand Up @@ -734,8 +734,8 @@ Fires every 5 minutes via cron. An evaluate gate checks whether there are new co
```yaml
name: smart-reviewer
version: "1"
workspace: "/tmp/agentcore-daemon-reviewer"
state_dir: "/tmp/agentcore-daemon-reviewer/.daemon-state"
workspace: "/tmp/roboppi-daemon-reviewer"
state_dir: "/tmp/roboppi-daemon-reviewer/.daemon-state"
max_concurrent_workflows: 1

events:
Expand Down Expand Up @@ -800,8 +800,8 @@ Detect TypeScript file changes and run tests automatically.
```yaml
name: file-watcher
version: "1"
workspace: "/tmp/agentcore-daemon-watcher"
state_dir: "/tmp/agentcore-daemon-watcher/.daemon-state"
workspace: "/tmp/roboppi-daemon-watcher"
state_dir: "/tmp/roboppi-daemon-watcher/.daemon-state"

events:
src-change:
Expand Down Expand Up @@ -838,8 +838,8 @@ Use interval, cron, and command event sources together and start different workf
```yaml
name: multi-trigger
version: "1"
workspace: "/tmp/agentcore-daemon-multi"
state_dir: "/tmp/agentcore-daemon-multi/.daemon-state"
workspace: "/tmp/roboppi-daemon-multi"
state_dir: "/tmp/roboppi-daemon-multi/.daemon-state"
max_concurrent_workflows: 2

events:
Expand Down
42 changes: 21 additions & 21 deletions docs/guide/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AgentCore Quickstart
# Roboppi Quickstart

AgentCore is an execution-control runtime for AI agent systems. It provides safe execution control via Permits, failure cut-off via Circuit Breakers, and delegation of actual work to external Workers.
Roboppi is an execution-control runtime for AI agent systems. It provides safe execution control via Permits, failure cut-off via Circuit Breakers, and delegation of actual work to external Workers.

## Prerequisites

Expand All @@ -19,22 +19,22 @@ Optional (if you plan to use them as workers):
## Install

```bash
git clone <repository-url> agentcore
cd agentcore
git clone <repository-url> roboppi
cd roboppi
bun install
```

## Build

```bash
make # build a single binary -> ./roboppi (+ ./agentcore alias)
make # build a single binary -> ./roboppi
```

Sanity check:

```bash
./agentcore --version
./agentcore --help
./roboppi --version
./roboppi --help
```

Other make targets:
Expand All @@ -48,23 +48,23 @@ make install # install to /usr/local/bin

---

## Usage 1: One-shot execution with `agentcore run`
## Usage 1: One-shot execution with `roboppi run`

Use the `run` subcommand to delegate a task to a Worker using only CLI flags.

```bash
# Generate files with OpenCode
./agentcore run --worker opencode --workspace /tmp/demo "Create hello.ts"
./roboppi run --worker opencode --workspace /tmp/demo "Create hello.ts"

# Fix tests with Claude Code
./agentcore run --worker claude-code --workspace ./my-project \
./roboppi run --worker claude-code --workspace ./my-project \
--capabilities EDIT,RUN_TESTS "Fix the failing tests"

# Refactor with Codex CLI
./agentcore run --worker codex --workspace ./src "Refactor this function"
./roboppi run --worker codex --workspace ./src "Refactor this function"

# You can also set timeouts and budgets
./agentcore run --worker opencode --workspace /tmp/demo \
./roboppi run --worker opencode --workspace /tmp/demo \
--timeout 60000 --concurrency 5 "Write a README for this repo"
```

Expand All @@ -77,20 +77,20 @@ Use the `run` subcommand to delegate a task to a Worker using only CLI flags.
| `--capabilities <csv>` | `READ,EDIT,RUN_TESTS,RUN_COMMANDS` | `EDIT` |
| `--timeout <ms>` | task timeout | `120000` |

Internally, AgentCore checks PermitGate -> CircuitBreaker -> ExecutionBudget before delegating to the worker.
Internally, Roboppi checks PermitGate -> CircuitBreaker -> ExecutionBudget before delegating to the worker.

---

## Usage 2: IPC server mode

If you run `agentcore` with no subcommand, it starts in IPC server mode. A Scheduler or custom driver can talk to it over JSON Lines.
If you run `roboppi` with no subcommand, it starts in IPC server mode. A Scheduler or custom driver can talk to it over JSON Lines.

```bash
# Start with defaults
./agentcore
./roboppi

# Start with custom settings
./agentcore --concurrency 20 --rps 100 --log-level debug
./roboppi --concurrency 20 --rps 100 --log-level debug
```

Shared options (also available in `run` mode):
Expand All @@ -111,7 +111,7 @@ Shared options (also available in `run` mode):
### Example: submit a job via JSON Lines

```bash
echo '{"type":"submit_job","requestId":"req-1","job":{"jobId":"job-001","type":"LLM","priority":{"value":1,"class":"INTERACTIVE"},"payload":{"prompt":"hello"},"limits":{"timeoutMs":5000,"maxAttempts":3},"context":{"traceId":"t-1","correlationId":"c-1"}}}' | ./agentcore 2>/dev/null
echo '{"type":"submit_job","requestId":"req-1","job":{"jobId":"job-001","type":"LLM","priority":{"value":1,"class":"INTERACTIVE"},"payload":{"prompt":"hello"},"limits":{"timeoutMs":5000,"maxAttempts":3},"context":{"traceId":"t-1","correlationId":"c-1"}}}' | ./roboppi 2>/dev/null
```

Output (returned on stdout as JSON Lines):
Expand Down Expand Up @@ -330,7 +330,7 @@ OpenCode generates files and the result returns `SUCCEEDED`.

## Usage 5: Start with a Scheduler (full configuration)

The Scheduler launches and supervises AgentCore as a child process. This includes a job queue, dedup control, retries, and a DLQ.
The Scheduler launches and supervises Roboppi Core as a child process. This includes a job queue, dedup control, retries, and a DLQ.

```typescript
import { Scheduler } from "./src/scheduler/index.js";
Expand All @@ -342,7 +342,7 @@ const scheduler = new Scheduler({
retry: { baseDelayMs: 1000, maxDelayMs: 30000, maxAttempts: 3 },
});

// Start AgentCore as a child process
// Start Roboppi Core as a child process
await scheduler.start();

// Submit a job
Expand Down Expand Up @@ -401,7 +401,7 @@ roboppi workflow my-workflow.yaml --verbose
# (dev) bun run src/workflow/run.ts my-workflow.yaml --verbose
```

For each step, AgentCore requests a Permit, delegates to the worker, and collects results. If a step fails, it aborts depending on policy.
For each step, Roboppi Core requests a Permit, delegates to the worker, and collects results. If a step fails, it aborts depending on policy.

### Reuse worker settings with agent catalogs

Expand Down Expand Up @@ -481,7 +481,7 @@ See the [Daemon guide](./daemon.md) for details.
| Scheduler (parent process) |
| JobQueue / InFlightRegistry / RetryPolicy |
| +-----------------------------------------+ |
| | AgentCore (child process) | |
| | Roboppi Core (child process) | |
| | PermitGate / CircuitBreaker | |
| | Watchdog / EscalationManager | |
| | +-----------------------------------+ | |
Expand Down
Loading