| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
English | 简体中文
🌐 Cloud Version: https://hatchify.ai/ - Try Vibe Graph instantly without installation!
Hatchify is a powerful multi-agent workflow platform that enables complex AI Agent collaboration through a dynamic graph execution engine. Built on FastAPI + AWS Strands SDK, it supports dynamic creation and execution of Agent workflows via JSON configuration.
Backend:
Frontend:
# Clone repository
git clone https://github.com/Sider-ai/hatchify.git
cd hatchify
# Install dependencies (recommended using uv)
uv sync# Navigate to web directory
cd web
# Install dependencies
pnpm install
# Build icons package (required before first run)
pnpm build:iconscp resources/example.mcp.toml resources/mcp.toml
cp resources/example.models.toml resources/models.toml
cp resources/example.tools.toml resources/tools.toml[[models]]
name = "gpt-4o"
provider = "openai"
api_key = "your-api-key-here"
api_base = "https://api.openai.com/v1"[nano_banana]
enabled = true
model = "gemini-3-pro-image-preview"
api_key = "your-google-genai-api-key"[[servers]]
name = "filesystem"
transport = "stdio"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/workspace"]Create .env file in the web directory:
# API endpoint configuration (default: http://localhost:8000)
VITE_API_TARGET=http://localhost:8000See web/.env.example for all available environment variables.
# Development mode
uvicorn hatchify.launch.launch:app --reload --host 0.0.0.0 --port 8000
# Or use main.py
python main.pyVisit http://localhost:8000/docs to view API documentation.
# Navigate to web directory (if not already there)
cd web
# Development mode (with hot reload)
pnpm dev
# Production build
pnpm build
# Preview production build
pnpm previewVisit http://localhost:5173 (default Vite dev server port) to access the web interface.
docker build -t hatchify .# Run in background with port mapping and volume mounting
docker run -itd \
--name=hatchify \
-p 8000:8000 \
-v ./data:/app/data \
-v ./resources:/app/resources \
hatchifyParameter Explanation:
# Real-time log viewing
docker logs -f hatchify
# View last 100 lines
docker logs --tail 100 hatchify# Stop container
docker stop hatchify
# Start container
docker start hatchify
# Restart container
docker restart hatchify
# Remove container
docker rm -f hatchifyOverride configuration with environment variables:
docker run -itd \
--name=hatchify \
-p 8000:8000 \
-e HATCHIFY__SERVER__BASE_URL=https://your-domain.com \
-e HATCHIFY__SERVER__PORT=8000 \
-v ./data:/app/data \
-v ./resources:/app/resources \
hatchifyImportant Notes:
Hatchify/ ├── hatchify/ # Main application package │ ├── business/ # Business layer │ │ ├── api/v1/ # RESTful API routes │ │ ├── db/ # Database configuration │ │ ├── models/ # ORM models │ │ ├── repositories/ # Data access layer │ │ └── services/ # Business logic layer │ ├── common/ # Shared layer │ │ ├── domain/ # Domain models (Entity, Event) │ │ ├── extensions/ # Extension modules │ │ └── settings/ # Configuration management │ ├── core/ # Core engine │ │ ├── factory/ # Factory pattern (Agent, LLM, Tool) │ │ ├── graph/ # Dynamic graph building system │ │ ├── manager/ # Managers (MCP, Model, Tool) │ │ ├── mcp/ # MCP protocol integration │ │ └── stream_handler/ # Event stream processing │ └── launch/ # Application entry point ├── resources/ # Configuration directory │ ├── development.yaml # Environment configuration │ ├── mcp.toml # MCP server configuration │ └── models.toml # Model configuration └── main.py # Program entry point
Through natural language interaction, leveraging LLM's semantic understanding to automatically generate GraphSpec specifications, enabling end-to-end conversion from requirement descriptions to executable workflows. The system uses structured output mechanisms to parse user intent into complete graph definitions containing Agent nodes, tool configurations, and routing strategies.
Core Capabilities:
Graphs consist of nodes and edges, supporting declarative definition of complex multi-agent collaboration processes.
Node Types:
Agent Nodes - LLM-based intelligent nodes
Each Agent can be configured with:
Function Nodes - Deterministic function nodes
Tools and Custom Extensions:
1. Agent Tools (Called by Agents)
from strands import tool, ToolContext
from hatchify.core.factory.tool_factory import ToolRouter
tool_router = ToolRouter()
@tool(name="add", description="Add two numbers", context=True)
async def add(a: float, b: float, tool_context: ToolContext) -> float:
return a + b
tool_router.register(add)2. Function Nodes (As Graph Nodes)
from pydantic import BaseModel
from strands import tool
class EchoResult(BaseModel):
text: str
@tool(name="echo_function", description="Echo input")
async def echo_function(text: str) -> EchoResult:
return EchoResult(text=f"[ECHO] {text}")Manage models and tools through declarative configuration files, supporting multiple Providers and transport protocols.
Model Configuration (resources/models.toml)
Support multiple Provider configurations for unified management of different LLM service providers:
default_provider = "openai-like"
[providers.openai]
id = "openai"
name = "OpenAI"
family = "openai"
base_url = "https://api.openai.com/v1"
api_key = "sk-xxx"
enabled = true
priority = 3 # Priority, lower number = higher priority
[[providers.openai.models]]
id = "gpt-4o"
name = "gpt-4o"
max_tokens = 16384
context_window = 128000
description = "..."
[providers.anthropic]
id = "anthropic"
family = "anthropic"
base_url = "https://api.anthropic.com"
api_key = "sk-ant-xxx"
enabled = true
priority = 4
[[providers.anthropic.models]]
id = "claude-sonnet-4-5-20250929"
max_tokens = 64000
context_window = 200000Configuration Features:
MCP Tool Configuration (resources/mcp.toml)
Support three transport protocols for dynamically loading external tool servers:
1. Stdio Transport (Local Process)
[[servers]]
name = "filesystem"
transport = "stdio"
enabled = true
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
prefix = "fs" # Tool name prefix
# Optional configuration
cwd = "/tmp"
encoding = "utf-8"
[servers.env]
NODE_ENV = "production"
[servers.tool_filters]
allowed = ["read_file", "write_file"] # Whitelist2. SSE Transport (Server-Sent Events)
[[servers]]
name = "calculator-sse"
transport = "sse"
enabled = true
url = "http://localhost:8000/sse"
prefix = "calc"
timeout = 5
sse_read_timeout = 300
[servers.headers]
Authorization = "Bearer your-token"3. StreamableHTTP Transport
[[servers]]
name = "weather-api"
transport = "streamablehttp"
enabled = true
url = "http://localhost:8001/mcp/"
prefix = "weather"
timeout = 30
terminate_on_close = trueMCP Configuration Features:
Status: In Development This feature is currently under development, some functions may not be fully implemented.
Through natural language conversation, let AI automatically generate and customize web applications, from requirement description to deployment in one stop.
Tech Stack:
Workflow:
Project Initialization
Conversational Customization
Intelligent Content Rendering
One-Click Deployment
Use Cases:
Centrally manage all runtime configurations through resources/development.yaml.
Core Configuration Items:
1. Server Configuration
hatchify:
server:
host: 0.0.0.0
port: 8000
base_url: http://localhost:8000 # ⚠️ Must change to public URL in production⚠️ Important Note: base_url is the most critical configuration item
2. Model Configuration
models:
spec_generator: # Model used by Vibe Graph generator
model: claude-sonnet-4-5-20250929
provider: anthropic
schema_extractor: # Model used by Schema extractor
model: claude-sonnet-4-5-20250929
provider: anthropic
web_builder: # Model used by Web Builder
model: claude-sonnet-4-5-20250929
provider: anthropic3. Database Configuration
db:
platform: sqlite # Currently only supports: sqlite
sqlite:
driver: sqlite+aiosqlite
file: ./data/dev.db
echo: False
pool_pre_ping: True⚠️ Note: Current version only supports SQLite. PostgreSQL and MySQL support will be added in future releases.
4. Storage Configuration
storage:
platform: opendal # Currently only supports: opendal
opendal:
schema: fs # Supports: fs / s3 / oss, etc. (based on OpenDAL)
bucket: hatchify
folder: dev
root: ./data/storage5. Session Management Configuration
session_manager:
manager: file # Currently only supports: file
file:
folder: dev
root: ./data/session6. Web Builder Configuration
web_app_builder:
repo_url: https://github.com/Sider-ai/hatchify-web-app-template.git
branch: master
workspace: ./data/workspace
# Environment variable injection during project initialization
init_steps:
- type: env
file: .env
vars:
VITE_API_BASE_URL: "{{base_url}}" # Auto-use server.base_url
VITE_GRAPH_ID: "{{graph_id}}"
VITE_BASE_PATH: "/preview/{{graph_id}}"
# Security configuration
security:
allowed_directories: # Whitelist: directories Agent can access
- ./data/workspace
- /tmp
sensitive_paths: # Blacklist: sensitive paths forbidden to access
- ~/.ssh
- ~/.aws
- /etc/passwd
- /rootEnvironment Variable Override:
Support overriding configuration via environment variables using HATCHIFY__ prefix:
# Override server port
export HATCHIFY__SERVER__PORT=8080
# Override base_url (use in production deployment)
export HATCHIFY__SERVER__BASE_URL=https://your-domain.com
# Override database platform
export HATCHIFY__DB__PLATFORM=postgresqlConfiguration Priority: Environment Variables > YAML Configuration File > Default Values
Adopting classic three-tier architecture design (API → Service → Repository), achieving high cohesion and low coupling through generics and dependency injection.
Architecture Layers:
┌─────────────────────────────────────────────┐
│ API Layer (FastAPI Router) │
│ - Route definition, request validation, │
│ response serialization │
│ - Dependency injection via Depends │
└─────────────────┬───────────────────────────┘
│ Calls
┌─────────────────▼───────────────────────────┐
│ Service Layer (GenericService[T]) │
│ - Business logic orchestration, │
│ transaction management │
│ - Cross-Repository coordination │
└─────────────────┬───────────────────────────┘
│ Uses
┌─────────────────▼───────────────────────────┐
│ Repository Layer (BaseRepository[T]) │
│ - Data access abstraction, CRUD operations │
│ - Query building, pagination encapsulation │
└─────────────────┬───────────────────────────┘
│ Operates
┌─────────────────▼───────────────────────────┐
│ Database Layer (SQLAlchemy ORM) │
│ - ORM models, database connections │
└─────────────────────────────────────────────┘
1. Repository Layer - Data Access Abstraction
Core Features:
2. Service Layer - Business Logic Orchestration
Core Features:
3. API Layer - Routing and Dependency Injection
Core Features:
Architecture Advantages:
Extend routing types in DynamicGraphBuilder._create_edge_condition().
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or feedback, please open an issue on GitHub.
Made with ❤️ by Sider.ai
| Back | FazBrowse Home | New Git URL |