GitHub - ibreakthecloud/kiwi · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
ibreakthecloud
kiwi
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>8 Commits<br>8 Commits
cmd/kiwid
cmd/kiwid
demo_project
demo_project
pkg
pkg
.gitignore
.gitignore
CLAUDE.md
CLAUDE.md
PRODUCT_DRAFT.md
PRODUCT_DRAFT.md
README.md
README.md
go.mod
go.mod
View all files
Repository files navigation
Kiwi: The Secure Agentic Control Plane
Kiwi is an enterprise-ready secure execution engine that runs autonomous developer loops (TDD Actor-Critic alignment) in the cloud while pulling required secrets dynamically and securely from the local machine over a reverse tunnel.
With Kiwi, you can trigger complex, long-running agent workflows in the cloud sandbox and safely close your laptop . If a step requires a developer credential (like a GitHub OAuth token, database credentials, or API keys), the execution statefully pauses, wait for you to reconnect, and resumes once the tunnel is active.
High-Level Architecture
>Server: 1. Pack & Sync Codebase (ZIP upload)<br>Server->>Sandbox: 2. Extract Workspace<br>Server->>Server: 3. Spawn Actor-Critic Loop<br>CLI->>Server: 4. Open Reverse Tunnel stream (GET /tunnel/{id})
loop Loop Execution<br>Sandbox->>Server: Resolve Env Key (e.g. GITHUB_TOKEN)<br>Server->>CLI: Request Secret Key over Tunnel<br>Note over CLI: Fetch key from env / secrets.json<br>CLI-->>Server: POST Secret Value (POST /tunnel/{id}/response)<br>Server-->>Sandbox: Inject Credentials<br>Sandbox->>Sandbox: Execute Test / Build commands<br>end
Note over CLI: Laptop Closed! (Tunnel Breaks)<br>Server->>Server: Detect Disconnect & set Task State to "PAUSED"<br>Server->>Server: Block loop execution thread
Note over CLI: Laptop Opened! (Reconnected)<br>CLI->>Server: Resume Task (kiwi -resume -task-id {id})<br>Server->>Server: Set Task State back to "RUNNING"<br>Server->>Server: Unblock thread & continue execution<br>" dir="auto">
sequenceDiagram<br>participant CLI as Local CLI Client<br>participant Server as Kiwi Cloud Daemon<br>participant Sandbox as Cloud Sandbox (Temp Dir)
CLI->>Server: 1. Pack & Sync Codebase (ZIP upload)<br>Server->>Sandbox: 2. Extract Workspace<br>Server->>Server: 3. Spawn Actor-Critic Loop<br>CLI->>Server: 4. Open Reverse Tunnel stream (GET /tunnel/{id})
loop Loop Execution<br>Sandbox->>Server: Resolve Env Key (e.g. GITHUB_TOKEN)<br>Server->>CLI: Request Secret Key over Tunnel<br>Note over CLI: Fetch key from env / secrets.json<br>CLI-->>Server: POST Secret Value (POST /tunnel/{id}/response)<br>Server-->>Sandbox: Inject Credentials<br>Sandbox->>Sandbox: Execute Test / Build commands<br>end
Note over CLI: Laptop Closed! (Tunnel Breaks)<br>Server->>Server: Detect Disconnect & set Task State to "PAUSED"<br>Server->>Server: Block loop execution thread
Note over CLI: Laptop Opened! (Reconnected)<br>CLI->>Server: Resume Task (kiwi -resume -task-id {id})<br>Server->>Server: Set Task State back to "RUNNING"<br>Server->>Server: Unblock thread & continue execution
Loading
Core Features
Actor-Critic Alignment Loop : A test-driven development (TDD) controller that iteratively edits code, evaluates compiler/test stdout in the sandbox, and refines fixes.
Reverse Credential Tunneling : Eliminates the need to persist long-lived AWS, GitHub, or GCP API credentials on cloud sandbox hosts.
Headless Laptop Pause & Resume : Complete offline resilience. Execution freezes statefully when a laptop disconnects and resumes when it reconnects.
Loop Safety & Budgeting : Built-in protection gates:
Circuit Breaker : Detects infinite recursive loop states by tracking duplicate compiler stdout patterns.
Budget Caps : Sets strict cost controls per task (runs at simulated token pricing) to prevent budget drainage.
Interactive Kanban Dashboard : Embedded dark-themed dashboard featuring status cards, live polling, log filters, and a real-time console log viewer.
Getting Started
Prerequisites
Go 1.21 or higher
macOS ( Tahoe/darwin ARM64 ) or Linux
Quick Setup
Clone & Build :
# Build and sign the...