Skip to main content

Table of Contents

Module spoon_ai.graph.builder

Declarative builders and helpers for SpoonAI graphs.

Intent Objects​

@dataclass
class Intent()

Result of intent analysis.

IntentAnalyzer Objects​

class IntentAnalyzer()

LLM-powered intent analyzer.

Core stays generic; concrete prompts/parsers are supplied by callers.

AdaptiveStateBuilder Objects​

class AdaptiveStateBuilder()

Construct initial graph state using query intent and optional parameters.

ParameterInferenceEngine Objects​

class ParameterInferenceEngine()

LLM delegator for parameter extraction.

Core keeps this generic; applications provide formatting/parsing via options.

NodeSpec Objects​

@dataclass
class NodeSpec()

Declarative node specification.

EdgeSpec Objects​

@dataclass
class EdgeSpec()

Declarative edge specification.

end​

target name or callable router

ParallelGroupSpec Objects​

@dataclass
class ParallelGroupSpec()

Parallel group specification.

GraphTemplate Objects​

@dataclass
class GraphTemplate()

Complete declarative template for a graph.

DeclarativeGraphBuilder Objects​

class DeclarativeGraphBuilder()

Build StateGraph instances from declarative templates.

NodePlugin Objects​

class NodePlugin()

Pluggable node provider.

NodePluginSystem Objects​

class NodePluginSystem()

Registry and discovery for node plugins.

HighLevelGraphAPI Objects​

class HighLevelGraphAPI()

Convenience facade for building graphs per query.