Skip to main content

Agloom

Production-grade Python agent harness that automatically classifies tasks, optimizes execution, and scales orchestration across eight specialized topologies.

Agloom is a production-grade Python agent harness that automatically classifies tasks, optimizes execution, and scales orchestration from lightweight DIRECT execution to eight specialized LangGraph topologies for efficient, reliable agent workloads.

Documentation | Why Agloom? | Quickstart | Examples | API reference | Agent Skills | GitHub

Python 3.12 LangChain 1.x LangGraph 1.2 Apache License 2.0


Building one LLM call is easy. Building an agent that stays predictable when a task needs tools, planning, multiple workers, long context, human approval, remote MCP capabilities, or durable execution is not.

Agloom gives applications one construction API:

from agloom import create_agent

agent = create_agent(model=model, tools=tools)

For each request, Agloom can keep simple work on lightweight DIRECT execution or select one of eight bounded execution topologies when orchestration is useful. Explicit developer configuration always wins.

Agloom provides eight execution topologies plus a direct execution mode. DIRECT is not a topology.

Why teams use Agloom

Agent engineering problem Agloom's answer
Every request pays the cost of a planner or graph Straightforward requests use DIRECT execution
A single workflow becomes a maze of conditional branches Eight topologies provide clear, reusable execution semantics
Automatic routing plans work the agent cannot perform Selection uses the actual tool and capability inventory
Local tools, application services, and MCP become separate systems One policy-aware capability catalog routes all three
Recursive and multi-agent work grows without bounds Explicit depth, task, worker, topology, and time limits
Pause, resume, streaming, and cancellation are added ad hoc LangGraph-native runtime controls are available through the agent
Model, tool, and graph activity is difficult to connect Structured events, Prometheus, Grafana, Langfuse, and langgraph-xai
Typed responses require custom parsing and repair xstructured validates and repairs structured output

Quickstart

Install Agloom and your model provider:

uv add agloom langchain-openai

Or with pip:

python -m pip install agloom langchain-openai

Create an agent with a real LangChain model and tool:

import os

from agloom import create_agent
from langchain_core.tools import tool
from langchain_openai import ChatOpenAI


@tool
def multiply(left: int, right: int) -> int:
    """Multiply two integers."""
    return left * right


model = ChatOpenAI(
    model=os.getenv("OPENAI_MODEL", "gpt-4.1-mini"),
    api_key=os.environ["OPENAI_API_KEY"],
)

agent = create_agent(model=model, tools=[multiply])
response = agent.invoke("Use multiply to calculate 17 times 23.")

print(response.content)

Representative result:

17 × 23 = 391.

The executable repository example also asserts that multiply(17, 23) is called exactly once and that the semantic answer contains 391.

Automatic when useful, explicit when required

# Agloom may select DIRECT or any of the eight topologies.
automatic = create_agent(model=model, tools=tools)

# One explicit topology bypasses automatic selection.
planner = create_agent(
    model=model,
    tools=tools,
    pattern="planner",
)

# An allow-list constrains selection to one of these candidates.
constrained = create_agent(
    model=model,
    tools=tools,
    pattern=["planner", "supervisor"],
)

An allow-list is not a composition. Use the Hybrid topology explicitly when a task should pass through multiple child topologies:

hybrid = create_agent(
    model=model,
    tools=tools,
    pattern="hybrid",
    composition=["react", "reflection"],
)

Eight topologies, one runtime

Topology Best suited for
ReAct Reasoning with tool calls and observations
Supervisor Routing work across a finite set of specialist workers
Pipeline Ordered stages with explicit result propagation
Planner Decomposing a task into bounded subtasks and aggregating results
Reflection Drafting, evaluating, and revising an answer
Swarm Bounded handoffs between peer workers
Blackboard Collaboration through a versioned shared workspace
Hybrid Explicit composition of two to four non-Hybrid topologies

Every topology shares the same lifecycle, events, capability routing, checkpoint integration, streaming surface, and recursion policy.

One capability catalog

Agloom treats capabilities as independent from topology:

Local LangChain tools ─┐
Application services ──┼─> policy ─> retrieval ─> reranking ─> selection
MCP capabilities ──────┘
agent = create_agent(
    model=model,
    tools=local_tools,
    capabilities={"document_store": document_store},
    mcp_client=mcp_client,
    mcp_server_name="operations",
    capability_policy=policy,
    capability_embeddings=embeddings,
    capability_retriever=retriever,
    capability_reranker=reranker,
    max_selected_capabilities=12,
)

