Agents & LLM¶
Nine components providing agent interfaces for Claude, OpenAI, LangChain, LangGraph, AutoGen, smolagents, and expert systems — a multi-provider agent layer.
Overview¶
G6 does not lock into a single LLM provider or agent framework. This cluster provides standardized AIBlock wrappers for multiple agent backends.
agent_claude (Beta) is the most mature implementation: Anthropic SDK, tool calling, autonomous infer_loop() (call → observe → execute → repeat), retry policy, circuit breaker, and lifecycle management. It is the recommended backend for production use.
The remaining wrappers (agent_openai, agent_langchain, agent_langgraph, agent_autogen, agent_smolagents) provide basic single-shot inference through their respective SDKs but do not yet support autonomous tool-use loops. agent_nanoclaw and agent_openclaw are constrained-environment agent/control-plane components (Ollama/OpenRouter only — no Anthropic backend per TOS). NanoClaw's MCP tools currently persist coordination records locally unless a real NanoClaw runtime backend is configured, so task, sandbox, and skill operations should not be treated as completed runtime execution from success=True alone. adapt_experta wraps the Experta rule engine for symbolic reasoning.
Components¶
| Component | Description | MCP Tools |
|---|---|---|
| agent_claude | Anthropic Claude agent with tools and streaming | -- |
| agent_openai | OpenAI agent wrapper | -- |
| agent_langchain | LangChain agent integration | -- |
| agent_langgraph | LangGraph stateful agent workflows | -- |
| agent_autogen | Microsoft AutoGen multi-agent conversations | -- |
| agent_smolagents | HuggingFace smolagents lightweight agents | -- |
| agent_nanoclaw | Control-plane coordination ledger for constrained NanoClaw environments; runtime execution requires a configured backend | -- |
| agent_openclaw | Open-source agent abstraction | -- |
| adapt_experta | Experta rule engine for expert systems | -- |
Architecture¶
graph TD
LLM[llm_router] --> CLAUDE[agent_claude]
LLM --> OPENAI[agent_openai]
LLM --> LC[agent_langchain]
LC --> LG[agent_langgraph]
LLM --> AG[agent_autogen]
LLM --> SM[agent_smolagents]
LLM --> NANO[agent_nanoclaw]
LLM --> OPEN[agent_openclaw]
EXP[adapt_experta] --> CORE[core.AIBlock]
CLAUDE --> TOOLS[Tool Specifications]
OPENAI --> TOOLS Key Patterns¶
Uniform Agent Interface. All agent components accept AgentInput (messages, optional tools, optional config) and return AgentOutput (response text, tool calls, usage info). This lets higher-level orchestrators swap providers without changing calling code.
Mock-Based Testing. Agent tests mock the SDK client rather than making real API calls. For agent_claude, the pattern is patch("mvp.agent_claude.claude_block.anthropic", mock_anthropic). This isolates tests from network dependencies and API key requirements.
Expert System Bridge. adapt_experta provides a different reasoning paradigm -- forward-chaining rule engines rather than LLM inference. This is valuable for domains with well-defined rules (compliance, medical protocols) where deterministic reasoning is preferred over probabilistic generation. For non-developer users, it should be surfaced through templates or natural-language extraction; asking first-time users to hand-author fact schemas and rule objects undermines the under-10-minute onboarding goal.
Related Clusters¶
- Core Infrastructure -- llm_router provides the model access layer
- Goal & Planning -- agents execute leaf tasks in goal trees
- Experience & Autonomy -- experience loops coordinate agent execution
- Job Agents -- job agents build on these agent primitives