
Doing action, instead of just thinking. Focusing on solutions, instead of problems. @210723 @131224 @230126
Joined December 2024
- Tweets810
- Following32
- Followers6
- Likes251
Hon Tran retweeted
If you're building AI agents, one of the most important things to understand is what happens outside the model.
This is where harness engineering comes in.
Consider a coding agent working through a large repository. The model can decide which file to inspect, which function to modify or which test to run. The software surrounding it has to turn those decisions into actual operations.
It manages which tools are available, what actions are permitted, how results are returned and what information the model receives on its next step.
Things become particularly interesting when an agent works on longer tasks.
As execution history grows, retaining everything in the context window becomes expensive and can make relevant information harder to find. The system needs mechanisms to select context, summarize previous work and maintain state outside the model's context window.
A well-designed harness can also preserve checkpoints, recover from interruptions, enforce execution limits and record traces that help engineers understand why an agent failed.
Harness engineering is the discipline of designing and improving this surrounding software and the environment in which the agent operates.
Engineers can study execution traces, evaluate agents on representative tasks, identify recurring failures and improve the system without necessarily changing the underlying model.
Sometimes an agent fails because it received the wrong context, had a poorly designed tool interface or couldn't recover from an unsuccessful operation. A more capable model alone may not solve those problems.
As AI agents take on longer and more complex tasks, understanding how to engineer the systems around models will become increasingly important.
If you're learning AI agent development, harness engineering deserves a place alongside model architecture and inference engineering.
Hon Tran retweeted
Prompt, context, harness & loop engineering, clearly explained!
An agent is a while loop with four layers of engineering wrapped around it:
- Prompt engineering
- Context engineering
- Harness engineering
- Loop engineering
Each one wraps the last, and the model sits in the middle, so none of them compete with the others. Instead, they just zoom one level further out.
> Prompt engineering:
This defines the input the model sees on one call, often composed of a role, instructions, examples, and an output format.
The techniques here alter the internal computation and reasoning the model goes through due to the wording it sees:
- Chain-of-thought makes it work in steps before answering
- Few-shot examples define the format and the edge cases
- A JSON schema or XML tags make the output parseable by code
- Self-consistency samples a few chains and takes the majority
> Context engineering:
It's everything the model sees on a turn, not just the prompt. That includes the query, retrieved docs, memory, prior turns, and tool outputs from earlier steps.
The window is finite and fills up fast, so the engineering work is to rank inputs and cut everything that isn't pulling weight.
You do this by:
- Retrieving only the chunks relevant to the query, then reranking them
- Keeping key facts out of the middle, where accuracy drops
- Summarizing old turns, evict stale outputs, push big blobs to files
> Harness engineering:
It's the code around the model that defines the tools, parses the calls, retries on failure, and can route work to sub-agents so one handles retrieval and another handles code.
A verifier then grades the result by running tests, validating a schema, etc.
Prompt and context involve getting one call right. The harness involves everything that has to happen around that call for it to run in a real system.
> Loop engineering:
In the usual setup, you manage the outer loop, i.e, you write a prompt, read the turns the agent runs, write the next prompt, and repeat, while catching failures.
This layer hands that job to the agent itself. It kicks off on a schedule or an event, and runs many turns with no prompt in between.
A loop inherently doesn't know when it's finished. An agent can report that it's done and halt while the tests still fail. So the stop can't be the agent's word, but rather it has to be a real signal, like:
- A turn and token cap to stop stuck runs
- A no-progress detector to catch repeated calls
- A completion check to verify the goal with a separate model or a deterministic test
By this layer, you're operating on the whole run, so the engineering moves from writing each prompt to setting the goal and the stop conditions up front and letting it run.
A longer run also makes the cost of the layers underneath it grow.
When a tool returns a 50K-token response and nothing removes it, the model reads it again on every later call. Over a loop of twenty steps, one response turns into hundreds of thousands of tokens.
I wrote a full breakdown of where an agent's tokens actually go and how a harness keeps context flat, using TrueForge, an open-source harness that turns an LLM into a working agent.
GitHub repo: github.com/truefoundry/truef…
(don't forget to star it ⭐ )
It covers offloading large tool outputs to files, subagents for context isolation, Code Mode for multi-tool joins, and compaction.
It also has a benchmark of three harnesses on the same 14 tasks, where TrueForge reached the same answers on about 40% of the tokens Claude Managed Agents used.
You can read my full article below.
Hon Tran retweeted
Learning DevOps in 2023:
- Linux
- Git
- Docker
- Kubernetes
- Jenkins
- AWS
- Terraform
- Ansible
- CI/CD
- Bash Scripting
Learning DevOps in 2026:
Hon Tran retweeted
Harness Engineering 2.0 is here!
After protocols for tools, agent communication, and agent interfaces, harnesses now have one too.
Developers just built UHP (Unified Harness Protocol), a standardized interface for running agent tasks across any agent harness.
HarnessRouter is its open-source server implementation.
Here’s how it works:
- The product backend sends a task with a `harness_id`.
- HarnessRouter starts the selected harness in its own session.
- The harness runs its native agent loop and streams back progress.
- Files, artifacts, failures, and the final output return through the same interface.
Without UHP, integrating every harness needs separate handling for task execution, sessions, streaming, files, recovery, and output formats.
With UHP, Codex, Claude Code, Gemini CLI, Hermes, Pi, and other harnesses can plug into the same product backend while keeping their native tools, skills, models, and agent loops.
This means developers can:
- Switch harnesses without rebuilding the product integration.
- Run the same task across different harnesses.
- Add new harnesses without maintaining another execution stack.
HarnessRouter currently supports 30 harness bases.
Here’s the repo: github.com/HarnessRouter/har…
(don’t forget to star it ⭐)
As per official benchmarks, changing only the harness while keeping the model fixed reduced costs by 25% to 64% across several healthcare compliance tasks.
And changing both the harness and model widened the difference to 99.8% between the highest and lowest-cost configurations.
Developers can test their own workloads across different configurations using Harness Arena.
Alibaba Cloud's Qoder has also adopted UHP, making it available as an agent backend through the HarnessRouter API.
If you want to dive deeper, I already wrote an article that explains why model routing is different from harness routing and what supporting multiple agent runtimes actually involves.
It also covers UHP, the local setup, a working API call, and how sessions and files work.
Read it below.
Hon Tran retweeted
Google Brain founder Andrew Ng:
"Prompting will be dead in 6 months
Agent harnesses built with loops and graphs will replace it"
Agent → Harness → Feedback → Loops → Graphs → Self-Improving Systems
In this 1-hour Stanford lecture, he explains what the best engineers are building instead and how you can start today
Prompt → Run → Verify → Improve
The first 20 minutes teach what most $1,500 courses try to sell you
For free
Bookmark and watch it today
Then read the guide below on building an agent harness that improves itself
Hon Tran retweeted
"Knowledge Graphs and LLMs in Action: Build AI systems using connected data"
Available at amzn.to/4wg7S2O via @ManningBooks
Hon Tran retweeted
Static RAG is dead, Agents are next.
Most people think RAG is advanced AI.
It’s not.
It’s just the starting point.
This visual shows the real shift happening right now:
RAG vs Agentic RAG
Here’s the difference in simple terms:
🔹 RAG (Retrieval-Augmented Generation)
– Fetches relevant documents
– Feeds them to the LLM
– Generates an answer
➡️ Linear. One-shot. Limited thinking.
🔹 Agentic RAG
– Rewrites your query
– Decides what info is missing
– Chooses the best data source (DB, APIs, web)
– Iterates until the answer is actually good
➡️ Dynamic. Iterative. Goal-driven.
The big insight?
RAG retrieves information.
Agentic RAG thinks about how to retrieve better information.
If you're building AI products, this shift isn’t optional it’s inevitable.
Save this if you’re working on AI systems.
Hon Tran retweeted
☁️ 20 Stages to Master AWS
Stage 1: Cloud Basics
Stage 2: AWS Fundamentals
Stage 3: IAM
Stage 4: EC2
Stage 5: S3
Stage 6: VPC
Stage 7: Subnets & Routing
Stage 8: Security Groups & NACLs
Stage 9: Route 53
Stage 10: Load Balancers
Stage 11: Auto Scaling
Stage 12: RDS
Stage 13: CloudWatch
Stage 14: Lambda
Stage 15: API Gateway
Hon Tran retweeted
Docker Container Mastery
If I had to master Docker containers, I’d learn these concepts:
1. Docker Fundamentals
2. Containerization
3. Containers vs Virtual Machines
4. Docker Architecture
5. Docker Engine
6. Docker CLI
7. Docker Desktop
8. Docker Images
9. Docker Containers
10. Docker Hub
11. Container Registries
12. Image Tags
13. Image Digests
14. Dockerfile
15. Dockerfile Instructions
16. Build Context
17. Image Layers
18. Build Cache
19. Multi-Stage Builds
20. Minimal Base Images
21. Alpine Images
22. Distroless Images
23. Image Optimization
24. Container Lifecycle
25. Container Processes
26. Container Names
27. Port Publishing
28. Environment Variables
29. Container Networking
30. Bridge Networks
31. Host Networks
32. Overlay Networks
33. Container DNS
34. Network Aliases
35. Docker Volumes
36. Bind Mounts
37. Temporary Mounts
38. Persistent Storage
39. Docker Compose
40. Compose Services
41. Compose Networks
42. Compose Volumes
43. Health Checks
44. Restart Policies
45. Container Logging
46. Log Drivers
47. Resource Limits
48. CPU Constraints
49. Memory Constraints
50. Container Security
51. Linux Namespaces
52. cgroups
53. Rootless Containers
54. Docker Secrets
55. Image Scanning
56. Vulnerability Management
57. Supply Chain Security
58. Private Registries
59. Image Versioning
60. BuildKit
61. OCI Standards
62. Container Runtimes
63. Docker API
64. Container Debugging
65. Docker Inspect
66. Docker Exec
67. Container Troubleshooting
68. Network Troubleshooting
69. Storage Troubleshooting
70. Performance Optimization
71. Image Size Optimization
72. Layer Optimization
73. Docker in Development
74. Docker in Testing
75. Docker in Production
76. Docker CI/CD
77. GitHub Actions
78. GitLab CI/CD
79. Jenkins with Docker
80. Dockerized Applications
81. Microservices with Docker
82. Databases in Containers
83. Redis Containers
84. PostgreSQL Containers
85. MongoDB Containers
86. Nginx with Docker
87. Reverse Proxy Containers
88. Container Load Balancing
89. Container Scaling
90. Docker Swarm
91. Kubernetes Fundamentals
92. Docker and Kubernetes
93. Cloud Container Platforms
94. Container Monitoring
95. Prometheus & Grafana
96. Container Observability
97. Backup & Recovery
98. Production Container Best Practices
(...and more concepts)
===
👋 PS - Want a detailed breakdown of Docker container mastery?
Read right now:
→ Docker Container Mastery Ebook:
codewithdhanian.gumroad.com/…
===
💾 Save this for later & RT to help others master Docker containers.
👤 Follow @e_opore + turn on notifications.
Hon Tran retweeted
Most people want to become AI Engineers
Very few know what to learn next
That's why I'm giving away one of the best Agentic AI Engineer Roadmaps for FREE to the first 4500 people only
Inside you'll learn
✅ Python Fundamentals
✅ LLM Fundamentals
✅ LangChain LangGraph CrewAI AutoGen
✅ LCEL Runnables & Workflows
✅ Memory Systems
✅ Tool Integrations
✅ RAG Systems
✅ Multi Agent Systems
✅ Real World AI Projects
✅ Interview Questions & Answers
72 Hours Only
How to get
Follow me (so I can DM you)
Like + RT
Comment "ROADMAP"
Once the limit is reached I'll stop sending it.
Hon Tran retweeted
Google just released a free 2-hour+ course on full agent engineering.
How to go from one prompt to a system that runs while you sleep:
38:46 - Build your first AI agent
54:46 - Connect MCP tools
1:12:43 - Run agents with four loop patterns
1:20:57 - Turn agent loops into graphs
2:22:31 - Build the complete autonomous system
Most people are still building one agent and stopping there.
Google is already teaching the full stack:
Agents → Tools → Loops → Graphs → Autonomous Systems
Single agents are the old workflow.
Systems that run without you are the new one.
This course is worth more than most paid agent engineering bootcamps.
Bookmark and watch it today
Then read the full graph engineering playbook below
Impressive paper!
It's on one of the hardest tasks for coding agents today.
Of course, I am talking about kernel optimization. Coding agents are usually not so great at this.
Reasons: Unfamiliar low-level API, no room for a plausible-looking answer, and every candidate has to actually run and be faster.
Kernel Forge is an open-source agent harness that takes an unmodified PyTorch model in place and rewrites its CUDA kernels. It covers vision, diffusion, and LLM workloads.
Instead of a linear generate-and-fix chain, it runs Monte Carlo Tree Search over multiple optimization paths, with a GUI for monitoring progress, inspecting candidate kernels, and debugging failures.
On an NVIDIA DGX Spark with a GB10 GPU, at 50 optimization iterations per kernel, it optimized 14 kernels past their PyTorch baselines across four models.
It looks like the gain came from harness structure and in-place reintegration rather than a stronger model. That lesson repeats for any agent working against an API it was never trained on.
Paper: arxiv.org/abs/2607.24762
Learn to build effective AI agents in our academy: academy.dair.ai/
Hon Tran retweeted
I created a playbook to help you learn AI engineering.
It'll give you:
• Core concepts behind AI systems.
• Condensed notes to understand full-stack AI engineering.
• Must know techniques to build, deploy & scale AI apps.
(24 HOURS ONLY!!!)
1 Follow @systemdesignone [MUST]
2 Like & Retweet to get DM
3 Reply "Playbook"
Then I'll DM you the details.
Hon Tran retweeted
How to build a RAG app on AWS!
The visual below shows the exact flow of how a simple RAG system works inside AWS, using services you already know.
At its core, RAG is a two-stage pattern:
- Ingestion (prepare knowledge)
- Querying (use knowledge)
Below is how each stage works in practice.
> Ingestion: Turning raw data into searchable knowledge
- Your documents live in S3 or any internal data source.
- Whenever something new is added, a Lambda ingestion function kicks in.
- It cleans, processes, and chunks the file into smaller units that the model can understand.
- Each chunk is embedded using Bedrock Titan Embeddings.
- The embeddings are stored in a vector database like OpenSearch Serverless, DynamoDB, or Aurora.
- This becomes your searchable knowledge store.
This stage can run continuously in the background, keeping your knowledge fresh.
That said, you need to be strategic about how you reindex your data.
For instance, if you are fetching data from a document and only one character was updated in it, you don’t want to reprocess the entire document every time.
So smart diffing, incremental updates, and metadata checks become important to avoid unnecessary cost and keep ingestion efficient.
> Querying: Retrieving and generating answers:
- A user asks a question through the app.
- The request flows through API Gateway into a Lambda query function.
- The question is embedded with Bedrock Titan Embeddings.
- That embedding is matched against your vector database to fetch the most relevant chunks.
- Those chunks are passed to a Bedrock LLM (Claude or OpenAI) to craft the final answer.
- The response travels back to the user through the same API path.
This pattern ensures the LLM is grounded in your actual data, not model guesses.
This setup is the most basic form of RAG on AWS, but the pattern stays the same even as your system grows.
You can add better chunking, smarter retrieval, caching layers, orchestration, streaming responses, eval pipelines, or multi-source ingestion, and the architecture still holds.
That said, most RAG architectures rely heavily on vector search to gather relevant context from a vector DB.
That layer can be made 32x more memory efficient using binary quantization.
I covered the full implementation of that in the article below.
P.S. The visual in this tweet on building a RAG app on AWS is inspired by ByteByteGo's post on a similar topic. I added more context to it for explainability.






































