Hugin
A framework for building agents with a focus on longer running, creative, reasoning tasks.
State Machine Architecture
The progression of an agent is managed by a state machine. Every step is a state on a stack. Easily replay, step-through, branch, and debug your agent's reasoning.
Multi-Agent Native
Built-in support for parallel agents, synchronous and asynchronous agent-to-agent communication and shared state with namespaces.
Branching
Support for roll-outs and parallel reasoning traces using branching. Every branch is an isolated state machine with a shared history.
Short- and Long-term Memory
Long-term memory across sessions through artifacts with quality ratings and feedback. Short-term memory through the stack and dynamic context rendering.
Human-in-the-Loop
Built-in agent-human interactions enabling agents to prompt and interact with humans and for humans to provide unprompted input and guidance.
Session Persistence
Full execution history saved to disk. Replay from any state, resume interrupted runs, inspect past decisions.
Visual Debugging
Real-time web monitor with inter-agent communication arrows, zoom and pan on flowcharts, config transition history, and full rewind capability.
Dynamic Configuration
Agents change behavior mid-execution. Config state machines swap tools, templates, and models based on triggers like tool calls, patterns, or step counts.
Simple Configuration
YAML-based configs for agents, tasks, and tools. Python for custom tool implementations.
Task Pipelines
Chain tasks together into multi-stage pipelines. Each stage passes its results to the next, enabling complex workflows from simple building blocks.
Structured Parameters
Typed, validated task parameters with descriptions, defaults, and required flags. The CLI auto-generates prompts with type hints from your parameter definitions.
Batteries Included
Built-in tools, multiple LLM providers (Anthropic, OpenAI, Ollama with remote support), wait conditions for paced execution, and an interactive CLI to create agents in seconds.
See It In Action
Some fun examples of apps built with Hugin.
The Hugins
AI creatures exploring, crafting, and planning in an isometric world.
Rap Machine
Multi-agent rap battles with AI rappers and judges.
Explore more examples and demo apps.
Getting Started Quickly
Install Hugin and let the agent builder guide you through creating your first agent.
# Install Hugin
pip install gimle-hugin
# Create and run your first agent
hugin create
Or create one manually:
# my_agent/configs/my_agent.yaml
name: my_agent
system_template: my_agent
llm_model: haiku-latest
tools:
- builtins.finish:finish
# my_agent/templates/my_agent.yaml
name: my_agent
template: |
You are an expert data analyst.
Your task is to analyze the data and provide insights.
# my_agent/tasks/my_task.yaml
name: my_task
parameters:
data:
type: string
description: The data to analyze
required: true
prompt: "Analyze the data and provide insights: {{ data.value }}"
hugin run --task my_task --task-path ./my_agent