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

docs: concepts for cloud and doc-reorg #2196

Merged
merged 44 commits into from
Oct 31, 2024
Merged

docs: concepts for cloud and doc-reorg #2196

merged 44 commits into from
Oct 31, 2024

Conversation

hwchase17
Copy link
Contributor

@hwchase17 hwchase17 commented Oct 26, 2024

  • Add conceptual information for langgraph cloud
  • Re-organize content

docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved
docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved
return graph.invoke({...})
```

For simple applications, this is sufficient and is not that different from deploying Python applications in general, and so we will not go into this in too much detail here.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add 1 sentence noting any requirements from checkpointer or base store implementations?

Also worth clarifying that in memory saver should not be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure what to add?

Copy link
Contributor

Choose a reason for hiding this comment

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

i was thinking just clarifying (stating the obvious) that if you're deploying and need to get checkpointing, you'll probably want to use a postgres checkpointer and to actually get it working you'll need to get a postgres instance.

docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved
docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved
docs/docs/concepts/langgraph_platform.md Outdated Show resolved Hide resolved
docs/docs/concepts/assistants.md Outdated Show resolved Hide resolved
docs/docs/concepts/assistants.md Outdated Show resolved Hide resolved

Once you've created an assistant, you can save and version it to track changes to the configuration over time. You can think about this at three levels:

1) The graph lays out the general agent application logic
Copy link
Collaborator

Choose a reason for hiding this comment

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

i wonder if this can be brought up top, otherwise a user might get a bit lost since we're using this terminology (graph/agent/assistant) a bit interchangeably on this page

docs/docs/concepts/assistants.md Outdated Show resolved Hide resolved
This option rolls back all work done up until that point.
It then sends the user input in, basically as if it just followed the original run input.

This may create some weird states - for example, you may have two `User` messages in a row, with no `Asssitant` message in between them.
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think we need to clarify here that we're talking about roles/ message types, otherwise some people might get confused on Assistant term collision

docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved
docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved
docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved

## Memory

In addition to thread-level persistence (covered above by [checkpointers](#checkpointers)) you may need to deploy some storage to support cross-thread memory.
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should probably link to memory concepts here

docs/docs/concepts/langgraph_platform.md Outdated Show resolved Hide resolved
2) The agent configuration options represent parameters that can be changed
3) Assistant versions save and track specific settings of the agent configuration options

For examples: let's imagine you have a general writing agent. You have created a general graph architecture that works well for writing. However - there are different types of writing, for examples blogs vs tweets. In order to get the best performance on each use case, you need to make some minor changes to the models and prompts used. In this setup, you could create an assistant for each use case - one for blog writing and one for tweeting. These would share the same graph structure, but they may use different models and different prompts. Read [this how-to](../cloud/how-tos/assistant_versioning.md) to learn how you can use assistant versioning through both the [Studio](../cloud/how-tos/index.md/#langgraph-studio) and the SDK.
Copy link
Contributor

Choose a reason for hiding this comment

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

OK I didn't see the new figures on mobile. The new figures make the version concept clear. The previous figures (the one currently up for versions) conflate versioning and configuration

# Deployment

Once you build your LangGraph agent, you then have to think about deploying it.
How you deploy your applications depends a bit on what it is and how you intend to use it.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: plural singular agreement

docs/docs/concepts/langgraph_platform.md Outdated Show resolved Hide resolved
We've exposed endpoints for running your graph in the background.
This includes endpoints for polling for the status of a run.

**Support for long runs**
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should be consolidated with background run?

Another way this is called sometimes is "non-blocking" endpoints. These are usually created with the assumption that the underlying workload is heavy.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it goes further than that, eg. we've made sure endpoints don't time out when an agent takes more than 60s to produce output etc

Copy link
Contributor

Choose a reason for hiding this comment

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

say more? we're sending data in flight that reports status or some kind of heart beat to make sure connection doesn't get timed out?


There are several deployment options for LangGraph Platform.

| | Free | Self Hosted | Bring Your Own Cloud | Cloud |
Copy link
Contributor

Choose a reason for hiding this comment

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

The free column is confusing.

Feels like we're mixing tiers vs. deployment options


### Cron Jobs

It's often useful to run assistants on some schedule. LangGraph Cloud supports cron jobs, which run on a user defined schedule. The user specifies a schedule, an assistant, and some input. After than, on the specified schedule LangGraph cloud will:
Copy link
Contributor

Choose a reason for hiding this comment

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

needs 1 sentence example as motivation


### Cron Jobs

It's often useful to run assistants on some schedule. LangGraph Cloud supports cron jobs, which run on a user defined schedule. The user specifies a schedule, an assistant, and some input. After than, on the specified schedule LangGraph cloud will:
Copy link
Contributor

Choose a reason for hiding this comment

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

"After that, on the specified schedule LangGraph cloud will:" fragment

@@ -0,0 +1,33 @@
# LangGraph Studio

LangGraph Studio offers a new way to develop LLM applications by providing a specialized agent IDE that enables visualization, interaction, and debugging of complex agentic applications
Copy link
Contributor

Choose a reason for hiding this comment

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

LangGraph Studio is a specialized agent IDE that enables visualization, interaction, and debugging of complex agentic applications.

@@ -0,0 +1,33 @@
# LangGraph Studio
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know that the overview is motivating enough here.

How exactly does it improve collaboration with teammates?
Why is an IDE useful?

## LangGraph Platform

Streaming is critical for making LLM applications feel responsive to end users. When creating a streaming run, the streaming mode determines what data is streamed back to the API client. LangGraph Platform supports five streaming modes.
Copy link
Contributor

Choose a reason for hiding this comment

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

This content feels duplicated since many of the modes should've already been documented?

Ideally we only document the differential

**Background runs**

We've exposed endpoints for running your graph in the background.
This includes endpoints for polling for the status of a run.
Copy link
Contributor

Choose a reason for hiding this comment

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

As well as joining the real-time output stream of a background run.


**Streaming endpoints**

Endpoints that expose [multiple different streaming modes](streaming.md). We've made these work even for long running agents that may go minutes between steam event.
Copy link
Contributor

Choose a reason for hiding this comment

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

We also have support for re-joining the stream for an existing run if the connection drops, without interrupting the run

| Who manages the infrastructure | You | You | Us | Us |
| With whom does the data reside | You | You | You | Us |
| LangGraph Studio Included? | ❌ | ✅ | ✅ | ✅ |
| Assistants Included? | ❌ | ✅ | ✅ | ✅ |
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add crons/scheduled runs

docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved
docs/docs/concepts/deployment.md Outdated Show resolved Hide resolved
We've exposed endpoints for running your graph in the background.
This includes endpoints for polling for the status of a run.

**Support for long runs**
Copy link
Contributor

Choose a reason for hiding this comment

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

say more? we're sending data in flight that reports status or some kind of heart beat to make sure connection doesn't get timed out?

@eyurtsev eyurtsev changed the title concepts for cloud docs: concepts for cloud and doc-reorg Oct 28, 2024
@eyurtsev eyurtsev self-requested a review October 28, 2024 16:27
@eyurtsev eyurtsev merged commit d0e59f4 into main Oct 31, 2024
57 checks passed
@eyurtsev eyurtsev deleted the harrison/concepts-cloud branch October 31, 2024 03:34
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.

6 participants