Building AI Agents with IterableData
Canonical guide for integrating IterableData with LLM agents, IDEs, and automation.
Quick start
from iterable.tools import detect_format, read_sample, infer_schema
# Uniform JSON envelopes
fmt = detect_format("data.csv")
rows = read_sample("data.csv", n=10, redact=True)
sch = infer_schema("data.csv")
Install extras as needed:
pip install iterabledata[ai] # documentation generation
pip install iterabledata[langchain] # LangChain StructuredTools
pip install iterabledata[mcp] # MCP server (iterable-mcp)
Layers
iterable.tools— stable tool functions withok/data/errorenvelopesiterable.tools.schemas— OpenAI, Anthropic, and JSON Schema exportsiterable.catalog— format metadata for routing (describe_format("xml"))iterable.ai.context—sample_for_llm,redact_for_llmbefore cloud APIsiterable-mcp— stdio MCP server for Cursor / Claude Desktop
OpenAI function calling
from iterable.tools import schemas
functions = schemas.to_openai_functions()
# Pass to client.chat.completions.create(..., tools=functions)
result = schemas.call_tool("read_sample", {"path": "data.csv", "n": 5})
See examples/ai/openai_function_calling.py.
Anthropic tools
tools = schemas.to_anthropic_tools()
result = schemas.call_tool("infer_schema", {"path": "data.csv"})
See examples/ai/anthropic_tools.py.
LangChain
from iterable.tools.langchain import get_tools
MCP (Cursor, Claude Desktop)
Configure MCP to run iterable-mcp after pip install iterabledata[mcp].
See MCP.md.
Safety
- Use
read_sample+redact_for_llmbefore sending data to cloud LLMs convert_filerequiresconfirm=Trueto write files- Do not
exec()LLM-generated code; use explicitpipeline()transforms
Further reading
- API: Agent Tools
- API: Catalog
- API: AI
- AI Frameworks · OpenAI · Claude · Gemini
- llms.txt — machine index