Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

WIP: deploy docs #2162

wants to merge 4 commits into from

Conversation

hwchase17
Copy link
Contributor

No description provided.

@hwchase17 hwchase17 changed the title deploy docs WIP: deploy docs Oct 23, 2024

Assuming everything is running correctly, you should see a response like:

```shell
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. create react agent? with a sample tool perhaps? and maybe a link to something to customize

  2. 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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LANGSMITH_API_KEY: {LANGSMITH_API_KEY}
LANGSMITH_API_KEY: ${LANGSMITH_API_KEY}

retries: 5
interval: 5s
langgraph-api:
image: {IMAGE_NAME}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

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.
Copy link
Contributor

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"
Copy link
Contributor

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?
Copy link
Contributor

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"
Copy link
Contributor

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

Suggested change
- "8123:8000"
- "127.0.0.1:8123:8000"

Copy link
Contributor

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 \
Copy link
Contributor

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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--url 0.0.0.0:8123/threads \
--url localhost:8123/ok \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants