Skip to content

serhaturtis/flowlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flowlib

License: MIT Python Versions

A Python framework for building AI agent systems with provider abstractions, flow-based processing, and knowledge management. Built with async-first design, type safety, and clean architecture patterns.

Features

  • Agent System: Multi-tier memory, planning, learning, and reflection capabilities
  • Provider Abstractions: Unified interface for LLMs, databases, vector stores, and caches
  • Flow Processing: Type-safe async pipelines with @flow and @pipeline decorators
  • Knowledge Management: Plugin system for extensible knowledge sources
  • Tool Calling: Structured tool execution with automatic schema generation
  • Configuration: Auto-discovery system with example configurations

Installation

git clone https://github.com/your-org/AI-Flowlib.git
cd AI-Flowlib
pip install -e .

Quick Start

from flowlib.flows.decorators import flow
from pydantic import BaseModel

class ProcessRequest(BaseModel):
    text: str

class ProcessResult(BaseModel):
    tokens: list[str]
    count: int

@flow(name="text-processor")
async def process_text(request: ProcessRequest) -> ProcessResult:
    tokens = request.text.split()
    return ProcessResult(tokens=tokens, count=len(tokens))

# Execute flow
result = await process_text(ProcessRequest(text="Hello world"))

Applications

The framework includes example applications in flowlib/apps/:

# Interactive REPL with agent capabilities
python flowlib/apps/run_repl.py

# Qt-based configuration GUI
python flowlib/apps/flowlib_config_gui.py

# Example conversational agent
python flowlib/apps/main_agent.py

Configuration

Flowlib automatically creates a ~/.flowlib/ directory with example configurations:

~/.flowlib/
├── active_configs/         # Provider configurations
├── knowledge_plugins/      # Custom knowledge plugins
├── logs/                  # Application logs
└── temp/                  # Temporary files

Example configurations are copied automatically on first import.

Testing

# Run tests
python -m pytest flowlib/tests/

# Run with coverage
python -m pytest flowlib/tests/ --cov=flowlib

Project Structure

flowlib/
├── agent/          # Agent system (memory, planning, learning)
├── apps/           # Example applications
├── core/           # Core framework components
├── flows/          # Flow processing engine
├── providers/      # Provider abstractions (LLM, DB, Vector, etc.)
├── resources/      # Configuration and resource management
├── tools/          # Tool calling system
└── tests/          # Test suite

License

MIT License - see LICENSE file for details.

About

A Python framework for building AI agent systems with provider abstractions, flow-based processing, and knowledge management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors