CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-langgraph-cli

tessl install tessl/pypi-langgraph-cli@0.4.0

CLI for interacting with LangGraph API

Agent Success

Agent success rate when using this tile

74%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.17x

Baseline

Agent success rate without this tile

63%

task.mdevals/scenario-9/

Custom LangGraph Server Profile

Utility to produce a langgraph.json profile that mounts a custom HTTP app, wires optional auth/encryption handlers, and selectively disables platform endpoints.

Capabilities

Accepts custom ASGI app

  • When given a module path like ./api/app.py:create_app, the profile sets http.app to that value and ensures the dependencies include the local project path so the module is reachable inside the container. @test

Endpoint toggles

  • Accepts a list of route groups to disable (assistants, threads, runs, store, mcp, meta) and sets matching disable_* flags while leaving unspecified groups enabled. @test

Auth and encryption hooks

  • Accepts an auth handler path and optional encryption handler path, mapping them into auth.path and encryption.path; values missing the required module:attribute format raise a ValueError. @test

CORS and headers configuration

  • Applies CORS allowlists plus configurable/logging headers, merging provided request/response header templates and preserving defaults when values are omitted. @test

Implementation

@generates

API

from typing import TypedDict, Optional, Iterable, Mapping, Any

class CorsConfig(TypedDict, total=False):
    allow_origins: list[str]
    allow_methods: list[str]
    allow_headers: list[str]
    allow_credentials: bool
    max_age: int

class HeaderConfig(TypedDict, total=False):
    request: Mapping[str, str]
    response: Mapping[str, str]

class ServerProfile(TypedDict, total=False):
    dependencies: list[str]
    http: dict[str, Any]
    auth: dict[str, Any]
    encryption: Optional[dict[str, Any]]
    env: Optional[dict[str, str]]

def build_server_profile(
    app_path: str,
    disabled_routes: Iterable[str],
    auth_handler: str,
    encryption_handler: Optional[str],
    cors: Optional[CorsConfig] = None,
    configurable_headers: Optional[HeaderConfig] = None,
    logging_headers: Optional[HeaderConfig] = None,
) -> ServerProfile:
    """Return a langgraph.json-ready profile containing http.app wiring, disable_* flags, and security hooks."""

def write_profile(profile: ServerProfile, filepath: str) -> None:
    """Persist the profile as JSON with stable ordering suitable for langgraph CLI commands."""

Dependencies { .dependencies }

langgraph-cli { .dependency }

CLI for building and running LangGraph servers with custom HTTP apps, auth/encryption hooks, endpoint toggles, and CORS/header policies.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/langgraph-cli@0.4.x
tile.json