"""Acorn - LLM agent framework with structured I/O.

Acorn is a Python library for building LLM agents with structured inputs and outputs,
heavily influenced by DSPy.
"""

from pathlib import Path

from acorn._version import __version__
from acorn.decorators import tool
from acorn.partial import Partial
from acorn.types import Step, ToolCall, ToolResult, StreamChunk
from acorn.exceptions import AcornError, ParseError, BranchError, ServiceError, ToolConflictError
from acorn.service import Service
from acorn.serialization import pydantic_to_xml, xml_to_pydantic
from acorn.module import Module
from acorn.template import Template

__all__ = [
    "__version__",
    "Module",
    "Template",
    "tool",
    "Partial",
    "Path",
    "Step",
    "ToolCall",
    "ToolResult",
    "StreamChunk",
    "Service",
    "AcornError",
    "ParseError",
    "BranchError",
    "ServiceError",
    "ToolConflictError",
    "pydantic_to_xml",
    "xml_to_pydantic",
]
