This documentation is a proprietary company article for company affiliate only.

Screen Shot 2024-06-20 at 2.14.59 PM.png

https://www.callstack.com/blog/building-ai-agent-workflows-with-vercels-ai-sdk-a-practical-guide

AI State https://sdk.vercel.ai/docs/reference/ai-sdk-rsc/use-ai-state The AI state is a Json input passed into the language model and can be accessed both on the server and the client side.

UI State https://sdk.vercel.ai/docs/reference/ai-sdk-rsc/use-ui-state Holds all the messages we show to the user and it can only be accessed on the client side.

create streamable UI. https://sdk.vercel.ai/docs/reference/ai-sdk-rsc/create-streamable-ui Creates a UI stream which is used to send react nodes to the client site as part of a stream from the server site. You can send both client and server component updates as part of this API.

Generate object https://sdk.vercel.ai/docs/reference/ai-sdk-core/generate-object enables the language model give output based on a schema.

Stream object https://sdk.vercel.ai/docs/reference/ai-sdk-core/stream-object enables the language model to stream the generated object. the stream object helps in generating UI as we stream outputs from the language model.

stream text https://sdk.vercel.ai/docs/reference/ai-sdk-core/stream-text stream text back to the client side

React Components UI components for chat and co-pilot which is is used to generate the inquiry UI

Language Model Agents:

Earth-Assitants (Agent) Task manager Researcher Inquire Query suggestion

Documentation:

Architecture

  1. Client Interaction: The user submits a query via the client interface.
  2. Task Manager: The query is received by the Task Manager. It decides whether the query is clear or needs more information.
  3. Inquire Step: If the query is unclear, the Inquire agent generates options to clarify the query. The user selects an option, and the query is updated.