selection = await agent.aroute_capabilities(
    "Find the deployment guide and current service status."
)
print(selection.names)

Policy filtering runs first. Optional semantic retrieval and reranking then reduce the catalog to the capabilities relevant to the request. If a task requires a capability that is unavailable, Agloom fails explicitly instead of asking the model to pretend.

Production controls without a new abstraction

from agloom import RecursionPolicy

agent = create_agent(
    model=model,
    tools=tools,
    pattern="planner",
    recursion=True,
    recursion_policy=RecursionPolicy(
        max_depth=2,
        max_subtasks=8,
        max_workers=4,
        max_execution_time=120.0,
    ),
    observers=[prometheus, langfuse],
    structured_output_schema=IncidentReport,
)

The same runnable API can provide:

  • synchronous and asynchronous invocation;
  • streaming;
  • cooperative cancellation;
  • bounded recursive child execution;
  • LangGraph checkpointing, interrupts, and human approval;
  • typed structured output;
  • agent-local explainability through agent.xai;
  • lifecycle, model, retriever, and tool telemetry.

Agloom does not require LangSmith, a database, containers, or hosted infrastructure. Applications opt into the infrastructure their capabilities need.

Integrated ecosystem

Agloom installs and integrates these capability packages:

Capability Package
Feedback lifecycle feedback-manager
Behavioral policies behaviorweave
Context management contextsage
MCP discovery and routing mcp-capability-router
Source refresh refresh-engine
Explainability langgraph-xai
Structured output xstructured

Their supported configuration is exposed through create_agent() rather than through a parallel service layer. See the capability guide.

Real examples, not only toy prompts

The repository includes focused scripts for every topology and integration, plus five complete FastAPI/React applications:

Application Demonstrates
Enterprise Knowledge Assistant Retrieval, citations, ingestion, feedback, and observability
QA Customer Chatbot Support tools, operational data, behavioral guardrails, and feedback
RCA Generator Incident evidence, structured analysis, and approval workflows
Web Compliance Auditor Real Playwright, Filesystem, and Everything MCP servers; Ollama embeddings; pgvector
Engineering Change Investigator MCP evidence, engineering records, PostgreSQL/pgvector, durable integration state

examples/24_complete_configuration.py constructs compatible agents that collectively exercise every public create_agent() parameter and fails if a newly added parameter is not demonstrated.

See examples and verified results for executable snippets, semantic assertions, and expected outcomes.

Agent Skills

Agloom publishes one portable Agent Skill for coding agents that integrate, configure, debug, test, or extend the framework:

npx skills add https://github.com/smuniharish/agloom/tree/master/agloom-skills/skills/agloom

The canonical distribution works with Agent Skills-compatible hosts, including Claude Code, Codex, Cursor, and GitHub Copilot. It provides one SKILL.md plus focused architecture, configuration, integration, and troubleshooting references—without maintaining host-specific copies.

Documentation

Compatibility

Agloom targets Python 3.12 and is designed as a production-grade, embeddable framework. It does not require LangSmith, containers, a database, or a hosted control plane.

Author

S Muni Harish
samamuniharish@gmail.com

Agloom is licensed under the Apache License 2.0.

Metadata

Release files for agloom 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agloom 1.0.0
File Size Uploaded
agloom-1.0.0.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for agloom 1.0.0
File Interpreter ABI Platform
agloom-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / agloom-1.0.0.tar.gz

Download URL agloom-1.0.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e0023a48b3d9f7936fd17fcdda32f474bd6b55037e83b982096249143ef94ad4
BLAKE2b-256 checksum
How to use checksums
f6e55d14072c75129e13d0676c30662fbc66d9d64ca7b8decefe3d14bb68da22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / agloom-1.0.0-py3-none-any.whl

Download URL agloom-1.0.0-py3-none-any.whl
Size 57.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47038d56ec447d58de7e602958f59f72a6e87ab9b0c682160bd078cb3e2269e3
BLAKE2b-256 checksum
How to use checksums
288e4992389aa96381b1c22c99e7f82e230d1583a90131585694b00e62f1354e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page