Framework Integrations
H2C is plain text, so a framework can pass its blocks through prompts, messages or tool calls. No framework-specific adapter is required.
Frameworks that can use H2C
LangGraph
Have a node return H2C blocks, then pass them to a downstream parser. The blocks can carry typed state between nodes.
AutoGen
Use H2C blocks as structured agent messages. Revision and cycle fields make workflow state explicit.
CrewAI
Use H2C blocks as task output. Crew members can pass explicit revisions and cycle information to the next step.
MCP (Model Context Protocol)
Transport H2C blocks via MCP tool calls as structured content. H2C's self-describing blocks are ideal for MCP's tool result format, providing structured, parseable responses that any MCP client can consume.
Semantic Kernel
Use H2C for function result serialization. Instead of returning verbose natural language from SK functions, return H2C blocks that subsequent functions parse deterministically.
OpenAI Agents SDK
H2C as structured output format for agent handoffs. Replace natural language handoff descriptions with typed H2C blocks that include built-in retry counters and revision tracking.
Integration Patterns
System Prompt Injection
Include the H2C grammar in your framework's system prompt. Both your agents and the LLM immediately understand H2C blocks — zero configuration required.
Output Parsing
Parse H2C blocks from agent outputs using simple regex or string matching. The format is designed for deterministic extraction — no LLM call needed to parse.
State Injection
Put cycles, revisions and context in H2C blocks. Pass the text between agents or across framework boundaries.
Transport Agnostic
H2C is plain text and can travel over HTTP, WebSocket, MCP, standard input/output or message queues.
Example: LangGraph Node with H2C
Without H2C
# LangGraph node returns verbose NL
def architect_node(state):
response = llm.invoke(
"Design the architecture..."
)
return {"output": response}
With H2C
# LangGraph node returns H2C blocks
def architect_node(state):
response = llm.invoke(
"Design using H2C format..."
)
# [ARCH:PLAN]\nid:svc|fw:python3.11|...
return {"h2c_block": response}
Same architectural information as a typed block: downstream nodes parse it deterministically instead of interpreting prose.
Integrate H2C Today
No SDK needed. Add the grammar to your system prompt and start using H2C blocks with any framework.