Deep dive into Gorkieโs code execution environment powered by E2B and Pi
The sandbox tool is Gorkieโs most powerful capabilityโit delegates tasks to a persistent code execution environment where Pi (a coding agent) can write code, process files, install packages, and use specialized skills.
When you ask Gorkie to process files, run code, or perform complex data operations, it uses the sandbox tool to hand off work to a dedicated runtime environment.
A clear description of what to accomplish. The sandbox remembers all previous work in this threadโfiles, code, and context from earlier runs are available. Reference them directly.
Each Slack conversation thread gets its own sandbox session:
// First sandbox call in a thread{ task: "Create a Python script that fetches weather data"}// โ Creates new E2B sandbox, starts Pi agent// Second sandbox call in same thread{ task: "Run the weather script for New York"}// โ Reuses existing sandbox, script is still there
Sessions are paused between calls to save resources and resumed when needed.
Submit public signup/contact forms with proof screenshots
Scrape structured text from public pages
Reproduce UI issues and capture before/after screenshots
Download files from public pages
Find and download media assets from Google Images or source sites
Workflow pattern:
{ task: `Use agent-browser skill:1. Open https://example.com/form2. Take snapshot with 'snapshot -i'3. Fill fields: name=Jordan Lee, [email protected]4. Click submit button5. Wait for confirmation page (use wait networkidle)6. Capture screenshot and upload with showFile`}
Example:
{ task: "Use the agent-browser skill to open https://example.com/event-signup, fill the form fields with: name Jordan Lee, email [email protected], company Acme Labs, role Engineer, and notes Interested in AI automation workshop. Submit the form, capture the confirmation page as output/event-signup-confirmation.png, and upload it with showFile. Include a brief summary of what was submitted and the confirmation text."}
{ task: `Use AgentMail skill:1. List unreplied threads from last 24 hours in [email protected]2. Draft concise replies for each thread (don't send yet)3. Save triage summary to output/agentmail-triage.md4. Upload summary with showFile5. Include thread IDs and draft IDs in summary`}
Example:
{ task: "Use AgentMail. For inbox [email protected], list unreplied threads from the last 24 hours, draft concise replies for each thread (do not send yet), save a triage summary to output/agentmail-triage.md, and upload it with showFile. Include thread IDs and draft IDs in the summary."}
Revoke leaked HackClub API tokens.Use case:
When a user accidentally shares a HackClub API token in Slack, immediately revoke it for security.API:
// POST https://revoke.hackclub.com/api/v1/revocations{ "token": "...", "submitter": "gorkie", "comment": "user-reported leak in Slack"}
Example:
{ task: "Use the HackClub Revoker skill to revoke token hc_live_abc123xyz456. Submit with submitter=gorkie and comment='accidental Slack share'. Report status but do NOT include the token in your response."}
Security note: When reporting revocation results, never repeat the full token value in the response to the user.
// Good{ task: "Analyze sales.csv, create a bar chart showing monthly revenue, save as output/revenue-chart.png, and upload with showFile. Include total revenue in the summary."}// Avoid{ task: "Analyze the file" // Too vague}
// First call{ task: "Download stock data for AAPL and save to data/aapl.json" }// Second call (references first){ task: "Using the AAPL data from earlier, calculate 30-day moving average" }
{ task: `Complete workflow:1. Read uploaded PDF with PyPDF22. Extract text and save to data/extracted.txt3. Use searchWeb to find related articles4. Create markdown summary in output/summary.md5. Upload with showFile`}
{ task: "Read sales-data.csv, calculate summary statistics (mean, median, std dev) by region, create visualizations (histogram and box plot), save all outputs to output/ and upload with showFile. Include key insights in summary."}
{ task: "Use agent-browser to open https://news.ycombinator.com, extract the top 10 story titles and URLs, save as JSON to output/hn-top10.json, and upload with showFile."}
{ task: "Use AgentMail to check [email protected] inbox, list messages received in the last hour, and create a summary table with: sender, subject, received time. Save to output/recent-emails.md and upload."}
{ task: "Use PIL to resize the uploaded image to 800x600, apply a subtle blur filter, add a watermark 'Gorkie 2026' in bottom-right corner, save as output/processed.png and upload with showFile."}
{ task: "Fetch weather data from OpenWeatherMap API for San Francisco (use free tier, no API key needed for basic data). Parse JSON response, extract temperature, conditions, humidity. Create a formatted markdown report in output/weather.md and upload."}