Hi,👋 we have updated the app and fixed multiple bugs. We are lacking funds, request to free user not to use Adblock. Ads are non intrusive. 😊

✨ Visual Editor

close

Thread Truncated

Only the first 20 tweets are shown to ensure high-quality rendering and prevent image size issues.

palette Canvas & Background

Gradient:arrow_forward
Text Color:
135°

style Card Style

40px
16px

text_fields Typography

16px
Mohit Goyal (Harness arc)
@ByteMohit
Everyone is building with agents.
Thread image
Mohit Goyal (Harness arc)
@ByteMohit
Almost nobody talks about what is actually inside one.
Mohit Goyal (Harness arc)
@ByteMohit
Not the model. The harness around it.
Mohit Goyal (Harness arc)
@ByteMohit
I spent the last few months building one from scratch in Python every component, no framework shortcuts. A streamed agent loop, typed tool calls, approval gates, prompt-injection boundaries, context compaction, MCP integration, subagents, persistence, and a full test suite.
Mohit Goyal (Harness arc)
@ByteMohit
The project is called AgentForge.
Mohit Goyal (Harness arc)
@ByteMohit
It is open source, installable, and running right now on my machine.
Mohit Goyal (Harness arc)
@ByteMohit
→ GitHub: MohitGoyal09/AgentForge
→ PyPI: agentforge-harness
→ Install: pip install agentforge-harness
Mohit Goyal (Harness arc)
@ByteMohit
This article is not a launch post.
Mohit Goyal (Harness arc)
@ByteMohit
It is everything building AgentForge taught me about what agents actually are and why using frameworks without building one first leaves a dangerous gap in your understanding.
Mohit Goyal (Harness arc)
@ByteMohit
The core lesson came early and changed everything after it:
Mohit Goyal (Harness arc)
@ByteMohit
An agent is not a model. An agent is a runtime that controls how a model sees, acts, retries, remembers, and stops.
Mohit Goyal (Harness arc)
@ByteMohit
The model is maybe 20% of the engineering.
Mohit Goyal (Harness arc)
@ByteMohit
The other 80% is what wraps it: the action space, the approval policy, the observation format, the context budget, the recovery paths, the persistence layer.
Mohit Goyal (Harness arc)
@ByteMohit
I built all of it. Here is what each part taught me.
Mohit Goyal (Harness arc)
@ByteMohit
---
Mohit Goyal (Harness arc)
@ByteMohit
## The Whole Harness In One Table
Mohit Goyal (Harness arc)
@ByteMohit
Thread image
Mohit Goyal (Harness arc)
@ByteMohit
This is what I ended up building, and what each part taught me:
Mohit Goyal (Harness arc)
@ByteMohit
| Component | File | What It Taught Me |
| --- | --- | --- |
| Session runtime | `agentforge_harness/agent/session.py` | Chat history is not enough. An agent needs a real runtime container. |
| Agent loop | `agentforge_harness/agent/agent.py` | The loop is a control system, not a `while tool_calls` toy. |
| Provider adapter | `agentforge_harness/client/llm_client.py` | Normalize model providers at the edge. |
| Tool contract | `agentforge_harness/tools/base.py` | Tool output quality controls recovery quality. |
| Tool registry | `agentforge_harness/tools/registry.py` | Every action should pass through validation, policy, cleanup, and hooks. |
| File tools | `agentforge_harness/tools/builtin/` | Small metadata details change model behavior. |
| Approval layer | `agentforge_harness/safety/approval.py` | Safety has to be enforced outside the prompt. |
| Prompt-injection boundary | `agentforge_harness/safety/prompt_injection.py` | Tool output is data, not instruction. |
| Context manager | `agentforge_harness/context/manager.py` | Forgetting is an engineering problem. |
| Skills | `agentforge_harness/skills/manager.py` | Load guidance when needed, not all the time. |
| MCP | `agentforge_harness/tools/mcp/mcp_manager.py` | External tools need namespacing and trust boundaries. |
| Subagents | `agentforge_harness/tools/subagents.py` | Delegation should start bounded and scoped. |
| Persistence | `agentforge_harness/agent/persistence.py` | If you cannot inspect the run, you cannot improve the agent. |
Mohit Goyal (Harness arc)
@ByteMohit
This table is the real article.
Generated by Thread Navigator
100%
view_carousel Carousel Studio NEW
Press ⌘ + S to quick-export