Skip to main content

LangGraph integration for by-framework

Project description

by-framework-langgraph

LangGraph integration for by-framework. Provides two integration modes:

  1. Adapter Mode — Plug existing LangGraph graphs into by-framework with one line
  2. Native Mode — Build LangGraph workers with native call_agent / ask_user / resume support

Installation

uv add by-framework-langgraph

Quick Start

Adapter Mode — Plug in existing graphs

from by_framework.worker import ByaiWorker
from by_framework_langgraph import LangGraphAdapter

class MyWorker(ByaiWorker):
    def get_agent_types(self):
        return ["my-agent"]

    async def process_command(self, command, context):
        graph = build_my_existing_graph()  # your existing LangGraph
        adapter = LangGraphAdapter(graph, context)
        return await adapter.run(command)

Native Mode — Framework-native LangGraph workers

from by_framework_langgraph import LangGraphWorker, make_remote_agent_tool, make_ask_user_tool

class OrchestratorWorker(LangGraphWorker):
    def get_agent_types(self):
        return ["orchestrator"]

    def build_graph(self, context, command):
        poet = make_remote_agent_tool(context, "invoke_poet", "poet-agent", "调度诗人创作")
        ask = make_ask_user_tool(context)
        llm = ChatOpenAI(model="gpt-4o").bind_tools([poet, ask])
        # ... build and return compiled graph

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

by_framework_langgraph-0.0.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

by_framework_langgraph-0.0.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file by_framework_langgraph-0.0.1.tar.gz.

File metadata

  • Download URL: by_framework_langgraph-0.0.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for by_framework_langgraph-0.0.1.tar.gz
Algorithm Hash digest
SHA256 571a694d1f089a924493d74d7287676578fcac34eaf133b00ad2f3eb0dc93249
MD5 434b131370b7475007eac5fc49f618aa
BLAKE2b-256 df7fe877693a0b9808d3e9eac569989992f153ad2a7cf3c0678ad2aca9e78f56

See more details on using hashes here.

Provenance

The following attestation bundles were made for by_framework_langgraph-0.0.1.tar.gz:

Publisher: publish.yml on beyonai/by-framework-python

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

File details

Details for the file by_framework_langgraph-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for by_framework_langgraph-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5c34b87dae8b66e9c77b05436bcb784299c33d562ef98d2d16cd017fe9b8050
MD5 77e14bc987da6f08f4b579895c027ace
BLAKE2b-256 e62ed0bb28b183d1a6f9f990e0eb1ed163987bcc908557024c86177b9503aee7

See more details on using hashes here.

Provenance

The following attestation bundles were made for by_framework_langgraph-0.0.1-py3-none-any.whl:

Publisher: publish.yml on beyonai/by-framework-python

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