AvenbayDocs

AVENBAY / DOCUMENTATION

Remote agents,
under your control.

Avenbay is a secure control plane for persistent CLI-agent sessions on machines you own. Connect a host once, then start, inspect, and resume agent work from the browser.

01Customer-owned compute
02Persistent tmux sessions
03Outbound WSS only
01

GET STARTED

From account to agent

The standard setup takes four steps. Your first account becomes the owner of a new organization; every resource created after that belongs to the same organization.

  1. Create your account

    Register in the Avenbay console with an organization name, email, and a password of at least 12 characters.

  2. Verify your email

    Open the verification link sent by Avenbay, then sign in. Verification links are single-use and valid for 24 hours.

  3. Connect a host

    In Hosts → Add host, name the machine and run the one-time enrollment command on it.

  4. Start a session

    Choose the connected host, project, working directory, and agent. Open its terminal or send a task without opening SSH.

02

IDENTITY

Accounts & teams

Each account belongs to exactly one organization. Organization membership comes from the authenticated server session—it is never selected or supplied by a browser API request.

OWNER

Organization control

Manages the organization, hosts, sessions, and teammates.

ADMIN / MEMBER

Daily operations

Admins can invite users and enroll hosts. Members operate authorized agent sessions.

VIEWER

Read-only access

Inspects organization resources without privileged changes.

Account lifecycle

  • Invitations are single-use and expire after seven days.
  • Password-reset links are single-use and expire after one hour.
  • Changing a password revokes all existing login sessions.
  • Authentication uses an opaque HTTP-only cookie; JavaScript cannot read its value.
03

BRING YOUR OWN COMPUTE

Connect a host

The worker is a small service installed next to your repositories and agent binaries. It establishes an authenticated outbound WebSocket connection to Avenbay and does not open a listener.

1. Generate an enrollment command

Open Hosts, select Add host, and enter a recognizable machine name. Avenbay displays a 15-minute, single-use command:

shell
fleet-worker enroll --url https://avenbay.com --token <single-use-token>

2. Configure the worker service

The enrollment exchange prints a host ID and 90-day worker credential. Store both in the service environment, never in shell history or a command argument.

dotenv
FLEET_CONTROL_URL=wss://avenbay.com/v1/worker/connect
FLEET_HOST_ID=host_replace_me
FLEET_WORKER_TOKEN=replace_with_enrollment_secret
FLEET_STATE_PATH=/var/lib/fleet/state.db
FLEET_ALLOWED_EXECUTABLES=codex,claude
FLEET_ALLOWED_ROOTS=/srv/repositories

3. Start and verify

Run the worker as a dedicated, non-root Unix account with access only to the repositories it should manage. The host will appear as online after its WSS connection is accepted.

04

AGENT RUNTIMES

Codex & Claude Code adapters

An adapter translates Avenbay’s common session operations into the command-line behavior of a specific coding agent. The worker starts the selected executable inside its private tmux server, delivers tasks, and reports lifecycle state to the control plane.

CX

Codex

Start interactive Codex sessions, attach from the browser, send tasks, stop work, and resume an exited Codex session.

CC

Claude Code

Start interactive Claude Code sessions, attach from the browser, deliver tasks, and stop the managed process.

Adapters do not grant the control plane arbitrary shell execution. Workers accept typed operations against Avenbay session IDs and enforce the executable and filesystem policy locally.

05

SESSION LIFECYCLE

Work with sessions

A session belongs to one organization, host, project, and owner. Its process runs in the worker’s private tmux server, so closing the browser does not stop the agent.

ActionWhat it doesAvailability
Open terminalCreates a short-lived attachment grant and connects the browser to the managed tmux session.Running
Send taskQueues typed input through a tmux buffer and submits it without requiring an attached terminal.Running
StopStops the underlying managed session on its worker host.Running
ResumeStarts a new Codex session from an exited Codex session.Exited / Codex
DeletePermanently removes session history after the agent has exited or failed.Exited / Failed
06

AGENT COORDINATION

Manage work across sessions

Coordination tasks let one running agent session delegate a bounded piece of work to another running session in the same organization. Agents create and update tasks with the scoped fleet-session CLI; operators monitor every handoff from the console’s Tasks page.

Prerequisites

  • Use a worker release that advertises the session_cli capability and includes the fleet-session binary.
  • Create new sessions after that worker connects. Existing sessions must be recreated to receive their scoped session environment.
  • Keep both the source and target sessions running. A session cannot send a coordination task to itself.

Delegate work from an agent session

Run these commands inside a Fleet-managed terminal. First discover the other running sessions in your organization:

shell
fleet-session whoami
fleet-session peers

Choose a target session ID from peers, then create the handoff:

shell
fleet-session send \
  --to sess_target \
  --task "Review the authentication changes and report any regressions"

The command returns JSON containing the new ctask_… ID. Avenbay records the task, attempts to deliver a notification into the target session, and exposes it immediately in the Tasks dashboard.

Work the target inbox

The target agent receives the task instruction together with acknowledgement commands. It can also inspect its inbox explicitly:

shell
fleet-session inbox
fleet-session show ctask_123
fleet-session accept ctask_123
fleet-session progress ctask_123 --message "Tests are running"
fleet-session complete ctask_123 --message "Review complete; no regressions found"

