Metadata-Version: 2.4
Name: flyto-core
Version: 2.32.1
Summary: The open-source execution engine for AI agents. 480 modules, MCP-native, triggers, queue, versioning, metering.
Author-email: Flyto2 Team <team@flyto2.com>
Maintainer-email: Flyto2 Team <team@flyto2.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://flyto2.com
Project-URL: Documentation, https://docs.flyto2.com
Project-URL: Repository, https://github.com/flytohub/flyto-core
Project-URL: Issues, https://github.com/flytohub/flyto-core/issues
Project-URL: Changelog, https://github.com/flytohub/flyto-core/blob/main/CHANGELOG.md
Project-URL: Security, https://github.com/flytohub/flyto-core/blob/main/SECURITY.md
Project-URL: Blog, https://blog.flyto2.com/posts/ai-workflow-automation-alternatives
Project-URL: Examples, https://docs.flyto2.com/guide/first-workflow
Project-URL: Download, https://flyto2.com/download.html
Keywords: automation,workflow,mcp,mcp-server,ai-agents,ai-agent-framework,open-source-ai,browser-automation,web-scraping,playwright,rpa,atomic-modules,workflow-engine
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Framework :: AsyncIO
Classifier: Framework :: Pydantic :: 2
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pyyaml<7,>=6.0.3
Requires-Dist: aiohttp<4,>=3.14.3
Requires-Dist: beautifulsoup4<5,>=4.15.0
Requires-Dist: lxml<7,>=6.1.1
Requires-Dist: pydantic<3,>=2.13.4
Requires-Dist: python-dotenv<2,>=1.2.2
Requires-Dist: aiofiles<25,>=23.2.1
Requires-Dist: regex<2027,>=2024.4.16
Provides-Extra: browser
Requires-Dist: playwright<2,>=1.51.0; extra == "browser"
Provides-Extra: api
Requires-Dist: fastapi<1,>=0.139.0; extra == "api"
Requires-Dist: starlette<2,>=1.3.1; extra == "api"
Requires-Dist: uvicorn<1,>=0.52.0; extra == "api"
Provides-Extra: vector
Requires-Dist: qdrant-client<2,>=1.9.0; extra == "vector"
Requires-Dist: sentence-transformers<6,>=2.7.0; extra == "vector"
Requires-Dist: requests<3,>=2.34.2; extra == "vector"
Provides-Extra: image
Requires-Dist: qrcode[pil]<9,>=7.0; extra == "image"
Requires-Dist: Pillow<13,>=11.3.0; extra == "image"
Provides-Extra: crypto
Requires-Dist: cryptography<49,>=48.0.1; extra == "crypto"
Requires-Dist: PyJWT<3,>=2.13.0; extra == "crypto"
Provides-Extra: dns
Requires-Dist: dnspython<3,>=2.8.0; extra == "dns"
Provides-Extra: ai
Requires-Dist: openai<3,>=1.109.1; extra == "ai"
Requires-Dist: httpx<1,>=0.27; extra == "ai"
Provides-Extra: telegram
Requires-Dist: python-telegram-bot<23,>=22.8; extra == "telegram"
Provides-Extra: jsast
Requires-Dist: tree-sitter<1,>=0.26.0; extra == "jsast"
Requires-Dist: tree-sitter-javascript<1,>=0.23; extra == "jsast"
Requires-Dist: jsbeautifier<3,>=2.0.3; extra == "jsast"
Provides-Extra: cloud
Requires-Dist: flyto-core[browser,image]; extra == "cloud"
Provides-Extra: verification
Requires-Dist: flyto-core[api,browser]; extra == "verification"
Requires-Dist: asyncpg<0.32,>=0.31.0; extra == "verification"
Provides-Extra: all
Requires-Dist: flyto-core[ai,api,browser,crypto,dns,image,jsast,telegram,vector,verification]; extra == "all"
Provides-Extra: dev
Requires-Dist: flyto-core[api]; extra == "dev"
Requires-Dist: httpx2<3,>=2.7.0; extra == "dev"
Requires-Dist: pytest>=9.0.3; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: Pillow>=11.3.0; extra == "dev"
Requires-Dist: cryptography<49,>=48.0.1; extra == "dev"
Requires-Dist: PyJWT<3,>=2.13.0; extra == "dev"
Requires-Dist: dnspython<3,>=2.8.0; extra == "dev"
Requires-Dist: openai<3,>=1.109.1; extra == "dev"
Requires-Dist: tree-sitter<1,>=0.26.0; extra == "dev"
Requires-Dist: tree-sitter-javascript<1,>=0.23; extra == "dev"
Requires-Dist: jsbeautifier<3,>=2.0.3; extra == "dev"
Requires-Dist: black>=25.12.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.20.2; extra == "dev"
Requires-Dist: build>=1.5.0; extra == "dev"
Requires-Dist: pip-tools<8,>=7.5; extra == "dev"
Requires-Dist: pip-audit<3,>=2.10.1; extra == "dev"
Requires-Dist: twine>=4.0.2; extra == "dev"
Dynamic: license-file

