Strands Harness Agent with Box Sandbox for Repo Triage
From README links · today
Built a Python agent that triages GitHub issues using Strands harness and Box.
What they did
They wanted a small, self-contained agent that could look at incoming GitHub issues in their repo and produce a triage verdict — bug vs. feature vs. question, suggested labels, and a short repro plan — without standing up any hosted control plane. Starting from the Strands Agents README, they scaffolded a Python project around `create_harness()` from the `strands-harness` package, which gives a fully assembled agent (model provider, tool registry, session handling) in a few lines instead of a hand-rolled loop. They defined two custom tools: one that fetches an issue body and recent comments via the GitHub REST API, and one that writes a scratch file into a Box sandbox so the agent could run a quick reproduction snippet in isolation rather than on the host. They wired structured output so the final answer came back as a typed object (category, confidence, labels, repro steps) instead of free text, and used the harness lifecycle controls to cap turns and tokens per issue so a rambling issue couldn't burn budget. They tested it against a handful of real issues from their tracker, iterated on the tool docstrings (which is what the model actually reads when deciding which tool to call), and added a guardrail that refuses to act on issues containing credentials.
How it went
Working prototype: it correctly categorized most of the sample issues and produced usable label suggestions, and the Box sandbox kept repro attempts off the developer machine. Polish level is prototype — the tool docstrings needed several rounds of tuning before tool selection got reliable, and the structured output occasionally needed a retry when the model returned a malformed object. It runs locally from the CLI and has not been deployed anywhere.
Worth knowing
Requires a model provider API key and a Box account/token; the GitHub tool needs a personal access token with repo read scope. The harness is young and its API surface is still moving, so pin versions. Nothing here handles rate limits or webhook delivery — it's pull-based, one issue at a time. The guardrail is a simple string check, not a real secret scanner.
Wiring
Install `strands-harness` (Python) and the Box SDK. Order: (1) env vars for model provider, `GITHUB_TOKEN`, `BOX_*` credentials; (2) define tool functions with clear docstrings and typed params — the model selects tools from these docstrings, so they matter more than the code; (3) register tools on the harness via `create_harness(tools=[...])`; (4) declare a structured output schema so the final turn returns a typed object; (5) set lifecycle limits (max turns, token budget) on the harness config; (6) add a guardrail hook that inspects tool inputs before execution; (7) drive it from a thin CLI that takes a repo and issue number. The Box tool wraps sandbox create → write file → execute → read stdout → tear down, so each repro is isolated.
Try it yourself
Add a Python agent to this repo using the Strands harness SDK (`pip install strands-harness`). Create `agents/triage.py` that calls `create_harness()` with a model provider from env vars, registers two tools — `fetch_issue(repo, number)` hitting the GitHub REST API with a token from env, and `run_snippet(code)` that writes and executes a short Python snippet inside a Box sandbox — and returns structured output with fields: category (bug/feature/question), confidence, suggested_labels, repro_steps. Cap turns and tokens per run. Add a guardrail that rejects issue text containing anything that looks like a credential. Include a `--issue` CLI flag and a short README section on required env vars.
Tools in this stack
Run this stack
Install the stack into this project. It writes AGENTS.md and the manifest, merges the MCP servers into .mcp.json, and — with --yes — runs the tool installs.
npx runchr install runchr/stack-box-and-harness-sdkcurl -s https://api.runchr.com/api/recipes/runchr/stack-box-and-harness-sdk/manifestSystem prompt
You are a repo triage agent that reads a single GitHub issue and returns a structured verdict: category (bug/feature/question), confidence, suggested labels, and a short repro plan. Use the harness-sdk to assemble the agent and the box sandbox to run any reproduction snippet in isolation, and refuse to act on issue text that looks like it contains credentials.
This system prompt was generated from this stack's copy and tools. A person has not reviewed it.
The manifest is also at api.runchr.com/api/recipes/runchr/stack-box-and-harness-sdk/manifest.