Skip to main content

Flyto2 Pro Core

PyPI Python License Website

Open-source foundation for Flyto2 commercial-grade automation: workflow contract validation, deterministic agent runtime, budget and token metering, provider interfaces, project state, and evidence-backed verification.

Use Flyto2 Pro Core when you need bring-your-own LLM providers, Qdrant/OpenAI integrations, budget enforcement, deterministic workflow validation, or a clean boundary between Apache-2.0 runtime primitives and private enterprise modules.

Official links: flyto2.com · Docs · Flyto2 Core · Flyto2 Indexer · Security

What's Inside

Module Purpose Reference
contract Workflow models, validation, binding resolution, registry, and compilation Contract engine
cost Cost, token, tool-call, and iteration budgets Cost control
interfaces LLM, embedding, storage, vector, and quality ports plus optional providers Provider interfaces
agent_runtime Contracts, evidence, observations, project state, intervention, EMS, and UI data Agent runtime
factory Recipe selection and deterministic workflow composition Factory pipeline
core Dependency injection, safe access, and validation helpers Core utilities
config Environment-backed settings, constants, and timeouts Configuration

Install

pip install flyto-pro-core

With optional providers:

pip install flyto-pro-core[openai]    # OpenAI LLM + embeddings
pip install flyto-pro-core[qdrant]    # Qdrant vector store
pip install flyto-pro-core[core]      # Flyto2 Core module catalog
pip install flyto-pro-core[factory]   # Blueprint composition + OpenAI fallback
pip install flyto-pro-core[full]      # All providers

Usage

Contract Engine — Validate Workflows

from flyto_pro_core.contract.engine import ContractEngine

engine = ContractEngine()
await engine.initialize()  # loads module catalog from flyto-core

report = await engine.validate_workflow(spec)
if not report.valid:
    for issue in report.issues:
        print(f"  {issue.severity}: {issue.message}")

# Binding resolution
bindings = await engine.get_available_bindings(spec, "node_3")

# Compile to execution plan
plan = await engine.compile(spec)

Cost Controller — Budget Management

from flyto_pro_core.cost.controller import CostController, BudgetConfig

# Per-tier budgets
controller = CostController(budget=BudgetConfig.for_tier("pro"))

# Record usage
controller.record_llm_usage("gpt-4o", prompt_tokens=1000, completion_tokens=500)
controller.record_tool_call()

# Check budget (raises BudgetExceededError if over)
controller.check_budget()

# Summary
print(controller.get_summary())
# {"cost_spent_usd": 0.025, "cost_budget_usd": 1.0, "tokens_used": 1500, ...}

Interfaces — Bring Your Own Provider

from flyto_pro_core.interfaces.llm import ILLMService, LLMResponse
from flyto_pro_core.interfaces.storage import IVectorStoreRepository

# Use built-in OpenAI provider
from flyto_pro_core.interfaces.providers.openai_llm import OpenAILLMService
llm = OpenAILLMService(model="gpt-4o")
response = await llm.generate("Hello")

# Or implement your own
class MyLLM(ILLMService):
    async def generate(self, prompt, **kwargs) -> LLMResponse:
        ...

Agent Runtime — Verification & Project State

from flyto_pro_core.agent_runtime.verification import DeterministicVerifier
from flyto_pro_core.agent_runtime.project import ProjectStateManager

# Deterministic verification (no LLM needed)
verifier = DeterministicVerifier()
report = await verifier.verify(assertions, evidence)

# Project state management
state = ProjectStateManager(project_dir="/path/to/project")
await state.initialize()

DI Container

from flyto_pro_core.core.container import container

# Register services
container.register("llm", my_llm_instance)
container.register_factory("vector_store", lambda: QdrantVectorStore())

# Retrieve
llm = container.get("llm")

Factory - Compose A Workflow

from flyto_blueprint import BlueprintEngine
from flyto_blueprint.storage.memory import MemoryBackend
from flyto_pro_core.factory import generate_v2

