Skip to main content

Initialise LangGraph-based agent architectures: pick a provider, a pattern, a deployment — get a runnable project.

Project description

langgraph-forge

Initialise LangGraph-based agent architectures: pick a provider, a pattern, a deployment — get a runnable project.

PyPI - Version PyPI - Python Versions License: MIT CI

Why?

LangGraph's primitives — init_chat_model, create_react_agent, langgraph-supervisor, langchain-mcp-adapters, cloud-runtime wrappers — are individually excellent but scattered across five packages with inconsistent config shapes. Every team building an agent re-writes the same wiring.

langgraph-forge absorbs that wiring into thin, opinionated factories plus a CLI scaffolder. We compose, we don't reimplement. The value is a coherent surface and a trade-off-aware starter, not new primitives.

Install

pip install langgraph-forge
# or, for optional cloud adapters:
pip install 'langgraph-forge[bedrock,vertex,azure]'

Quickstart (under a minute)

# 1. Scaffold a project
langgraph-forge init my-agent --provider anthropic --pattern supervisor --deploy direct --no-input
cd my-agent

# 2. Install + set credentials
cp .env.example .env        # then edit
uv sync --extra dev

# 3. Smoke-test the generated graph (uses mocked LLM)
uv run pytest tests/unit -q

# 4. Run it
uv run python -m my_agent

Matrix

Provider (--provider) Pattern (--pattern) Deployment (--deploy)
anthropic, openai, grok, google, bedrock, azure single, supervisor direct, bedrock, vertex, azure

All combinations scaffold end-to-end. direct is fully functional in v0.1; cloud adapters (bedrock / vertex / azure) ship as Protocol-conformant contract stubs — the scaffolded deploy.py imports successfully and the smoke test passes, but calling the cloud prepare / invoke raises NotImplementedError until the SDK glue lands in v0.2.

Library usage (without the CLI)

from langgraph_forge import (
    ModelSpec,
    SpecialistSpec,
    create_supervisor_agent,
    get_model,
)

supervisor = get_model(ModelSpec(model="claude-opus-4-7", provider="anthropic"))
worker_model = ModelSpec(model="claude-haiku-4-5", provider="anthropic")

graph = create_supervisor_agent(
    supervisor_model=supervisor,
    specialists=[
        SpecialistSpec(
            name="researcher",
            prompt="You gather facts.",
            model=worker_model,
        ),
        SpecialistSpec(
            name="summariser",
            prompt="You produce concise summaries.",
            model=worker_model,
        ),
    ],
    supervisor_prompt="Delegate research and summarisation to specialists.",
)

Swap providers by changing provider="anthropic" to "openai", "xai", "google_genai", "bedrock_converse", or "azure_openai". Swap deployment by replacing DirectAdapter with BedrockAgentCoreAdapter / VertexAgentEngineAdapter / AzureAIAgentAdapter.

MCP integration

from langgraph_forge import MCPConfig, MCPServerConfig, load_mcp_tools

config = MCPConfig(
    servers={
        "filesystem": MCPServerConfig(
            transport="stdio",
            command="npx",
            args=["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
        ),
    }
)
tools = await load_mcp_tools(config)

Extending: writing a new deployment adapter

Every adapter satisfies the DeploymentAdapter Protocol (name, extras, prepare, invoke, template fragment). Third-party packages register via the langgraph_forge.deployment_adapters entry-point group, which means adding a fifth target does not require a PR to this repo.

# your_package/pyproject.toml
[project.entry-points."langgraph_forge.deployment_adapters"]
modal = "your_package.modal_adapter:ModalAdapter"

After pip install your-package, langgraph-forge list-deploy includes modal and --deploy modal works in init.

Not included — by design

Listed so expectations stay calibrated. These are out of scope in v0.1, many permanently:

  • Swarm pattern / non-supervisor multi-agent topologies (may return in v0.3+)
  • LangSmith / OpenTelemetry / tracing / metrics
  • Prompt versioning, PromptPack, content_hash, prompt registry, eval harness
  • Tool allowlists, SideEffectGate, autonomy gates, budget / cost ceilings, cycle detection
  • Schema registry, output-envelope validation, per-specialist output_type
  • Peer review, human review queue, ExceptionTicket, routing hints
  • HTTP / REST serving, WebSocket, SSE, web UI
  • Auth(n/z), permissions, multi-tenancy, rate limiting
  • DynamoDB / S3 / custom persistence beyond langgraph.checkpoint.*
  • Model-chain fallback (compose LangChain's with_fallbacks yourself)
  • Streaming helpers (graph.astream() is already the answer)

Documentation

Deeper material lives under docs/, organised by audience and (for user docs) by Diátaxis quadrant:

Versioning

Pre-1.0; see VERSIONING.md for the full policy (breaking-change rule, deprecation grace period, yank policy, and the gates to 1.0). Release notes live in GitHub Releases.

Contributing

See CONTRIBUTING.md for the full flow (fork → branch → PR → review). Deeper material in docs/contributing/.

Security

See SECURITY.md for private disclosure.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgraph_forge-0.4.0a1.tar.gz (61.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langgraph_forge-0.4.0a1-py3-none-any.whl (61.8 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_forge-0.4.0a1.tar.gz.

File metadata

  • Download URL: langgraph_forge-0.4.0a1.tar.gz
  • Upload date:
  • Size: 61.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for langgraph_forge-0.4.0a1.tar.gz
Algorithm Hash digest
SHA256 cddc5ffb1c3ab060af9049a5382e74779aa051905381456f4da8b4c9405de4e4
MD5 ca3f6db5a50382e72ce297ca43eabd70
BLAKE2b-256 5fb35839143942f3c37796c75e99c95e7eeb92d694c1b8a0568ad42794f57bd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for langgraph_forge-0.4.0a1.tar.gz:

Publisher: publish.yml on jieyao-MilestoneHub/langgraph-forge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langgraph_forge-0.4.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for langgraph_forge-0.4.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 271ad48531092fc07e59d099cdfd26997b1e76dd4a142a1eb286035e84a6bab3
MD5 a484fe1f7468220560fc505b59c2c17c
BLAKE2b-256 797bd24510e6730c8927d9fbad550df84d6468a82050e60636e87a872108c532

See more details on using hashes here.

Provenance

The following attestation bundles were made for langgraph_forge-0.4.0a1-py3-none-any.whl:

Publisher: publish.yml on jieyao-MilestoneHub/langgraph-forge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page