Skip to main content

Agentic Frameworks

LangChain wraps the LLM. Agenthood wraps the engineer.


What it is

An agentic framework is the scaffolding that holds an agent together: the loop, the tool registry, the memory store, the prompt assembly, the error recovery. You can build all of this from scratch on top of a raw LLM API, or you can adopt a framework that has already made the architectural decisions for you.

The landscape splits into two camps. Wrapper frameworks (LangChain, CrewAI, LangGraph) sit on top of an LLM and offer pre-built chains, agents, and graphs. You compose their abstractions and they handle the plumbing. Native runtimes, like the one Agenthood chose, build the agent loop directly in the host language, calling the LLM provider API without an intermediary abstraction layer.

The tradeoff is control versus speed-to-prototype. Wrapper frameworks get you to a demo fast. Native runtimes give you ownership of every decision that matters in production: how prompts are assembled, how errors are retried, how memory is structured, how the loop terminates.


Why it matters in production

Wrapper frameworks add abstraction layers you did not choose and cannot remove. When LangChain changes its RunnableSequence interface, your agent breaks. When CrewAI rewrites its task delegation model, your workflow semantics shift underneath you. Both have happened, and they are why teams that adopt a wrapper at scale end up pinned to a version.

The deeper problem is hidden prompts. A wrapper framework assembles your prompt from templates you never wrote, concatenated in an order you never approved. When your agent hallucinates in production, you cannot inspect the exact prompt that produced the failure because the framework built it at runtime and discarded it. Debugging turns into reconstructing a prompt that no longer exists.

A TypeScript-native runtime avoids both. The type system catches contract violations at compile time, such as a wrong skill signature, a missing tool method or a malformed memory entry. And because you own the prompt assembly, every prompt is a string you wrote: visible in the stack trace and diffable in git.


How Agenthood implements it

Agenthood's v2 runtime is built entirely in TypeScript, in src/agents/, src/llm/ and src/memory/ inside the existing Node.js package, with no Python sidecar and no external graph library. ADR-008 records the decision and the alternatives that were rejected:

import { GroqProvider } from './llm/GroqProvider.js';

const llm = new GroqProvider({ model: 'llama-3.3-70b' });

// Direct call: no chain, no wrapper, no hidden template
const response = await llm.complete({
  system: 'You are The Scribe. Write a Conventional Commit message.',
  user: diff,
  temperature: 0.2,
});

Every LLM call is a visible function call with explicit arguments. The prompt is a string you can log, diff, and unit-test. ADR-008 eliminated the separate Python runtime: one language, one package manager, one release pipeline.


Hands-on example

Compare the two approaches on the same task: writing a commit message from a diff:

# The wrapper-framework way: a chain you cannot inspect
# const chain = prompt.from_template(...) | model | output_parser
# result = await chain.ainvoke({ diff })  # what prompt? what params?

# The Agenthood way: explicit, inspectable, typed
agenthood run scribe "write a commit message for the current diff"

The Society member produces a Conventional Commit message with no hidden prompt assembly. The skill file (skills/scribe/SKILL.md) is the prompt: readable, versioned, and editable.


Further reading