blueprints = BlueprintEngine(storage=MemoryBackend())
result = await generate_v2(
    "Fetch an API and save it to a file",
    blueprint_engine=blueprints,
)
if result.ok:
    print(result.steps)
else:
    print(result.error)

Architecture

flyto-pro-core (this package, Apache-2.0)
├── contract/        → WorkflowSpec → ValidationReport → ExecutablePlan
├── cost/            → BudgetConfig → CostController → BudgetExceededError
├── interfaces/      → ILLMService / IVectorStoreRepository / IQualityChecker
│   └── providers/   → OpenAILLMService, QdrantVectorStore (built-in)
├── agent_runtime/   → Verification, Observations, ProjectState, Interventions
├── core/            → ServiceContainer, safe_access, validators
└── config/          → Settings, constants

Relationship to Flyto2 Ecosystem

flyto-pro-core (open source)     flyto-pro (proprietary)
├── contract                      ├── ems (error learning)
├── cost                          ├── evolution (module generation)
├── interfaces                    ├── knowledge (semantic search)
├── agent_runtime                 ├── agent (AI agent core)
├── core                          ├── guardian (safety)
└── config                        └── enterprise runtime extensions
         │                                    │
         └────────── flyto-ai ────────────────┘
                  (open source)
                  ProBridge connects both layers
  • Free users: flyto-ai + flyto-pro-core = full contract validation, cost control, agent runtime
  • Pro users: + flyto-pro = EMS error learning, module evolution, semantic knowledge search

Requirements

  • Python 3.10+
  • pydantic >= 2.0.0
  • pyyaml >= 6.0

Optional:

  • openai >= 1.0.0 (for OpenAI provider)
  • qdrant-client >= 1.7.0 (for Qdrant provider)
  • flyto-core >= 2.26.9, < 3 (for contract catalog loading)
  • flyto-blueprint >= 0.2.1, < 0.3 (for Factory composition)

API Reference

The generated Python API reference inventories all 923 public classes, functions, and methods with signatures, purposes, and source links. Domain guides explain contracts and operational boundaries: contract engine, agent runtime, cost control, providers, and Factory.

Configuration

Start with Configuration and the generated environment reference. .env.example contains safe examples for every literal environment-variable read; credentials remain blank.

Testing

python -m pytest
python -m ruff check .
python scripts/generate-api-reference.py --check
python scripts/generate-config-reference.py --check
python scripts/check-documentation.py
python -m build

The verification boundary and optional live-service exclusions are mapped in Features and Testing.

Contributing

Pull requests are welcome for contract validation, budget controls, provider interfaces, deterministic verification, docs, and examples. Security reports should go to security@flyto2.com.

License

Apache License 2.0 — see LICENSE.

Metadata

Release files for flyto-pro-core 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flyto-pro-core 0.1.3
File Size Uploaded
flyto_pro_core-0.1.3.tar.gz 248.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flyto-pro-core 0.1.3
File Interpreter ABI Platform
flyto_pro_core-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 475.0 kB

Release files / flyto_pro_core-0.1.3.tar.gz

Download URL flyto_pro_core-0.1.3.tar.gz
Size 248.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6bfa50f98c419879a00d7d01485ff5a100b9ea3219d00534a6ce8fb0652d2797
BLAKE2b-256 checksum
How to use checksums
82b83fd2862441b89f5d70ae2b6760e5d3ead754a02b77f0d2c7ea8dfcfb4c0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.

Transparency log

Release files / flyto_pro_core-0.1.3-py3-none-any.whl

Download URL flyto_pro_core-0.1.3-py3-none-any.whl
Size 226.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a12498661d961a505a1cc9446104c7d892fa6f2df97828d6386f1666be6933f9
BLAKE2b-256 checksum
How to use checksums
d16f6f8a2907d9a346318cb1c0f2491cdbd72708b5ae649973707bb05847169c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page