# Flyto2 Core

**AI said it finished. Flyto2 shows the proof.**

A Python execution engine for AI agents. It runs browser and API work as
explicit steps, records what every step did, and replays from the step that
failed — instead of re-running the whole job.

The current public inventory is **480 registry-backed modules** across **88
catalog categories**, including triggers, queue modules, workflow versioning,
metering hooks, browser automation, API calls, data transforms, verification,
files, and crypto.

[![PyPI version](https://img.shields.io/pypi/v/flyto-core.svg)](https://pypi.org/project/flyto-core/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)

<!-- mcp-name: io.github.flytohub/flyto-core -->

[flyto2.com](https://flyto2.com) · [Cloud Automation](https://flyto2.com/cloud/) · [Documentation](https://docs.flyto2.com) · [MCP Docs](https://docs.flyto2.com/mcp/) · [YouTube](https://www.youtube.com/@Flyto2)

<p align="center">
  <img src="demo/flyto-core-demo.gif" alt="flyto-core demo: API pipeline → replay → browser automation" width="720">
</p>

---

## Try it in 30 seconds

```bash
pip install flyto-core[browser] && playwright install chromium
flyto recipe competitor-intel --url https://github.com/pricing
```

```
  Step  1/12  browser.launch         ✓      420ms
  Step  2/12  browser.goto           ✓    1,203ms
  Step  3/12  browser.evaluate       ✓       89ms
  Step  4/12  browser.screenshot     ✓    1,847ms  → saved intel-desktop.png
  Step  5/12  browser.viewport       ✓       12ms  → 390×844
  Step  6/12  browser.screenshot     ✓    1,621ms  → saved intel-mobile.png
  Step  7/12  browser.viewport       ✓        8ms  → 1280×720
  Step  8/12  browser.performance    ✓    5,012ms  → Web Vitals captured
  Step  9/12  browser.evaluate       ✓       45ms
  Step 10/12  browser.evaluate       ✓       11ms
  Step 11/12  file.write             ✓        3ms  → saved intel-report.json
  Step 12/12  browser.close          ✓       67ms

  ✓ Done in 10.3s — 12/12 steps passed
```

Screenshots captured. Performance metrics extracted. JSON report saved. **Every step traced.**

---

## What happens when step 8 fails?

With a shell script you re-run the whole thing. With flyto-core:

```bash
flyto replay --from-step 8
```

Steps 1–7 are instant. Only step 8 re-executes. Full context preserved.

---

## How is this different?

| | Playwright / Selenium | Shell scripts | flyto-core |
|-|----------------------|---------------|------------|
| Step 8 fails | Re-run everything | Re-run everything | `flyto replay --from-step 8` |
| What happened at step 3? | Add print(), re-run | Add echo, re-run | Full trace: input, output, timing |
| Browser + API + file I/O | Write glue code | 3 languages | All built-in |
| Share with team | "Clone my repo" | "Clone my repo" | `pip install flyto-core` |
| Run in CI | Wrap in pytest/bash | Fragile | `flyto run workflow.yaml` |

---

## 3 recipes to try now

```bash
# Competitive pricing: screenshots + Web Vitals + JSON report
flyto recipe competitor-intel --url https://competitor.com/pricing

# Full site audit: SEO + accessibility + performance
flyto recipe full-audit --url https://your-site.com

# Web scraping → CSV export
flyto recipe scrape-to-csv --url https://news.ycombinator.com --selector ".titleline a"
```

Every recipe is traced. Every run is replayable. [See all 41 recipes ->](docs/RECIPES.md)

---

## Install

```bash
pip install flyto-core            # Core engine + CLI + MCP server
pip install flyto-core[browser]   # + browser automation (Playwright)
playwright install chromium        # one-time browser setup
```

---

## Write Your Own Workflows

Recipes are just YAML files. Write your own:

```yaml
name: price-monitor
steps:
  - id: open
    module: browser.launch
    params: { headless: true }

  - id: page
    module: browser.goto
    params: { url: "https://competitor.com/pricing" }

  - id: prices
    module: browser.evaluate
    params:
      script: |
        JSON.stringify([...document.querySelectorAll('.price')].map(e => e.textContent))

  - id: save
    module: file.write
    params: { path: "prices.json", content: "${prices.result}" }

  - id: close
    module: browser.close
```

```bash
flyto run price-monitor.yaml
```

Every run produces an execution trace and state snapshots. If step 3 fails, replay from step 3 — no re-running the whole thing.

---

## Usage

<details>
<summary><b>CLI</b> — run workflows from the terminal</summary>

```bash
# Run a built-in recipe
flyto recipe site-audit --url https://example.com

# Run your own YAML workflow
flyto run my-workflow.yaml

# List all recipes
flyto recipes
```

</details>

<details>
<summary><b>MCP Server</b> — for Claude Code, Cursor, Windsurf</summary>

```bash
pip install flyto-core
claude mcp add flyto-core -- python -m core.mcp_server
```

Or add to your MCP config:
```json
{
  "mcpServers": {
    "flyto-core": {
      "command": "python",
      "args": ["-m", "core.mcp_server"]
    }
  }
}
```

Your AI gets all 480 modules as tools.

</details>

<details>
<summary><b>HTTP API</b> — for integrations and remote execution</summary>

```bash
pip install flyto-core[api]
flyto serve
# ✓ flyto-core running on 127.0.0.1:8333
```

| Endpoint | Purpose |
|----------|---------|
| `POST /v1/workflow/run` | Execute workflow with evidence + trace |
| `POST /v1/workflow/{id}/replay/{step}` | Replay from any step |
| `POST /v1/execute` | Execute a single module |
| `GET /v1/modules` | Discover all modules |
| `POST /mcp` | MCP Streamable HTTP transport |

</details>

<details>
<summary><b>Python API</b> — for programmatic use</summary>

```python
import asyncio
from core.modules.registry import ModuleRegistry

async def main():
    result = await ModuleRegistry.execute(
        "string.reverse",
        params={"text": "Hello"},
        context={}
    )
    print(result)  # {"ok": True, "data": {"result": "olleH"}}

asyncio.run(main())
```

</details>

---

## 480 Modules, 88 Catalog Categories

| Category | Count | Examples |
|----------|-------|----------|
| `browser.*` | 54 | launch, goto, click, evaluate, screenshot, performance, challenge |
| `flow.*` | 24 | switch, loop, branch, parallel, retry, circuit breaker, rate limit |
| `array.*` | 15 | filter, sort, map, reduce, unique, chunk, flatten |
| `api.*` | 13 | OpenAI, Anthropic, Gemini, Notion, Slack, Telegram |
| `data.*` | 13 | JSON, YAML, CSV, XML parse/generate/convert |
| `string.*` | 11 | reverse, uppercase, split, replace, trim, slugify, template |
| `ai.*` | 10 | chat, model calls, vision, embeddings, moderation |
| `object.*` | 10 | keys, values, merge, pick, omit, get, set, flatten |
| `testing.*` | 10 | assertions, scenarios, E2E steps, reports |
| `image.*` | 9 | resize, convert, crop, rotate, watermark, OCR, compress |
| `verify.*` | 9 | evidence, visual diff, rulesets, annotations |
| `file.*` | 8 | read, write, copy, move, delete, exists, edit, diff |
| `stats.*` | 8 | mean, median, percentile, correlation, standard deviation |
| `test.*` | 8 | API, browser, and visual checks |
| `check.*` | 7 | validation and guard checks |
| `crypto.*` | 7 | AES encrypt/decrypt, JWT create/verify, hashes |
| `http.*` | 7 | get, request, batch, paginate, session |
| `validate.*` | 7 | email, url, json, phone, credit card |
| 66 more prefixes | 221 | Docker, archive, math, k8s, network, PDF, AWS, cache, git |

See the **[Full Module Catalog](docs/TOOL_CATALOG.md)** for every module, parameter, and description.

---

## Engine Features

- **Execution Trace** — structured record of every step: input, output, timing, status
- **Replay** — re-execute from any step with the original (or modified) context
- **Breakpoints** — pause execution at any step, inspect state, resume
- **Evidence Snapshots** — full state before and after each step boundary
- **Data Lineage** — track data flow across steps, build dependency graphs
- **Timeout Guard** — configurable workflow-level and per-step timeout protection

---

## Architecture

CLI, MCP, HTTP, Python, and packaged recipes converge on the same workflow
engine, module registry, policy, trace, evidence, and replay boundaries. Start
with the [Technical Whitepaper](docs/WHITEPAPER.md), then use the
[Architecture Map](docs/architecture-map.md) and exhaustive
[source reference](docs/reference/README.md) for implementation detail.

The shared [product contract](flyto-product.toml), `flyto.product-contract.v1`,
defines the Flyto2 promise: Turn AI work into verified, replayable procedures.

| Package | Responsibility |
|---|---|
| `flyto-ai` | Understand, route, and govern new work and provider use. |
| `flyto-blueprint` | Store, learn from, and score reusable procedures; it never executes them. |
| `flyto-core` | Validate schemas, execute and replay deterministically, and emit evidence. |

`flyto-core` is a standalone execution package; it does not require the other
packages to execute a workflow or produce evidence.

---

## Where to go next

| You want to | Go to |
|---|---|
| Run one of the other built-in recipes | [docs/RECIPES.md](docs/RECIPES.md) |
| Browse every module and parameter | [docs/TOOL_CATALOG.md](docs/TOOL_CATALOG.md) |
| See the module categories at a glance | [480 Modules, 88 Catalog Categories](#480-modules-88-catalog-categories) |
| Configure network, filesystem, auth, and permission switches | [docs/CONFIGURATION.md](docs/CONFIGURATION.md) |
| Install a module pack or plugin | [docs/PLUGIN_SDK.md](docs/PLUGIN_SDK.md) |
| Write your own module | [docs/MODULE_SPECIFICATION.md](docs/MODULE_SPECIFICATION.md) |
| Understand why the engine is shaped this way | [docs/WHY.md](docs/WHY.md) |
| Read the product boundary between the three packages | [ARCHITECTURE.md](ARCHITECTURE.md) |

The canonical PyPI and MCP registry description is: The open-source execution engine for AI agents. 480 modules, MCP-native, triggers, queue, versioning, metering.

---

## Contributing

We welcome contributions! See **[CONTRIBUTING.md](CONTRIBUTING.md)** for guidelines.

---

## Testing

```bash
python -m pytest
python -m ruff check .
flyto recipe full-audit --url https://example.com
```

---

## Security

Report security vulnerabilities via **[security@flyto2.com](mailto:security@flyto2.com)**.
See **[SECURITY.md](https://github.com/flytohub/flyto-core/blob/main/SECURITY.md)**
for the security policy and the environment variables that define the filesystem
and outbound-network boundaries.

**[SECURITY_STATUS.md](https://github.com/flytohub/flyto-core/blob/main/SECURITY_STATUS.md)**
lists every published advisory with its severity, affected range, fixed-in
version, and the regression test that covers it. Two boundaries are enforced
registry-wide by tests that fail the build — every module taking a
caller-supplied path must reach the filesystem sandbox helper, and every module
taking a caller-supplied URL or host must reach an SSRF guard — so coverage is a
CI property rather than a convention.

[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/flytohub-flyto-core-badge.png)](https://mseep.ai/app/flytohub-flyto-core)
[![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/9a708224-9666-46b6-8660-dad08fb16096)

---

## License

[Apache License 2.0](LICENSE) — free for personal and commercial use.

---

**[Cloud Automation](https://flyto2.com/cloud/)** · **[Pricing](https://flyto2.com/pricing/)** · **[flyto2.com](https://flyto2.com)**

---

## Hosted deployment

A hosted deployment is available on [Frontier AI](https://fronteir.ai/mcp/flytohub-flyto-core).

---

<sub>Also known as: open source AI agent framework for production workflows · Python AI workflow automation with Playwright · MCP server automation with trace and replay · browser automation that can resume from a failed step</sub>