For a large result, use --result-file PATH with progress, complete, or fail. Result files are limited to 120 KiB.

Follow up from the source session

shell
fleet-session status ctask_123
fleet-session wait ctask_123 --timeout 20m
fleet-session cancel ctask_123

wait polls until the task is completed, failed, or cancelled. Cancelling stops Fleet coordination but does not guarantee that a target agent which already began work has stopped; interrupt that session manually when necessary.

Delegate a child task

A target session can delegate part of an accepted task to another running session and preserve the relationship:

shell
fleet-session send \
  --to sess_specialist \
  --task "Check the database migration for rollback safety" \
  --parent ctask_123

The parent must target the session creating the child. Delegation depth is limited to three levels to keep coordination bounded and understandable.

Use the Tasks dashboard

OVERVIEW

See workload health

Active, needs-attention, completed, and total metrics summarize organization-wide coordination. The dashboard refreshes every 15 seconds and supports manual refresh.

FIND

Filter and search

Filter all, active, completed, or failed work. Search by task content, ID, state, project, session, or agent runtime.

INSPECT

Trace every handoff

Select a task to inspect its instruction, source and target sessions, parent, depth, result or failure, and chronological activity events.

INTERVENE

Open or cancel

Open either running session’s terminal directly. Non-viewer users can cancel active coordination tasks after confirmation.

Task states

StateMeaning
PendingThe task is stored, but delivery into the target session was not confirmed.
SubmittedThe task notification was written and submitted to the target agent.
AcceptedThe target session acknowledged responsibility for the task.
CompletedThe target returned a result and finished the task.
FailedThe target reported why it could not complete the task.
CancelledThe source session or an authorized console user stopped coordination.
07

TRUST MODEL

Security model

BROWSERAvenbay console
HTTPS / WSS →
CONTROL PLANEAuth + routing
← outbound WSS
YOUR HOSTWorker + tmux

IDENTITY

Server-side tenancy

Every user and resource is scoped to one organization. Passwords use PBKDF2-SHA256; email, invitation, reset, enrollment, and worker tokens are stored as hashes.

NETWORK

No exposed host listener

The worker initiates outbound WSS. Only the HTTPS control plane is internet-facing; your host does not need an inbound firewall rule.

EXECUTION

Local enforcement

The worker permits configured executables and roots, accepts typed session operations, and isolates managed sessions on a dedicated tmux socket.

AUDIT

Privileged event history

Lifecycle and input operations create organization-scoped audit events. Terminal recording is disabled by default.

08

SELF-HOSTING

Production deployment

Run the control plane and web console behind TLS, use PostgreSQL for persistent state, and configure Mailjet Send API v3.1 before enabling public signup.

dotenv
AVENBAY_ORIGIN=https://avenbay.com
AVENBAY_APP_URL=https://app.avenbay.com
FLEET_ALLOWED_ORIGINS=https://avenbay.com
FLEET_SECURE_COOKIES=true
FLEET_PUBLIC_SIGNUP=true
FLEET_MAILJET_API_KEY=use-a-secret-manager
FLEET_MAILJET_SECRET_KEY=use-a-secret-manager
FLEET_MAILJET_FROM=Avenbay <[email protected]>

Production checklist

  • Terminate TLS 1.2+ and preserve WebSocket upgrades with a long idle timeout.
  • Set exact allowed origins and trusted proxy CIDRs.
  • Run database migrations from one instance and test PostgreSQL restoration.
  • Monitor Mailjet delivery, readiness, worker disconnects, HTTP 5xx, and pool saturation.
  • Use a single fleet-server replica; live worker and terminal routes are currently held in process.
  • Apply registration and connection rate limits at the edge.
09

DIAGNOSTICS

Troubleshooting

Host stays offline after enrollment

Confirm the worker service has the printed host ID and worker token, can resolve and reach avenbay.com over HTTPS/WSS, and points to wss://avenbay.com/v1/worker/connect. Then inspect the worker service logs.

The browser reports an origin or host error

Use the public URL consistently and add its exact HTTPS origin to FLEET_ALLOWED_ORIGINS. Development servers may also require the public tunnel hostname in their allowed-host configuration.

Verification or password-reset email does not arrive

Check the Mailjet API credentials, validated sender or domain, and Mailjet delivery logs. During local development with the SMTP fallback, open Mailpit at http://127.0.0.1:8025.

A deleted session returns 404

Deletion removes the session record. Refresh the session list and close any open detail or terminal view that still references the old session ID.

fleet-session says it must run inside a managed session

Create a new session on a worker that includes the session CLI capability, then run the command from that session’s terminal. The command intentionally refuses to use manually supplied user or worker credentials.

A coordination task remains pending

The task was stored but delivery to the target was not confirmed. Confirm the target session is still running, its worker is online, and the target terminal can receive typed operations. You can cancel the task and retry with another running session.

The Tasks page is empty

The dashboard shows coordination tasks created with fleet-session send, not ordinary input sent from a session card. Create at least two running sessions and delegate work from one managed terminal to the other.

READY TO CONNECT?

Bring your first host online.

Open Avenbay