We implemented Anthropic's Skills approach using LangChain v1, feedbacks

Hi,

The explanation for the project and the code is here : Building Claude-Style Skills in LangChain v1

Feedback I’d like to share:

  • It is confusing that create_agent requires all tools to be defined upfront.
  • I was surprised to see that the State has to be defined in the middleware. Maybe the docs for LangChain v1 could explain why that is the case in greater details, and how to leverage this.
  • The types and objects we use there (runtime, request, handler) were quite a headache. Sometimes I was wondering where I had to get the state from, etc… Somehow I think the concept of State is less important in v1 than in v0.x, but it creates a bit of complexity.

This is the first project I do in plain v1 from scratch, so this might be the normal learning curve.

I hope this feedback helps,

Have fun !

  • It is confusing that create_agent requires all tools to be defined upfront.

We might relax this requirement in the future. It hasn’t come up in the past as a feature that folks need.

  • I was surprised to see that the State has to be defined in the middleware. Maybe the docs for LangChain v1 could explain why that is the case in greater details, and how to leverage this

It doesn’t have to be, you can define provide state as a parameter to create_agent.

  • The types and objects we use there (runtime, request, handler) were quite a headache. Sometimes I was wondering where I had to get the state from, etc… Somehow I think the concept of State is less important in v1 than in v0.x, but it creates a bit of complexity.

The request and handler were introduced to raise the ceiling of what can be done in the hook (e.g., retries, rate limiting, fallbacks, short-circuiting, caches, running requests in parallel with different models). All of this functionality is enabled by request and handler. So the ceiling in terms of what you can do is very high here!

What would you suggest we improve or which parts did you not like in this API?

1 Like

“We might relax this requirement in the future. It hasn’t come up in the past as a feature that folks need.”

Please see my comment on Are dynamic tool lists allowed when using create_agent? - #8 by rhlarora84

Apart from allowing tools declaration/discovery mid-run, I think most of what can be improved is related to the docs and examples. If you can nail those, then the API is pretty well designed. I simply wanted to share how it felt (for me) right now - it doesn’t necessarily mean you made incorrect choices. :wink: Thanks for answering.

“We might relax this requirement in the future. It hasn’t come up in the past as a feature that folks need.”

How? Are people really compiling each time a user talk to their agents? This very issue is preventing my company from migrating to langchain v1 :frowning:

Is there a workaround for this?

The only one I can think of is using a real Claude Skill approach where you basically have only one tool (command line) and this command line tool calls your other tools. This is really not something I advize you to do (since mistakes are likely), but until langchain moves… I don’t know.

@rhlarora84 any news on this ?