framework-packaging-guides
npx machina-cli add skill phazurlabs/install-labs/framework-packaging-guides --openclawFramework-Specific Packaging Guides
How to turn an agent built with any major framework into something other people can install with one command.
1. LangChain / LangGraph
When to use: Stateful multi-step agents with tool calling, memory, and conditional branching. LangGraph adds explicit graph-based control flow.
Project structure:
my-langgraph-agent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agent.py # graph definition
│ ├── nodes.py # node functions
│ ├── tools.py
│ └── state.py # TypedDict state schema
├── langgraph.json # deployment manifest
├── pyproject.toml
├── Dockerfile
├── docker-compose.yml
└── .env.example
Key configs:
// langgraph.json — required for langgraph deploy and Cloud
{ "graphs": {"my_agent": "./src/my_agent/agent.py:graph"}, "env": ".env", "python_version": "3.12", "dependencies": ["."] }
# pyproject.toml
[project]
name = "my-langgraph-agent"
dependencies = ["langgraph>=0.2.0", "langchain-anthropic>=0.2.0"]
[project.scripts]
my-agent = "my_agent.cli:main"
Distribution: LangGraph Cloud (langgraph deploy) | Docker (docker compose up -d) | PyPI (pip install my-langgraph-agent)
Pitfalls:
- Version conflicts. LangChain ships breaking changes frequently. Pin exact versions (
langgraph==0.2.14, not>=0.2). Users with other LangChain projects hit dependency hell. - Missing
langgraph.json. Without it,langgraph deploysilently fails or serves the wrong graph. - State schema not exported. Library consumers need your
StateTypedDict. Export it from__init__.py.
2. CrewAI
When to use: Multi-agent systems where each agent has a distinct role, goal, and backstory. Role-based collaboration (researcher + writer + editor).
Project structure:
my-crew/
├── src/my_crew/
│ ├── __init__.py
│ ├── crew.py # @CrewBase class
│ ├── agents.py
│ ├── tasks.py
│ ├── tools/custom_tool.py
│ └── config/
│ ├── agents.yaml
│ └── tasks.yaml
├── pyproject.toml
├── Dockerfile
└── .env.example
Key configs:
# config/agents.yaml
researcher:
role: "Senior Research Analyst"
goal: "Find comprehensive data on {topic}"
llm: anthropic/claude-sonnet-4-20250514
[project]
name = "my-crew"
dependencies = ["crewai[tools]>=0.80.0"]
[project.scripts]
my-crew = "my_crew.cli:main"
Distribution: PyPI (pip install my-crew) | Docker (docker compose up) | CrewAI CLI (crewai run, dev only)
Pitfalls:
- YAML path resolution. CrewAI resolves config relative to the crew file. After
pip install, the working directory changes. Usepathlib.Path(__file__).parent / "config"for module-relative paths. - Hardcoded LLM provider. Users may lack an OpenAI key. Make the LLM configurable via env var.
- Tool deps not declared. Custom tools depend on packages not in
pyproject.toml. The crew imports fine but crashes when the tool is invoked.
3. AutoGen / AG2 (Microsoft)
When to use: Multi-agent conversations where agents talk to each other autonomously, with optional human-in-the-loop.
Project structure:
my-autogen-agent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agents.py # AssistantAgent, UserProxyAgent
│ ├── group_chat.py # GroupChat + GroupChatManager
│ ├── tools.py
│ └── config.py # OAI_CONFIG_LIST builder
├── OAI_CONFIG_LIST.example
├── pyproject.toml
├── Dockerfile
└── .env.example
Key configs:
// OAI_CONFIG_LIST.example (user renames and fills in keys)
[{"model": "claude-sonnet-4-20250514", "api_key": "YOUR_KEY", "api_type": "anthropic"}]
[project]
name = "my-autogen-agent"
dependencies = ["autogen-agentchat>=0.4.0", "autogen-ext>=0.4.0"]
Distribution: PyPI (pip install my-autogen-agent) | Docker (docker compose up)
Pitfalls:
- Namespace confusion. The project rebranded from
pyautogentoautogen-agentchat+autogen-ext. Old tutorials useimport autogen; new packages usefrom autogen_agentchat import .... Pin the correct name. - OAI_CONFIG_LIST file management. Users forget to create it or place it in the wrong directory. Provide a CLI
initcommand that generates it from env vars. - Code execution by default.
UserProxyAgentexecutes code. In Docker this is fine; on bare metal, document this prominently and offercode_execution_config=False.
4. Pydantic AI
When to use: Type-safe, dependency-injected agents with structured outputs. Library-first: your agent is a Python object, not a service.
Project structure:
my-pydantic-agent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agent.py # Agent() with system prompt, result_type, deps_type
│ ├── models.py # Pydantic response models
│ ├── tools.py # @agent.tool functions
│ └── cli.py
├── pyproject.toml
└── .env.example
Key configs:
[project]
name = "my-pydantic-agent"
dependencies = ["pydantic-ai>=0.1.0"]
[project.scripts]
my-agent = "my_agent.cli:main"
Distribution: PyPI only (pip install my-pydantic-agent). It is a library.
Pitfalls:
- Hardcoded model string. Make
Agent("anthropic:claude-sonnet-4-20250514")configurable viaAGENT_MODELenv var so users can switch providers. - Deps not documented. Pydantic AI uses dependency injection. Document what consumers must provide at
agent.run()call time. - No CLI shipped. Library-first authors forget the CLI entrypoint. Add
[project.scripts]so end users can run standalone.
5. LlamaIndex
When to use: RAG pipelines or agents that reason over documents. Deep vector store and data connector integrations.
Project structure:
my-llamaindex-agent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agent.py # agent/query engine
│ ├── index.py # index construction + persistence
│ ├── tools.py # QueryEngineTool wrappers
│ └── ingest.py # data loading + chunking
├── storage/ # persisted index (gitignored)
├── pyproject.toml
├── docker-compose.yml # includes vector store service
└── .env.example
Key configs:
[project]
name = "my-llamaindex-agent"
dependencies = [
"llama-index-core>=0.11.0", "llama-index-llms-anthropic>=0.3.0",
"llama-index-vector-stores-chroma>=0.2.0", "llama-index-readers-file>=0.2.0",
]
Distribution: Docker Compose with vector store (docker compose up -d) | llama-deploy (managed) | PyPI (library)
Pitfalls:
- Vector store not included. Ship a
docker-compose.ymlthat starts ChromaDB/Qdrant alongside the agent, or default to local file-based storage. - Index not persisted. Call
index.storage_context.persist(). Users will re-ingest on every restart otherwise. - Subpackage explosion. LlamaIndex split into
llama-index-core,llama-index-llms-*,llama-index-vector-stores-*, etc. Miss one and getImportErrorat runtime.
6. Semantic Kernel (Microsoft)
When to use: Enterprise AI orchestration in Python or C#/.NET with strong typing and plugin architecture.
Project structure (Python):
my-sk-agent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agent.py # Kernel setup, planner
│ └── plugins/
│ ├── search_plugin.py
│ └── math_plugin.py
├── pyproject.toml
└── .env.example
Key configs: dependencies = ["semantic-kernel>=1.0.0"] (Python) | <PackageReference Include="Microsoft.SemanticKernel" Version="1.*" /> (C#)
Distribution: PyPI (pip install) | NuGet (dotnet add package) | Docker | Azure Container Apps
Pitfalls:
- Azure-centric defaults. SK defaults to Azure OpenAI. Users with direct OpenAI/Anthropic keys need different service registration. Document both.
- Plugin discovery. Plugins register at kernel construction. Provide a config-driven plugin loading hook for extensibility.
- Python vs C# drift. The SDKs lack feature parity. Document which features exist in each.
7. Vercel AI SDK
When to use: Streaming AI agents in JS/TS, typically with Next.js. Provides React hooks for streaming, tool calling, and multi-step loops.
Project structure:
my-ai-app/
├── app/
│ ├── page.tsx # useChat() UI
│ └── api/chat/route.ts # streamText() agent logic
├── lib/
│ ├── agent.ts
│ └── tools/
├── package.json
├── Dockerfile
└── .env.example
Key configs:
{"dependencies": {"ai": "^4.0.0", "@ai-sdk/anthropic": "^1.0.0", "next": "^15.0.0"}}
Distribution: Vercel deploy (vercel deploy) | npm library (npm install my-ai-agent) | Docker
Pitfalls:
- Server-side only. Agent logic runs in API routes. Client-side imports fail. Use
"use server"or split packages. - Streaming requires compatible hosting.
streamText()uses SSE. Some platforms (older Lambda, buffering proxies) break streaming. - Missing provider package.
@ai-sdk/anthropicor@ai-sdk/openaimust be independencies. Missing = runtime error, not build error.
8. OpenAI Assistants API
When to use: Agent runtime hosted on OpenAI's infrastructure. You distribute a thin client, not the agent.
Project structure:
my-assistant-client/
├── src/my_assistant/
│ ├── __init__.py
│ ├── client.py # creates/retrieves assistant
│ ├── threads.py # thread + message management
│ ├── setup.py # one-time assistant creation
│ └── cli.py
├── assistant_config.json # assistant params (non-secret)
├── pyproject.toml
└── .env.example
Key configs:
// assistant_config.json
{"name": "My Assistant", "model": "gpt-4o", "tools": [{"type": "file_search"}, {"type": "code_interpreter"}]}
Distribution: Custom GPT (zero-install, GPT Store) | PyPI wrapper (pip install my-assistant-client && my-assistant-setup) | npm wrapper
Pitfalls:
- Assistant ID management. Create the assistant on the user's account via a setup script. Sharing your ID ties usage to your billing.
- Custom GPT limitations. GPTs cannot call external APIs without Actions (OpenAPI spec). If your agent needs external tools, a GPT alone is insufficient.
- Thread state is server-side. Store thread IDs locally (SQLite/JSON) so users can resume conversations.
9. Anthropic Tool Use (Direct Claude API)
When to use: Calling Claude directly with tool definitions, no framework. Full control over the agentic loop.
Project structure:
my-claude-agent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agent.py # agentic loop: call model -> execute tools -> repeat
│ ├── tools.py # tool schemas (JSON) + implementations
│ ├── prompts.py
│ └── cli.py
├── pyproject.toml
└── .env.example
Key configs:
[project]
name = "my-claude-agent"
dependencies = ["anthropic>=0.40.0"]
[project.scripts]
my-agent = "my_agent.cli:main"
Distribution: MCP server (uvx my-claude-agent in Claude Desktop config) | PyPI (pip install) | npm (TS version) | Docker
Pitfalls:
- Tool execution not sandboxed. You run tool results yourself. Sandbox tools that execute shell commands or write files.
- No loop termination guard. Without
max_turns=10, a confused agent loops forever burning tokens. - Streaming + tools. Must handle
content_block_start/delta/stopfortool_useblocks. Many tutorials skip this, silently dropping tool calls in streaming mode.
10. Smolagents (HuggingFace)
When to use: Lightweight, code-generating agents from HuggingFace. Simple tool-using agents that can run on HuggingFace Spaces for free.
Project structure:
my-smolagent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agent.py # CodeAgent or ToolCallingAgent
│ └── tools.py # @tool functions
├── app.py # Gradio UI for Spaces
├── pyproject.toml
└── .env.example
Distribution: HuggingFace Spaces (push to Space repo, users access via browser) | PyPI (pip install my-smolagent) | Docker
Pitfalls:
- CodeAgent runs generated Python. Dangerous in untrusted environments. Use
ToolCallingAgentfor production or sandbox withE2BSandbox. - HF_TOKEN required. Gated models or Inference API need a HuggingFace token. The missing-token error is unhelpful.
- Tool serialization. Tools must be serializable for
agent.push_to_hub(). Closures and unpicklable objects fail silently.
11. n8n (Visual Workflow Automation)
When to use: You built an automation workflow in n8n's visual editor and want to share it.
Project structure:
my-n8n-workflow/
├── workflows/my_workflow.json # exported from n8n UI
├── credentials/credentials.example.json
├── custom-nodes/ # optional: npm packages
│ └── n8n-nodes-my-custom/
├── docker-compose.yml
└── .env.example
Key configs:
# docker-compose.yml
services:
n8n:
image: n8nio/n8n:1.60.0 # pin version
ports: ["5678:5678"]
volumes: ["./workflows:/home/node/.n8n/workflows"]
Distribution: n8n template library (one-click import) | Docker with pre-loaded workflows (docker compose up -d) | Custom community node via npm
Pitfalls:
- Credentials not portable. Exports include credential IDs, not values. Users must recreate every credential. Ship a
credentials.example.jsonwith setup instructions. - Webhook URLs are instance-specific. Document which trigger nodes need URL reconfiguration after import.
- Version mismatch. Pin the n8n Docker image version. Workflows from v1.60 may use nodes missing in v1.50.
12. Flowise
When to use: LangChain-powered chatflows built with Flowise's visual drag-and-drop builder.
Project structure:
my-flowise-chatflow/
├── chatflows/my_chatflow.json # exported from Flowise UI
├── docker-compose.yml
└── .env.example
Distribution: Docker (docker compose up -d, import chatflow via API or UI) | Flowise Cloud (upload JSON)
Install via API: curl -X POST http://localhost:3000/api/v1/chatflows -H "Content-Type: application/json" -d @chatflows/my_chatflow.json
Pitfalls:
- API keys in export. Flowise may embed keys in the chatflow JSON. Inspect and sanitize before committing.
- Custom component deps. Target instance must have the same custom components installed. List them in the README.
- Hardcoded connection strings. Chatflows referencing a specific Pinecone index or Chroma URL break in other environments.
13. Dify
When to use: No-code/low-code agent builder. Distribute via Dify Cloud or self-hosted Docker.
Project structure:
my-dify-app/
├── dsl/my_app.yml # exported Dify DSL (no secrets included)
├── docker-compose.yml # Dify self-hosted stack (6+ containers)
└── .env.example
Distribution: Dify DSL import (via UI) | Dify Cloud (hosted, users access via URL) | Docker self-hosted | API-only
Pitfalls:
- No credentials in DSL. Users must configure model providers in Dify settings before the app works. Document required providers and models.
- Heavy stack. Self-hosted runs 6+ containers (API, worker, web, DB, Redis, vector store). Document minimum requirements: 4GB RAM, 20GB disk.
- Version incompatibility. DSL format changes between versions. Pin the Dify version in your Docker compose.
14. ComfyUI
When to use: AI image generation pipelines built in ComfyUI's node editor.
Project structure:
my-comfyui-workflow/
├── workflows/
│ ├── my_workflow.json # visual format
│ └── my_workflow_api.json # API format (programmatic)
├── custom_nodes/my-node/ # optional
│ ├── __init__.py
│ ├── nodes.py # NODE_CLASS_MAPPINGS
│ └── requirements.txt
├── MODELS_REQUIRED.md # download URLs + expected paths
└── docker-compose.yml
Distribution: Workflow JSON (drag-drop into ComfyUI) | Custom node git repo (ComfyUI Manager: Install via URL) | Docker
Pitfalls:
- Missing models. Workflows reference filenames like
sd_xl_base_1.0.safetensorsthat must exist locally. ShipMODELS_REQUIRED.mdwith download URLs. Never bundle multi-GB files. - Node dependency conflicts. Two custom nodes requiring incompatible
torchversions break each other. Test with a clean install. - GPU requirements undocumented. A workflow needing 24GB VRAM will OOM on 8GB. Document minimum VRAM and whether CPU fallback works.
15. Browser Automation Agents (Playwright / Puppeteer)
When to use: Agents that automate web browsers for scraping, form filling, or interacting with web apps lacking APIs.
Project structure:
my-browser-agent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agent.py # LLM + browser orchestration
│ ├── browser.py # page interactions
│ └── cli.py
├── pyproject.toml
├── Dockerfile # USE mcr.microsoft.com/playwright/python base image
└── .env.example
Key config: dependencies = ["playwright>=1.45.0", "anthropic>=0.40.0"]
Distribution: Docker strongly recommended (docker compose up) | PyPI + playwright install chromium | npm + npx playwright install
Pitfalls:
- Browser binaries not installed. Playwright/Puppeteer download browsers separately. This is the #1 support issue. Ship Docker or add a post-install script.
- System library deps. Headless Chromium needs
libnss3,libatk-bridge2.0-0, etc. Use the official Playwright Docker base image. - Headless vs headed. Test in headless mode. Default to
headless=Truein production. Rendering differences cause silent failures.
16. Custom Python Agents (No Framework)
When to use: Calling Anthropic/OpenAI SDKs directly. Simplest and most portable when you do not need framework features.
Project structure:
my-agent/
├── src/my_agent/
│ ├── __init__.py
│ ├── agent.py # prompt -> LLM -> tool -> repeat
│ ├── tools.py
│ └── cli.py # argparse or click
├── pyproject.toml
├── Dockerfile
└── .env.example
Key configs:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-agent"
dependencies = ["anthropic>=0.40.0", "click>=8.0.0"]
[project.scripts]
my-agent = "my_agent.cli:main"
Distribution: PyPI / pipx (pipx install my-agent) | MCP server (uvx my-agent --mcp in Claude Desktop config) | Docker | Single-file via pipx run
Pitfalls:
- No isolation. Global
pip installcauses conflicts. Recommendpipx installfor CLI tools. - No CLI entrypoint. Without
[project.scripts], users are stuck withpython -m my_agent. Always add one. - Missing
__init__.pyexports. If also a library, ensurefrom my_agent import Agentworks.
17. Custom Node.js Agents (No Framework)
When to use: Building agents in JS/TS using Anthropic/OpenAI SDKs directly. Ideal for JS ecosystems and npm distribution.
Project structure:
my-agent/
├── src/
│ ├── agent.ts
│ ├── tools.ts
│ └── index.ts # CLI entry (needs #!/usr/bin/env node shebang)
├── dist/ # compiled JS (gitignored)
├── package.json
├── tsconfig.json
└── .env.example
Key configs:
{"name": "my-agent", "type": "module", "bin": {"my-agent": "./dist/index.js"},
"files": ["dist"], "scripts": {"build": "tsc", "prepublishOnly": "npm run build"},
"dependencies": {"@anthropic-ai/sdk": "^0.30.0"}, "engines": {"node": ">=20.0.0"}}
Distribution: npm (npx my-agent) | MCP server (npx my-agent --mcp in Claude Desktop config) | Docker
Pitfalls:
dist/not built before publish. Add"prepublishOnly": "npm run build"and"files": ["dist"].- Missing shebang. CLI entry needs
#!/usr/bin/env nodeat the top or thebinentry is not executable. - ESM vs CJS confusion. Set
"type": "module". Test withnpx-- it surfaces module resolution errors hidden bynpm run dev.
Cross-Cutting Decision Matrix
| Framework | Best Distribution Target | Install Command | Difficulty |
|---|---|---|---|
| LangChain / LangGraph | Docker / LangGraph Cloud | docker compose up / langgraph deploy | Medium |
| CrewAI | PyPI | pip install my-crew | Medium |
| AutoGen / AG2 | PyPI + Docker | pip install my-autogen-agent | Medium-High |
| Pydantic AI | PyPI | pip install my-pydantic-agent | Low |
| LlamaIndex | Docker Compose (+ vector store) | docker compose up | Medium-High |
| Semantic Kernel | PyPI / NuGet | pip install / dotnet add package | Medium |
| Vercel AI SDK | Vercel / npm | vercel deploy / npm install | Low-Medium |
| OpenAI Assistants | Custom GPT / PyPI wrapper | GPT Store / pip install | Low |
| Anthropic Tool Use | MCP server / PyPI | uvx my-agent / pip install | Low-Medium |
| Smolagents | HF Spaces / PyPI | Push to Space / pip install | Low |
| n8n | Docker + workflows | docker compose up | Medium |
| Flowise | Docker + chatflow | docker compose up | Medium |
| Dify | DSL import / Docker | Import YAML / docker compose up | Medium-High |
| ComfyUI | Workflow JSON + Manager | Drag-drop JSON | Medium |
| Browser agents | Docker (strongly recommended) | docker compose up | High |
| Custom Python | PyPI (pipx) | pipx install my-agent | Low |
| Custom Node.js | npm | npx my-agent | Low |
How to Read This Matrix
- Difficulty = how hard for the end user to install, not how hard to package.
- Audience is developers: PyPI or npm. They manage their own environments.
- Audience is non-developers: Docker, managed cloud (Vercel, Dify Cloud, HF Spaces), or Custom GPT.
- Agent needs infrastructure (DB, vector store, queue): Docker Compose for self-hosted. Managed cloud otherwise.
- Agent is primarily tools (no UI, no state): Wrap as MCP server. Users get it inside Claude Desktop or Claude Code with zero standalone setup.
Sources & References
- [LangChain Python Documentation] — LangChain, Inc. https://python.langchain.com/docs/ Reference for the LangChain framework including chains, agents, tools, memory, and retrieval patterns.
- [LangGraph Documentation] — LangChain, Inc. https://langchain-ai.github.io/langgraph/ Guide to building stateful, multi-step agent graphs with LangGraph, including deployment via LangGraph Cloud.
- [CrewAI Documentation] — CrewAI, Inc. https://docs.crewai.com/ Reference for building multi-agent systems with role-based collaboration, YAML configuration, and task orchestration.
- [AutoGen Documentation] — Microsoft. https://microsoft.github.io/autogen/ Guide to multi-agent conversation frameworks including AssistantAgent, GroupChat, and code execution patterns.
- [Pydantic AI Documentation] — Pydantic. https://ai.pydantic.dev/ Reference for type-safe, dependency-injected AI agents with structured outputs and tool definitions.
- [LlamaIndex Documentation] — LlamaIndex. https://docs.llamaindex.ai/ Comprehensive guide to RAG pipelines, data connectors, vector store integrations, and query engines for document-based agents.
- [Semantic Kernel Documentation] — Microsoft. https://learn.microsoft.com/en-us/semantic-kernel/ Reference for Microsoft's AI orchestration SDK covering Python and C#/.NET plugin architecture and planner patterns.
- [Vercel AI SDK Documentation] — Vercel. https://sdk.vercel.ai/docs Guide to building streaming AI applications with React hooks, tool calling, and multi-step agent loops in TypeScript.
- [OpenAI API Documentation] — OpenAI. https://platform.openai.com/docs Reference for the OpenAI Assistants API, function calling, threads, and the GPT Builder for Custom GPT distribution.
- [Anthropic API Documentation] — Anthropic. https://docs.anthropic.com/ Official reference for Claude API tool use, message streaming, and agentic loop patterns.
- [Smolagents Documentation] — Hugging Face. https://huggingface.co/docs/smolagents/ Guide to lightweight code-generating and tool-calling agents with HuggingFace Spaces deployment.
- [n8n Documentation] — n8n GmbH. https://docs.n8n.io/ Reference for building visual workflow automations, custom nodes, Docker self-hosting, and template distribution.
- [Flowise Documentation] — FlowiseAI. https://docs.flowiseai.com/ Guide to building LangChain-powered chatflows with a visual drag-and-drop builder, including Docker deployment and API import.
- [Dify Documentation] — Dify. https://docs.dify.ai/ Reference for the no-code/low-code agent builder, DSL format, self-hosted Docker stack, and Dify Cloud deployment.
- [ComfyUI] — comfyanonymous. https://github.com/comfyanonymous/ComfyUI Open-source node-based UI for AI image generation pipelines, including workflow JSON format and custom node development.
- [Playwright Documentation] — Microsoft. https://playwright.dev/docs/intro Cross-browser automation library for building browser-based agents, with Docker base images and headless mode support.
- [Puppeteer Documentation] — Google. https://pptr.dev/ Node.js library for controlling headless Chrome/Chromium, used for browser automation agents and web scraping.
Source
git clone https://github.com/phazurlabs/install-labs/blob/main/skills/framework-packaging-guides/SKILL.mdView on GitHub Overview
Framework-specific packaging guides show how to turn agents and automations built with major frameworks into installable products. It covers project scaffolding, deployment manifests, and distribution channels to help you ship ready-to-install agents with consistent metadata and entry points.
How This Skill Works
Guides provide framework-specific project layouts, required config files (such as langgraph.json or pyproject.toml), and packaging scripts that produce distributable artifacts. They describe how to publish via LangGraph Cloud, PyPI, Docker, or framework CLIs and how to manage dependencies and entry points for end users.
When to Use It
- You want to package and distribute a LangChain or LangGraph agent as a single installable product.
- You need a Dockerized or cloud deployment for your agent.
- You are packaging a CrewAI, AutoGen, or Pydantic AI system for distribution.
- You aim to deploy workflows from n8n, Flowise, or Dify as installable packages.
- You are packaging custom Python/Node.js agents or browser automation agents (e.g., Playwright, ComfyUI) for easy installation.
Quick Start
- Step 1: Scaffold your project and add framework-specific manifest files (e.g., langgraph.json, pyproject.toml).
- Step 2: Add dependencies, entry points, and state schemas; test packaging locally.
- Step 3: Publish to PyPI, LangGraph Cloud, or your Docker registry and verify install commands.
Best Practices
- Pin exact framework and dependency versions to avoid breaking changes.
- Export and expose required state schemas or TypedDicts for library consumers.
- Provide a deployment manifest (langgraph.json or equivalent) and clear entry points.
- Prefer module-relative paths for configs and tools to survive packaging.
- Test installations across environments (CI, local, Docker) and document install steps.
Example Use Cases
- Package a LangGraph agent for PyPI and Docker deployment with langgraph deploy.
- Distribute a CrewAI multi-agent system via PyPI and the CrewAI CLI.
- Package an AutoGen/AG2 agent for cloud deployment (LangGraph Cloud or Docker).
- Create a browser automation agent (Playwright-based) packaged for one-click install.
- Bundle a custom Python/Node.js agent into a single installable artifact for distribution.