tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
init langgraph, langgraph-sdk, and langgraph-cli
Sarah Clark
2 years ago
04683d1b
8a6b6167
+210
5 changed files
expand all
collapse all
unified
split
pkgs
by-name
la
langgraph-cli
package.nix
development
python-modules
langgraph
default.nix
langgraph-cli
default.nix
langgraph-sdk
default.nix
top-level
python-packages.nix
+3
pkgs/by-name/la/langgraph-cli/package.nix
···
0
0
0
···
1
+
{ python3Packages }:
2
+
3
+
python3Packages.toPythonApplication python3Packages.langgraph-cli
+68
pkgs/development/python-modules/langgraph-cli/default.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{
2
+
lib,
3
+
buildPythonPackage,
4
+
click,
5
+
fetchFromGitHub,
6
+
nix-update-script,
7
+
poetry-core,
8
+
pytest-asyncio,
9
+
pytestCheckHook,
10
+
pythonOlder,
11
+
}:
12
+
13
+
buildPythonPackage rec {
14
+
pname = "langgraph-cli";
15
+
version = "0.1.49";
16
+
pyproject = true;
17
+
18
+
disabled = pythonOlder "3.10";
19
+
20
+
src = fetchFromGitHub {
21
+
owner = "langchain-ai";
22
+
repo = "langgraph";
23
+
rev = "refs/tags/cli==${version}";
24
+
hash = "sha256-yphXboJA/TLGIPggb2Cvsxn1+WUSYMzC0wPHft3TGvo=";
25
+
};
26
+
27
+
sourceRoot = "${src.name}/libs/cli";
28
+
29
+
build-system = [ poetry-core ];
30
+
31
+
dependencies = [ click ];
32
+
33
+
nativeCheckInputs = [
34
+
pytest-asyncio
35
+
pytestCheckHook
36
+
];
37
+
38
+
pytestFlagsArray = [ "tests/unit_tests" ];
39
+
40
+
pythonImportsCheck = [ "langgraph_cli" ];
41
+
42
+
disabledTests = [
43
+
# Flaky tests that generate a Docker configuration then compare to exact text
44
+
"test_config_to_docker_simple"
45
+
"test_config_to_docker_pipconfig"
46
+
"test_config_to_compose_env_vars"
47
+
"test_config_to_compose_env_file"
48
+
"test_config_to_compose_end_to_end"
49
+
"test_config_to_compose_simple_config"
50
+
"test_config_to_compose_watch"
51
+
];
52
+
53
+
passthru.updateScript = nix-update-script {
54
+
extraArgs = [
55
+
"--version-regex"
56
+
"cli==(.*)"
57
+
];
58
+
};
59
+
60
+
meta = {
61
+
description = "Official CLI for LangGraph API";
62
+
homepage = "https://github.com/langchain-ai/langgraph/libs/cli";
63
+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${version}";
64
+
mainProgram = "langgraph";
65
+
license = lib.licenses.mit;
66
+
maintainers = with lib.maintainers; [ sarahec ];
67
+
};
68
+
}
+58
pkgs/development/python-modules/langgraph-sdk/default.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{
2
+
lib,
3
+
buildPythonPackage,
4
+
fetchFromGitHub,
5
+
httpx,
6
+
httpx-sse,
7
+
orjson,
8
+
poetry-core,
9
+
pythonOlder,
10
+
writeScript,
11
+
}:
12
+
13
+
buildPythonPackage rec {
14
+
pname = "langgraph-sdk";
15
+
version = "0.1.26";
16
+
pyproject = true;
17
+
18
+
disabled = pythonOlder "3.9";
19
+
20
+
src = fetchFromGitHub {
21
+
owner = "langchain-ai";
22
+
repo = "langgraph";
23
+
rev = "refs/tags/sdk==${version}";
24
+
hash = "sha256-o7JrB2WSWfPm927tDRMcjzx+6Io6Q+Yjp4XPVs2+F4o=";
25
+
};
26
+
27
+
sourceRoot = "${src.name}/libs/sdk-py";
28
+
29
+
build-system = [ poetry-core ];
30
+
31
+
dependencies = [
32
+
httpx
33
+
httpx-sse
34
+
orjson
35
+
];
36
+
37
+
pythonImportsCheck = [ "langgraph_sdk" ];
38
+
39
+
passthru = {
40
+
# python3Packages.langgraph-sdk depends on python3Packages.langgraph. langgraph-cli is independent of both.
41
+
updateScript = writeScript "update.sh" ''
42
+
#!/usr/bin/env nix-shell
43
+
#!nix-shell -i bash -p nix-update
44
+
45
+
set -eu -o pipefail
46
+
nix-update --commit --version-regex '(.*)' python3Packages.langgraph
47
+
nix-update --commit --version-regex 'sdk==(.*)' python3Packages.langgraph-sdk
48
+
'';
49
+
};
50
+
51
+
meta = {
52
+
description = "SDK for interacting with the LangGraph Cloud REST API";
53
+
homepage = "https://github.com/langchain-ai/langgraphtree/main/libs/sdk-py";
54
+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/sdk==${version}";
55
+
license = lib.licenses.mit;
56
+
maintainers = with lib.maintainers; [ sarahec ];
57
+
};
58
+
}
+75
pkgs/development/python-modules/langgraph/default.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{
2
+
lib,
3
+
buildPythonPackage,
4
+
aiosqlite,
5
+
dataclasses-json,
6
+
fetchFromGitHub,
7
+
grandalf,
8
+
httpx,
9
+
langchain-core,
10
+
langgraph-sdk,
11
+
langsmith,
12
+
poetry-core,
13
+
pydantic,
14
+
pytest-asyncio,
15
+
pytest-mock,
16
+
pytest-xdist,
17
+
pytestCheckHook,
18
+
pythonOlder,
19
+
syrupy,
20
+
}:
21
+
22
+
buildPythonPackage rec {
23
+
pname = "langgraph";
24
+
version = "0.1.9";
25
+
pyproject = true;
26
+
27
+
disabled = pythonOlder "3.10";
28
+
29
+
src = fetchFromGitHub {
30
+
owner = "langchain-ai";
31
+
repo = "langgraph";
32
+
rev = "refs/tags/${version}";
33
+
hash = "sha256-sBjSfKzcILkHgvo8g/NHC+/yUjQSyZB/8xaSCY3rPDs=";
34
+
};
35
+
36
+
sourceRoot = "${src.name}/libs/langgraph";
37
+
38
+
build-system = [ poetry-core ];
39
+
40
+
dependencies = [ langchain-core ];
41
+
42
+
pythonImportsCheck = [ "langgraph" ];
43
+
44
+
nativeCheckInputs = [
45
+
aiosqlite
46
+
dataclasses-json
47
+
grandalf
48
+
httpx
49
+
langsmith
50
+
pydantic
51
+
pytest-asyncio
52
+
pytest-mock
53
+
pytest-xdist
54
+
pytestCheckHook
55
+
syrupy
56
+
];
57
+
58
+
pytestFlagsArray = [ "--snapshot-update" ];
59
+
60
+
disabledTests = [
61
+
"test_doesnt_warn_valid_schema" # test is flaky due to pydantic error on the exception
62
+
];
63
+
64
+
passthru = {
65
+
updateScript = langgraph-sdk.updateScript;
66
+
};
67
+
68
+
meta = {
69
+
description = "Build resilient language agents as graphs";
70
+
homepage = "https://github.com/langchain-ai/langgraph";
71
+
changelog = "https://github.com/langchain-ai/langgraph/releases/tag/${version}";
72
+
license = lib.licenses.mit;
73
+
maintainers = with lib.maintainers; [ sarahec ];
74
+
};
75
+
}
+6
pkgs/top-level/python-packages.nix
···
6660
6661
langfuse = callPackage ../development/python-modules/langfuse { };
6662
0
0
0
0
0
0
6663
langid = callPackage ../development/python-modules/langid { };
6664
6665
langsmith = callPackage ../development/python-modules/langsmith { };
···
6660
6661
langfuse = callPackage ../development/python-modules/langfuse { };
6662
6663
+
langgraph = callPackage ../development/python-modules/langgraph { };
6664
+
6665
+
langgraph-cli = callPackage ../development/python-modules/langgraph-cli { };
6666
+
6667
+
langgraph-sdk = callPackage ../development/python-modules/langgraph-sdk { };
6668
+
6669
langid = callPackage ../development/python-modules/langid { };
6670
6671
langsmith = callPackage ../development/python-modules/langsmith { };