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.
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.
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")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())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")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 bodypip install haive-dataflow
# With FastAPI integration
pip install haive-dataflow[api]
# With Supabase backend
pip install haive-dataflow[supabase]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")📖 Full documentation:https://pr1m8.github.io/haive-dataflow/
| Package | Description |
|---|---|
| haive-core | Foundation: engines, graphs, persistence |
| haive-agents | Production agents (registered in dataflow) |
| haive-mcp | MCP integration |
MIT © pr1m8