Skip to main content
The Fibonacci SDK provides a comprehensive Python API for building, executing, and managing AI workflows. This reference documents all public classes, methods, and configuration options.

Installation

pip install fibonacci-sdk

Core Classes

ClassDescription
WorkflowMain class for defining and executing workflows
FibonacciClientClient for Fibonacci Cloud API
LLMNodeNode for LLM model calls
ToolNodeNode for tool integrations
CriticNodeNode for output evaluation
ConditionalNodeNode for branching logic

Configuration Classes

ClassDescription
MemoryConfigMemory backend configuration
RetryConfigRetry behavior settings
SecureConfigSecurity configuration
KeychainStorageSecure credential storage

Exceptions

ExceptionDescription
FibonacciErrorBase exception class
WorkflowErrorWorkflow-level errors
NodeExecutionErrorNode execution failures
ValidationErrorInput/output validation errors
TimeoutErrorExecution timeout errors

Basic Example

from fibonacci import Workflow, LLMNode

# Create workflow
workflow = Workflow(name="example")

# Add node
analyzer = LLMNode(
    id="analyzer",
    model="claude-sonnet-4-5-20250929",
    prompt="Analyze: {{input.text}}"
)
workflow.add_node(analyzer)

# Execute
result = workflow.execute(inputs={"text": "Hello world"})
print(result["analyzer"])

Async Support

All workflow operations support async/await:
import asyncio
from fibonacci import Workflow

async def main():
    workflow = Workflow.from_yaml("workflow.yaml")
    result = await workflow.execute_async(inputs={"text": "Hello"})
    print(result)

asyncio.run(main())

Type Hints

The SDK is fully typed for IDE support:
from fibonacci import Workflow, LLMNode
from fibonacci.types import WorkflowResult, NodeOutput

workflow: Workflow = Workflow(name="typed")
result: WorkflowResult = workflow.execute(inputs={})

Versioning

The SDK follows semantic versioning:
  • Major: Breaking changes to public API
  • Minor: New features, backwards compatible
  • Patch: Bug fixes, backwards compatible
Check your installed version:
import fibonacci
print(fibonacci.__version__)