Skip to main content

Flowtic

Build agent workflows that actually talk to each other. No complex orchestration, just simple communication patterns that work.

What it does

  • Agent sessions: Each agent keeps its own conversation history (text + images)
  • Tool system: Write functions once, agents use them automatically
  • Communication graph: Tell agents who can talk to whom with simple syntax
  • Callbacks: Hook into conversations for logging, user input, whatever you need

Install

pip install git+https://github.com/PrAsAnNaRePo/Flowtic.git

Quick start

Single agent with tools

from flowtic import Agent, Tool, Tools

def calculate(expression: str):
    return str(eval(expression)), None

calc_tool = Tool(
    tool_definition={
        "type": "function",
        "function": {
            "name": "calculate", 
            "description": "Calculate math expressions",
            "parameters": {
                "type": "object",
                "properties": {
                    "expression": {"type": "string", "description": "Math expression"}
                },
                "required": ["expression"]
            }
        }
    },
    tool_execution=calculate
)

agent = Agent(
    agent_name="calculator",
    model_name="gpt-4o",  # any litellm model
    instructions="You help with math problems.",
    tools=Tools([calc_tool])
)

result = agent("What's 15 * 23?")

Multi-agent workflow

from flowtic import Agent, CommunicationProtocol

# Create agents
analyst = Agent(
    agent_name="analyst",
    model_name="gpt-4o",
    instructions="Analyze requirements and ask clarifying questions.",
    allow_user_input=True  # can talk to user
)

coder = Agent(
    agent_name="coder", 
    model_name="gpt-4o",
    instructions="Write code based on requirements.",
    allow_user_input=False  # only talks to other agents
)

# Set up who talks to whom
protocol = CommunicationProtocol(
    "analyst<->coder",  # bidirectional
    [analyst, coder]
)

# Start the workflow
protocol.execute("Build a simple todo app")

Communication patterns

The syntax is dead simple:

  • A->B means A can send messages to B
  • A<->B means they can talk both ways
  • A->B, B->C chains them together
  • A<->B, A->C means A talks to both B and C

When agents communicate, they automatically get tools to message each other. No setup needed.

Images and multimodal

# Agent automatically handles images
agent("Here's a screenshot", images=["path/to/image.png"])

# Works with URLs and base64 too
agent("Analyze this", images=["https://example.com/chart.png"])

Custom callbacks

from flowtic import Callback

class MyCallbacks(Callback):
    def on_user_loop(self, agent_name, message):
        return input(f"{agent_name}: {message}\n> ")
    
    def on_tool_call(self, agent_name, tool_name, args):
        print(f"{agent_name} is using {tool_name}")

agent = Agent(
    agent_name="helper",
    model_name="gpt-4o", 
    callbacks=MyCallbacks()
)

Session management

Each agent keeps its own conversation buffer. Even if multiple agents reuse the same SessionManager, their histories stay isolated by agent name:

from flowtic import SessionManager

session_store = SessionManager()

agent1 = Agent(
    agent_name="researcher",
    model_name="gpt-4o",
    session=session_store
)

agent2 = Agent(
    agent_name="writer", 
    model_name="gpt-4o",
    session=session_store
)

# The writer still has its own memory
agent1("Find info about climate change")
agent2("Write a summary based on what the researcher found")

If you want agents to share context, use agent-to-agent communication. CommunicationProtocol injects _spin_into, so one agent can explicitly hand context to another instead of silently sharing history.

Sessions handle images automatically - no extra work needed:

session = SessionManager()

# Add context manually if needed
session.add_user_context("my_agent", 
    text="Here's the data", 
    images=["chart1.png", "chart2.png"]
)

# Get the full conversation
history = session.get_buffer_memory("my_agent")

That's it

Three main pieces: agents that remember conversations, tools they can use, and simple rules for who talks to whom. Everything else just works.

Metadata

Release files for flowtic 1.6.2

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

Source distribution (sdist)

Source distribution for flowtic 1.6.2
File Size Uploaded Provenance
flowtic-1.6.2.tar.gz 9.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flowtic 1.6.2
File Interpreter ABI Platform
flowtic-1.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / flowtic-1.6.2.tar.gz

Download URL flowtic-1.6.2.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
892e3f598d36898008b8bab7c44b2771111864e3f56bcb0ae8d9942df361fed8
BLAKE2b-256 checksum
How to use checksums
f36e648b3ffb3e4196c770187bbb98157b60a2a86da8854bbc3130bd13960d90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / flowtic-1.6.2-py3-none-any.whl

Download URL flowtic-1.6.2-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4434e58109a3c6a7394c2b57c91f4947e9fbdae18e7c5bab85581c1269a8279
BLAKE2b-256 checksum
How to use checksums
db8f75f53c83ff97d319fd9b2646d9c5b63ed5ae5c47a5cf4e1c4abea567cc50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for flowtic 1.6.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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