Flows category icon
Agent Architecture
Advanced

Design the Agent-Computer Interface (ACI)

Apply SWE-agent's key finding: agents perform dramatically better when their commands, viewers, and feedback are designed for models, not humans.

5 steps15 verify checks90-120 minutesWorks with: emergent · chatgpt · claude · cursor
Start Guided Walkthrough

The Route

0/5 verified

Context Pack

Paste this first. It briefs the AI on requirements, constraints, and the Definition of Done before your first build prompt.

Context Pack
PROJECT CONTEXT:
My agent has shell access and file tools but flails: it gets lost in long outputs, misuses commands, and misses errors. SWE-agent's research showed the interface between agent and computer is a measurable performance lever.

GOAL:
Redesign my agent's tool surface as a deliberate ACI: constrained commands, model-friendly viewers, and feedback formats that guide the next action.

REQUIREMENTS:
- An audit of current tools against ACI principles (simplicity, feedback quality, guardrails)
- A file viewer with windowed output, line numbers, and navigation state
- Edit commands with built-in validation feedback (lint/syntax check on write)
- Search tools that return concise, ranked results instead of raw dumps
- Every tool response formatted to guide the model's next action

CONSTRAINTS:
- Prefer few, purpose-built commands over exposing the entire shell
- Every tool output must fit a bounded token budget

DEFINITION OF DONE:
- The agent completes a bug-fix task with fewer turns than the raw-shell baseline
- File viewing shows a window with position indicators, never whole large files
- Failed edits return actionable errors (line, reason) and the file is unchanged
- Search results are capped, ranked, and deduplicated

COMMON FAILURES TO AVOID:
- Giving the model a bare shell and calling it an interface
- Tool outputs that dump thousands of lines and drown the signal
- Edits that silently corrupt files because nothing validated them
- Error messages written for humans (stack spew) instead of models (cause + next step)

Paste this into your AI builder first. It teaches the AI what you want before you give it the build prompt.

Related routes

More Agent Architecture flows that share ground with this one.

Flows category icon
Agent Architecture

Design a Single-Loop Agent

Build the core agent loop the leading coding agents use: one model, one loop, tools in, results folded back into context.

01Define the loop contract
02Build the tool registry
03Implement the loop with result folding

+2 more steps to Done

Best forproduction-grade builds with strict verification

5 steps90-150 minutesAdvanced
Flows category icon
Agent Architecture

Add a Plan/Todo System to Your Agent

Give your agent the planning discipline of the leading harnesses: an explicit, model-visible todo list that survives long tasks.

01Design the todo data model and tool
02Render the plan into context every turn
03Enforce plan-first and completion gates

+1 more steps to Done

Best forbuilders who have shipped a basic app before

4 steps60-90 minutesIntermediate
Flows category icon
Agent Architecture

Agent-to-Agent Protocols (A2A)

Connect two agents over an explicit protocol - task handoff, acknowledgment, and failure handling - instead of hoping chat works out.

01Define the protocol
02Build the message layer
03Wrap agents as protocol endpoints

+1 more steps to Done

Best forproduction-grade builds with strict verification

4 steps90-150 minutesAdvanced

Made with Emergent