← Back to Projects

Agentic Harness Engineering

In Progress

November 2026

A from-scratch agent harness built from scratch. The project builds up the core loop and supporting machinery that turn a raw LLM API into a working agent, without relying on a high-level agent framework.

Architecture

The harness is a plain Python package built directly on the OpenAI Chat Completions API. It starts with the simplest useful agent, an interactive CLI loop that keeps the conversation history and calls the model on each turn, and is extended chapter by chapter.

  • Agent loop — an interactive REPL that appends user and assistant messages to a running history and sends it to the model each turn
  • Configuration — model selection and API credentials loaded from environment variables via python-dotenv
  • Smoke test — a minimal script to verify the API connection before running the agent

Key Features

  • Framework-free agent — every part of the harness is written by hand, making it clear what agent frameworks abstract away
  • Conversation memory — message history carried across turns within a session
  • Configurable model — switch models through the MODEL environment variable (defaults to gpt-4o-mini)
  • Incremental build — each chapter adds a capability on top of the previous one

Tech Stack

  • Python — implementation language, with custom execution loops and no agent framework
  • OpenAI API — language model backend
  • Docker — isolated code execution sandboxes with timeouts, command allow-lists, and restricted outbound networking
  • Git — versioned workspace for the secure filesystem layer
  • AGENTS.md + vector-indexed retrieval — persistent, multi-session memory
  • LangSmith — tracing and an evaluation harness for profiling agent runs and measuring benchmark pass rates
  • python-dotenv — environment-based configuration
AgentsAgent HarnessContext EngineeringSubagentsDockerSandboxingLangSmithEvaluationOpenAIPythonUdemy