Skip to content

Repository files navigation

haive-dataflow

PyPI versionPython VersionsLicense: MITCIDocsPyPI Downloads

Data processing pipelines and ETL workflows for Haive agents.

A registry, discovery, and serialization system for managing components, persistence, and data flows in the Haive framework. Use it for component management, agent persistence, dataflow orchestration, and FastAPI integration.


Why haive-dataflow?

Production agent systems need more than just agents — they need:

  • Component registry — track which agents, tools, and configs are available
  • Serialization — save and load complex agent configs across processes
  • Persistence — store agent state, conversation history, results
  • Streaming — real-time data flows for production pipelines
  • API integration — serve agents as HTTP endpoints

haive-dataflow provides all of this. It's the production infrastructure layer.


Features

📦 Component Registry

Register and discover Haive components at runtime:

fromhaive.dataflow.registryimportComponentRegistryregistry=ComponentRegistry()
# Register agentsregistry.register("research_agent", researcher)
registry.register("writer_agent", writer)
# Discover by typeall_agents=registry.list_components(component_type="agent")
# Retrieveagent=registry.get("research_agent")

🔄 Serialization

Save and restore agent configs:

fromhaive.dataflow.serializationimportserialize_agent, deserialize_agent# Save to JSONconfig_json=serialize_agent(my_agent)
withopen("agent.json", "w") asf:
f.write(config_json)
# Restorewithopen("agent.json") asf:
restored=deserialize_agent(f.read())

💾 Persistence

Multiple backends with sync and async support:

fromhaive.dataflow.persistenceimportPostgresBackend, SupabaseBackend# PostgreSQLbackend=PostgresBackend(
connection_string="postgresql://haive:haive@localhost/haive",
pool_size=10,
)
# Supabasebackend=SupabaseBackend(
url="https://your-project.supabase.co",
key="your-anon-key",
)
# Save stateawaitbackend.save_state("session_123", agent_state)
# Restorestate=awaitbackend.load_state("session_123")

🌐 FastAPI Integration

Serve agents as HTTP endpoints:

fromfastapiimportFastAPIfromhaive.dataflow.apiimportcreate_agent_routerapp=FastAPI()
app.include_router(create_agent_router(my_agent), prefix="/agents/researcher")
# Now POST to /agents/researcher/run with JSON body

Installation

pip install haive-dataflow
# With FastAPI integration
pip install haive-dataflow[api]
# With Supabase backend
pip install haive-dataflow[supabase]

Quick Start

fromhaive.dataflow.registryimportComponentRegistryfromhaive.agents.simple.agentimportSimpleAgentfromhaive.core.engine.aug_llmimportAugLLMConfig# Create and registerregistry=ComponentRegistry()
agent=SimpleAgent(name="hello", engine=AugLLMConfig())
registry.register("hello", agent)
# Usecomponent=registry.get("hello")
result=component.run("Hello world")

Documentation

📖 Full documentation:https://pr1m8.github.io/haive-dataflow/


Related Packages

PackageDescription
haive-coreFoundation: engines, graphs, persistence
haive-agentsProduction agents (registered in dataflow)
haive-mcpMCP integration

License

MIT © pr1m8

About

Data processing pipelines and ETL workflows for Haive agents

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages