Skip to main content

MCP-Native Agentic Framework for General-Purpose Task Automation

Project description

Fluxibly

MCP-Native Agentic Framework for General-Purpose Task Automation

Python 3.11+ License: MIT

Fluxibly is a modular, extensible agentic framework with native support for the Model Context Protocol (MCP). It enables developers to create sophisticated AI agents that can interact with external tools and services through MCP servers.

Features

  • MCP-Native Architecture: First-class support for Model Context Protocol servers
  • Flexible Workflow Engine: Execute single tasks or batch operations with ease
  • Stateful Conversations: Maintain context across multiple interactions
  • Profile-Based Configuration: Easy setup with YAML-based configuration profiles
  • Async-First Design: Fully asynchronous API for high performance

Installation

Install Fluxibly using pip:

pip install fluxibly

Or using uv (recommended):

uv add fluxibly

Quick Start

Simple One-Shot Execution

import asyncio
from fluxibly import run_workflow

async def main():
    response = await run_workflow(
        "What is the capital of France?",
        profile="default"
    )
    print(response)

asyncio.run(main())

Using the Workflow Engine

import asyncio
from fluxibly import WorkflowEngine, WorkflowConfig

async def main():
    # Configure the workflow
    config = WorkflowConfig(
        name="my_workflow",
        agent_type="orchestrator",
        profile="default",
        stateful=False
    )

    # Create and initialize engine
    engine = WorkflowEngine(config=config)
    try:
        await engine.initialize()
        response = await engine.execute("Your task here")
        print(response)
    finally:
        await engine.shutdown()

asyncio.run(main())

Batch Processing

import asyncio
from fluxibly import run_batch_workflow

async def main():
    tasks = [
        "Explain async/await in Python",
        "What are Python decorators?",
        "How does the GIL work?"
    ]

    responses = await run_batch_workflow(
        tasks,
        profile="development_assistant"
    )

    for task, response in zip(tasks, responses):
        print(f"Q: {task}")
        print(f"A: {response}\n")

asyncio.run(main())

Configuration

Fluxibly uses YAML-based configuration profiles. You can use built-in profiles or create custom ones.

Using Custom Profile Files

You can load profiles from custom file paths:

# Load by absolute path
engine = WorkflowEngine.from_profile("/path/to/my_profile.yaml")

# Load by relative path
engine = WorkflowEngine.from_profile("../custom_profiles/special.yaml")

# Also works with convenience functions
response = await run_workflow(
    "Your task",
    profile="/path/to/my_profile.yaml"
)

Configuring Custom MCP Server Paths

You can specify custom paths for MCP server configurations:

from fluxibly import WorkflowConfig, WorkflowEngine

# Option 1: Absolute path to MCP config
config = WorkflowConfig(
    name="my_workflow",
    profile="default",
    mcp_config_path="/path/to/my_mcp_servers.yaml"
)

engine = WorkflowEngine(config=config)
await engine.initialize()

# Option 2: Relative path (relative to config_dir)
config = WorkflowConfig(
    name="my_workflow",
    profile="default",
    mcp_config_path="custom/mcp_servers.yaml",  # Relative to config_dir
    config_dir="/path/to/configs"
)

# Option 3: With WorkflowSession
from fluxibly import WorkflowSession

config = WorkflowConfig(
    name="custom_workflow",
    profile="default",
    mcp_config_path="/absolute/path/to/mcp_servers.yaml"
)

async with WorkflowSession(config=config) as session:
    response = await session.execute("Your task")

Profile Format

Here's an example profile structure:

name: default
description: Default configuration profile

llm:
  provider: anthropic
  model: claude-sonnet-4-5-20250929
  temperature: 0.7
  max_tokens: 4096

mcp:
  enabled: true
  servers_config: config/mcp_servers.yaml

MCP Server Integration

Fluxibly provides seamless integration with MCP servers. Configure your MCP servers in config/mcp_servers.yaml:

servers:
  filesystem:
    command: npx
    args:
      - -y
      - "@modelcontextprotocol/server-filesystem"
      - "/path/to/allowed/directory"
    env:
      NODE_OPTIONS: "--max-old-space-size=4096"

Then use the MCP client manager in your code:

from fluxibly import MCPClientManager

async def main():
    manager = MCPClientManager()
    await manager.initialize()

    # MCP tools are now available to your agents
    # ...

    await manager.cleanup()

Advanced Features

Stateful Conversations

config = WorkflowConfig(
    name="stateful_workflow",
    agent_type="agent",
    profile="default",
    stateful=True  # Enable state persistence
)

engine = WorkflowEngine(config=config)
await engine.initialize()

# First interaction
response1 = await engine.execute("My name is Alice")

# Context is preserved
response2 = await engine.execute("What's my name?")
# Response will remember "Alice"

Development

Setting Up Development Environment

# Clone the repository
git clone https://github.com/Lavaflux/fluxibly.git
cd fluxibly

# Install dependencies
uv sync

# Run tests
uv run --frozen pytest

# Format code
uv run --frozen ruff format .

# Type checking
uv run --frozen pyright

Requirements

  • Python 3.11 or higher
  • API keys for LLM providers (e.g., Anthropic, OpenAI)
  • Optional: Node.js for MCP server support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Links

Acknowledgments

Built with:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fluxibly-0.2.2.tar.gz (425.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fluxibly-0.2.2-py3-none-any.whl (77.8 kB view details)

Uploaded Python 3

File details

Details for the file fluxibly-0.2.2.tar.gz.

File metadata

  • Download URL: fluxibly-0.2.2.tar.gz
  • Upload date:
  • Size: 425.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for fluxibly-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0fe75a9ef63ecd23b7cf6f7272632e222bb517bff7c8b100b0339c47fa218f3b
MD5 fbf60534634a89f3f363b9430f4115be
BLAKE2b-256 1a952e9fba573116f708e7358fceb1cec73beca1e1e13515255853cb10d90028

See more details on using hashes here.

File details

Details for the file fluxibly-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: fluxibly-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 77.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for fluxibly-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e2a21561fcb6c48f0745be5ad03ee9519304fc1ad466e637dd3ff16fdc2b2bd
MD5 3c8727ca0e33cff9a6a11629bb7e002b
BLAKE2b-256 983a57e6c901b43224ae150e02548f812b3f3bd8186d2f496609aebed591ff63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page