enhanced_agents_guide_2025

enhanced_agents_guide_2025 is an agent for coding agents from pr1m8/haive. It costs 0 tokens per session (2,612 once invoked), scanned A, original, MIT.

A guide to three agent types in the Haive framework, a software framework for building AI agents. It explains their architecture, configuration, lifecycle, hooks, and reasoning loops.

In plain words
What is it for?
Use it when building or reviewing Haive agents, especially the enhanced base agent, SimpleAgentV3, or ReactAgentV4.
Why use it?
It gives developers a reference for choosing and configuring Haive agents without piecing together the framework's structure themselves.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/pr1m8/haive/enhanced_agents_guide_2025
Clone the repo
git clone --depth 1 https://github.com/pr1m8/haive

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for enhanced_agents_guide_2025

README.md
[![agentmods](https://agentmods.dev/badge/agents/pr1m8/haive/enhanced_agents_guide_2025.svg)](https://agentmods.dev/agents/pr1m8/haive/enhanced_agents_guide_2025)
Your own site
<a href="https://agentmods.dev/agents/pr1m8/haive/enhanced_agents_guide_2025"><img src="https://agentmods.dev/badge/agents/pr1m8/haive/enhanced_agents_guide_2025.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02612
Opus 5 $0.00000 $0.01306
Sonnet 5 $0.00000 $0.00522
Haiku 4.5 $0.00000 $0.00261

Measured 5d ago against content hash b3ca6954f116, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

enhanced_agents_guide_2025 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

project_docs/guides/agents/enhanced_agents_guide_2025.md · 463 lines

How it starts

The opening of the file, as written. The whole thing — 463 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Enhanced Agents Guide - Haive Framework

Date: August 7, 2025
Version: 1.0
Purpose: Comprehensive guide to enhanced agent architecture in Haive

🚀 Quick Start

The Haive framework provides three powerful enhanced agents as of August 2025:

  1. Enhanced Base Agent - Foundation with lifecycle management
  2. SimpleAgentV3 - Dynamic agent with hooks and recompilation
  3. ReactAgentV4 - Minimal ReAct pattern with reasoning loops

📋 Architecture Overview

Hierarchy

Workflow (pure orchestration - no LLM)
└── Agent (Workflow + Engine)
    ├── SimpleAgent
    ├── ReactAgent  
    └── MultiAgent

Key Innovation: Engine-Centric Generics

from haive.agents.base.enhanced_agent import Agent
from haive.core.engine.aug_llm import AugLLMConfig

# Agents are generic on their engine type
class MyAgent(Agent[AugLLMConfig]):
    pass

🎯 SimpleAgentV3 - The Workhorse

Basic Usage

from haive.agents.simple.agent_v3 import SimpleAgentV3
from haive.core.engine.aug_llm import AugLLMConfig

# Create agent with convenience fields
agent = SimpleAgentV3(
    name="assistant",
    temperature=0.7,          # Auto-syncs to engine
    max_tokens=1000,         # Auto-syncs to engine
    model_name="gpt-4",      # Auto-syncs to engine
    debug=True               # Default is True!
)

# Execute
result = await agent.arun("Hello, how can you help?")

Dynamic Tool Management

from langchain_core.tools import tool

@tool
def calculator(expression: str) -> str:
    """Calculate mathematical expressions."""
    return str(eval(expression))

# Add tools dynamically
agent = SimpleAgentV3(
    name="math_assistant",
    tools=[calculator],
    force_tool_use=True  # Forces tool usage when available
)

# Tools trigger recompilation automatically
agent.add_tool(another_tool)  # Graph rebuilds!

Hooks System

# Add hooks using decorators
@agent.before_run
def log_input(context):
    print(f"Input: {context.input_data}")

@agent.after_run
def log_output(context):
    print(f"Output: {context.output_data}")

@agent.on_error
def handle_error(context):
    print(f"Error: {context.error}")

# Execute with hook monitoring
result = await agent.arun("Calculate 15 * 23")

Read the full file on GitHub · 463 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 463 lines · 0 tokens per session scan A b3ca6954f116

Subscribe to this mod's changes

enhanced_agents_guide_2025 is an agent published in the GitHub repository pr1m8/haive (23 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,612 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.