-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: deploy docs #2162
base: main
Are you sure you want to change the base?
WIP: deploy docs #2162
Conversation
|
||
Assuming everything is running correctly, you should see a response like: | ||
|
||
```shell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new lines after each ,
so it's readable?
``` | ||
### Define your graph in `agent.py`: | ||
|
||
# TODO: this should be more self contained |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
create react agent? with a sample tool perhaps? and maybe a link to something to customize
-
Do we have ready made apps (i.e., the templates) that we could pre-generate w/ the CLI? (don't think it's a feature now)
condition: service_healthy | ||
environment: | ||
REDIS_URI: redis://langgraph-redis:6379 | ||
LANGSMITH_API_KEY: {LANGSMITH_API_KEY} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LANGSMITH_API_KEY: {LANGSMITH_API_KEY} | |
LANGSMITH_API_KEY: ${LANGSMITH_API_KEY} |
retries: 5 | ||
interval: 5s | ||
langgraph-api: | ||
image: {IMAGE_NAME} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image: {IMAGE_NAME} | |
image: ${IMAGE_NAME} |
POSTGRES_URI: postgres://postgres:postgres@langgraph-postgres:5432/postgres?sslmode=disable | ||
``` | ||
|
||
You can then run `docker compose up` with this Docker compose file in the same folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can then run `docker compose up` with this Docker compose file in the same folder. | |
You can then run `IMAGE_NAME=my-image docker compose up` with this Docker compose file in the same folder. |
@@ -0,0 +1,152 @@ | |||
# LangGraph Deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "LangGraph Deploy" ? Is there a better name for this? i.e., langgraph deploy is that a product name?
|
||
🎁 Automatic HTTP prediction server: Your agent definition is used to dynamically generate a RESTful HTTP API. | ||
|
||
🥞 Automatic queue worker. Long-running agents or batch processing is best architected with a queue. LangGraph Deploy manages this out of the box. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are additional features like webhooks and cron jobs that are really great
"graphs": { | ||
"agent": "./my_agent/agent.py:graph" | ||
}, | ||
"env": ".env" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confused about how env
works actually given that we're making a baked image, presumably configuration is provided later on when running container?
|
||
When running this server, you need to pass three environment variables: | ||
|
||
# TODO: change DATABASE_URL name to POSTGRES_URI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If using a different check-pointer (e.g., REDIS) how would this behave?
langgraph-api: | ||
image: {IMAGE_NAME} | ||
ports: | ||
- "8123:8000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider binding to localhost instead -- don't know if users necessarily expect this to be available on the LAN by default
- "8123:8000" | |
- "127.0.0.1:8123:8000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually not sure maybe in this context of deployment we should assume that users want 0.0.0.0
-- mostly a difference between deploy vs. test
|
||
```shell | ||
curl --request POST \ | ||
--url 0.0.0.0:8123/threads \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a request to ok
rather than threads
|
||
```shell | ||
curl --request POST \ | ||
--url 0.0.0.0:8123/threads \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--url 0.0.0.0:8123/threads \ | |
--url localhost:8123/ok \ |
No description provided.