Section Insights
Introduction to LangChain and LangSmith
What are LangChain and LangSmith, and how do they work with Cloud Code?
LangChain and LangSmith are tools that enhance Cloud Code's ability to build, observe, and iterate on agents. They provide guidance on best practices, dependencies, and orchestration.
- LangChain and LangSmith improve agent development efficiency.
- Cloud Code uses skills to streamline the creation of agents.
- Best practices are integrated into the development process.
Running Research Queries
How does Cloud Code execute research tasks?
Cloud Code runs research queries by utilizing its skills to ensure concise results while maintaining functionality.
- Research queries can be executed effectively with Cloud Code.
- Conciseness in results is prioritized without losing functionality.
- Skills help in managing complex configurations.
Creating a Dataset for Testing
How does Cloud Code prepare a dataset for the agent?
Cloud Code invokes the dataset and trace skills to create a dataset, ensuring proper API key usage and format.
- Dataset creation is automated through skill invocation.
- API keys are managed efficiently by Cloud Code.
- Skills facilitate consistent data handling.
Uploading the Dataset to LangSmith
What steps does Cloud Code take to upload the dataset?
Cloud Code builds a script to upload the dataset to LangSmith, capturing the necessary trajectory without manual reasoning.
- Automated scripts simplify the dataset upload process.
- Skills eliminate the need for manual format reasoning.
- Trajectory capture is essential for effective data management.
Evaluating the Agent's Performance
How does Cloud Code evaluate the agent's results?
Cloud Code creates an evaluator using the evaluator skill, which is then tested and uploaded to LangSmith for automatic use.
- An effective evaluator is crucial for assessing agent performance.
- Skills provide best practices for creating evaluators.
- Testing ensures the evaluator's reliability before use.
Reviewing Evaluation Results
What insights can be gained from the evaluation results?
The evaluation shows a strong match between expected and actual outputs, indicating successful agent performance.
- Successful evaluations validate the agent's effectiveness.
- Traces provide insights into the agent's decision-making process.
- Continuous improvement is supported by evaluation feedback.
Transcript
0:00 In this video, we'll be showing how to use LangChain and LangSmith skills with Cloud Code. We'll see how Cloud Code can use skills to effectively build, observe, and iterate on an agent. To start, we just asked Cloud Code to generate us a deep research agent that can delegate tasks to workers. You can see Cloud call her skills for guidance. Without them, Cloud wouldn't know best practices. With skills, it knows dependencies, structures, and orchestration out of the gate. And we can watch it put together our agent in one shot.
0:29 Once Cloud has finished putting together our agent, we can ask it to run some research for us. But to make sure that the research is concise, we'll also ask Cloud to ensure we're tracing to LangSmith. And with skills, Cloud knows what to check without having to search the docs or explore code. We can see that what it does is it reflects on the deep agent that it's put together to simplify the coordinator and sub-agent configurations. This allows research to be more concise without sacrificing functionality.
0:58 Let's go ahead and run some research to see the results. We're going to be using two test queries. The first will be about Chinese restaurants in New York and San Francisco. And the second will be about AI trends in 2026. Let's give Cloud a second to finish running the research. It looks like both queries have successfully returned. And at this point, we want to prepare our agent for testing. So, let's ask Cloud Code to help us make a data set for our agent.
1:31 We can see that the first thing it's going to do is invoke the data set skill, as well as the trace skill, to learn how to export traces and use them in data sets. Cloud Code will need a second to find our API keys, but from that point on, it will be smooth sailing. Cloud will no longer need to fumble around for the right API format to successfully leverage LangSmith. Skills are what enable Cloud to efficiently and consistently find the right path in working with LangChain and LangSmith.
2:01 In our pre-builts, we cover LangChain, LangGraph, Deep Agents, and LangSmith to ensure that Claude has a deep understanding of all areas in our ecosystem. And in the tasks so far, it's used a variety of those skills to complete our requests. As we watch Claude, we can see that it has used our inbuilt CLI to find traces and understand the full trajectory of our agent from to-dos to delegation. With skills, it's then able to build a script to effectively upload that data set to LangSmith, as well as capture the trajectory that we need.
2:36 Without skills, Claude would need to reason itself over the right format to capture the trajectory successfully. Let's give Claude a second to finish uploading its data set to LangSmith. Now that our data set is done, the final step in the agent life cycle is to run our agent against the data set. To do so, we'll need an evaluator for judging our results. And specifically, we're interested in tool called match percentage. Let's watch Claude put together the evaluator.
3:07 The first thing it's going to do is invoke the evaluator skill. And at this point, it's going to read the skill to understand best practices for both making an evaluator, as well as uploading the evaluator into LangSmith to be auto-used on our data set. We see that Claude has finished reading the skill and has used it to put together an effective evaluator. It's then going to decide to test this evaluator before it uploads it to LangSmith.
3:45 Now that the evaluator is uploaded, Claude is going to run its tests, and then it's going to run the actual evaluation. So, let's go ahead and switch over to LangSmith to see what Claude created. Let's first take a look at the traces Claude generated. We can see that we've captured complex traces from our deep agent runs. And we've concisely summarized some results about AI trends in 2026 using our deep agent.
4:16 Now, we can open up and see a similar trace of our research query around Chinese restaurants in New York and San Francisco. And we can also see the data set that Claude uploaded, as well as the evaluation that it's run. It looks like the evaluator that it's made has shown us that we have a great match between our expected trajectory and our actual output.
Summary
- Cloud Code generates a deep research agent capable of delegating tasks to workers.
- Skills provide Cloud with best practices, dependencies, and orchestration knowledge.
- The agent runs research queries on topics like Chinese restaurants and AI trends in 2026.
- Cloud Code uses skills to create a dataset and manage API keys seamlessly.
- The agent employs an evaluator skill to assess results using a match percentage tool.
- Traces of the agent's operations are captured, providing insights into its performance.
- The evaluation shows a strong match between expected and actual outputs, demonstrating the effectiveness of the agent.
Questions Answered
What are LangChain and LangSmith, and how do they work with Cloud Code?
LangChain and LangSmith are tools that enhance Cloud Code's ability to build, observe, and iterate on agents. They provide guidance on best practices, dependencies, and orchestration.
How does Cloud Code execute research tasks?
Cloud Code runs research queries by utilizing its skills to ensure concise results while maintaining functionality.
How does Cloud Code prepare a dataset for the agent?
Cloud Code invokes the dataset and trace skills to create a dataset, ensuring proper API key usage and format.
What steps does Cloud Code take to upload the dataset?
Cloud Code builds a script to upload the dataset to LangSmith, capturing the necessary trajectory without manual reasoning.
How does Cloud Code evaluate the agent's results?
Cloud Code creates an evaluator using the evaluator skill, which is then tested and uploaded to LangSmith for automatic use.
What insights can be gained from the evaluation results?
The evaluation shows a strong match between expected and actual outputs, indicating successful agent performance.