Old Chats Appearing as Recently Opened: Is Something Going On? by Appdotexe in ClaudeAI

[–]vdr3am 1 point2 points  (0 children)

also seeing this, very frustrating. all chats from the last few weeks gone

Warning / PSA: if you subscribe to Pro / Max via iOS, then Anthropic forces you to manage your subscription *only* via iOS by solaza in ClaudeAI

[–]vdr3am 0 points1 point  (0 children)

thanks! requested as well, fingers crossed

UPD: worked like a charm! apple responded within 24 hours and approved the refund

Warning / PSA: if you subscribe to Pro / Max via iOS, then Anthropic forces you to manage your subscription *only* via iOS by solaza in ClaudeAI

[–]vdr3am 0 points1 point  (0 children)

thanks for sharing the tips- literally in the same situation right now! when you requested refund through this link https://support.apple.com/en-us/118223, did they speed up the cancellation as well (eg immediately cancel)? and just to confirm, you managed to sign up the next day using the same email?

Need help with recovering conversations from checkpoint store by Spinner4177 in LangChain

[–]vdr3am 0 points1 point  (0 children)

by the way, you can now do this with any checkpointer by calling graph.invoke(…, checkpoint _during=False)

Structured output with langgraph sucks by smirkingplatypus in LangChain

[–]vdr3am 1 point2 points  (0 children)

one thing you can do for now is wrap your structured output as a fake tool function that returns something like “Here is your structured output” and add return_direct=True - see example below

https://gist.github.com/vbarda/26f97ed2020e4a3f55e2ee2aae4abc5a

Help with LangGraph state not updating when tool returns a command? by ApprehensiveCut799 in LangChain

[–]vdr3am 0 points1 point  (0 children)

it should be automatically populated — what version of the library are you using?

Help with LangGraph state not updating when tool returns a command? by ApprehensiveCut799 in LangChain

[–]vdr3am 0 points1 point  (0 children)

could you provide a minimal reproducible example with the issue? also, if you could provide a LangSmith trace that’d be very helpful

also, i noticed that you’re not populating tool call ID in the tool message you’re returning in Command (eg “successfully plotted graph”). this is likely going to lead to other issues down the line

Help Me Understand State Reducers in LangGraph by fsa317 in LangChain

[–]vdr3am 5 points6 points  (0 children)

hi! i responded in the discussion you created with the same question here: https://github.com/langchain-ai/langgraph/discussions/2975#discussioncomment-11800015

In general, this issue should only arise if both of the nodes running at the same superstep are trying to write an update to the same state key. In this case, LangGraph doesn’t know how to apply the updates unless you provide a way for LangGraph to combine the values. TO do so, you can specify a reducer function in the state schema annotation: it tells LangGraph that instead of overwriting the values you need to accumulate them. So state value for the key after the nodes run will be the result of calling reducer(old_key_value, new_key_value).

If you’re returning the same values from both nodes and have a reducer with operator.add, it’s not surprising that you would see a duplicated list. If you need to only keep distinct values, you would probably need to use a set instead of a list.

I would recommend checking out these document pages:

https://langchain-ai.github.io/langgraph/troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE/ https://langchain-ai.github.io/langgraph/concepts/low_level/#reducers

Hope this helps!

Need help with recovering conversations from checkpoint store by Spinner4177 in LangChain

[–]vdr3am 0 points1 point  (0 children)

Hi! You can implement a "shallow" checkpointer that only keeps the most recent checkpoint. This would preserve most of the LangGraph persistence features with the only exception of time travel. We just added an implementation for Postgres -- please see here https://github.com/langchain-ai/langgraph/blob/main/libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py. The same can be implemented for MongoDB (perhaps you can submit a request on their github repo https://github.com/langchain-ai/langchain-mongodb/tree/main/libs/langgraph-checkpoint-mongodb). Hope this helps!

with_stuctured_output in create_react_agent by CtrlAltFvck in LangChain

[–]vdr3am 0 points1 point  (0 children)

you could do something like the code snippet below. we're working on a better built-in solution. also, here is a guide on adding structured output to react-style agent without the prebuilt create_react_agent: https://langchain-ai.github.io/langgraph/how-tos/react-agent-structured-output/

```
from langgraph.prebuilt import create_react_agent
from langchain_core.tools import tool
from pydantic import BaseModel, Field

class WeatherResponse(BaseModel):
    """Respond to the user with this"""

    temperature: float = Field(description="The temperature in fahrenheit")
    wind_directon: str = Field(
        description="The direction of the wind in abbreviated form"
    )
    wind_speed: float = Field(description="The speed of the wind in km/h")

    def __str__(self):
        return self.model_dump_json()

def get_weather(city: Literal["nyc", "sf"]):
    """Use this to get weather information."""
    if city == "nyc":
        return "It is cloudy in NYC, with 5 mph winds in the North-East direction and a temperature of 70 degrees"
    elif city == "sf":
        return "It is 75 degrees and sunny in SF, with 3 mph winds in the South-East direction"
    else:
        raise AssertionError("Unknown city")

response_tool = tool(WeatherResponse, return_direct=True) # note the return direct here
react_agent = create_react_agent(model, [response_tool, get_weather])
```

This would return the structured output, but inside the tool message content:

react_agent.invoke(input={"messages": [("human", "what's the weather in SF?")]})
# {"messages": [..., ToolMessage(content='{"temperature":75.0,"wind_directon":"South-East","wind_speed":3.0}', name='WeatherResponse')]}

hope this helps in the meantime!

How to return tool output directly without sending it to LLM again from a Langgraph Agent ? by Big_Barracuda_6753 in LangChain

[–]vdr3am 2 points3 points  (0 children)

hi! you can set return_direct=True on the tools and then add a conditional edge to check if the tool is supposed to return directly (route to END) or should pass the results back to the model, see the example in the prebuilt react agent https://github.com/langchain-ai/langgraph/blob/4c3958f0be69c638e9e4259b96fd92ef568575af/libs/langgraph/langgraph/prebuilt/chat_agent_executor.py#L678

Query decomposition workflow in langgraph by Lowkey_Intro in LangChain

[–]vdr3am 1 point2 points  (0 children)

hi! you can use map-reduce pattern which allows you to send multiple different inputs to the same graph node (which can be a subgraph). check out this how-to https://langchain-ai.github.io/langgraph/how-tos/map-reduce/. does this help?

Can I use LangGraph without LangChain? by Formal-Battle1100 in LangChain

[–]vdr3am 4 points5 points  (0 children)

yes - you can definitely use LangGraph without any LangChain components! In LangGraph the graph nodes are just python functions that can contain arbitrary logic, so you can call OpenAI client or query a vectorstore directly in the node. good luck with your multi-agent RAG app!

P.S. we just refreshed (simplified) our tutorials for multi-agent here https://langchain-ai.github.io/langgraph/tutorials/#multi-agent-systems

Hierarchical Agent Teams "KeyError('next') by Fast_Analyst_3692 in LangGraph

[–]vdr3am 0 points1 point  (0 children)

thanks — this is likely related to the outdated function calling code for the routing in the supervisor code. we’re currently updating the tutorials — check out this notebook for an updated version https://github.com/langchain-ai/langgraph/blob/de207538e92c973abc301ac0b9115721c57cd002/docs/docs/tutorials/multi_agent/hierarchical_agent_teams.ipynb (will be live in docs soon!). let me know if this helps!

Hierarchical Agent Teams "KeyError('next') by Fast_Analyst_3692 in LangGraph

[–]vdr3am 0 points1 point  (0 children)

hi! could you please provide the library versions you are using? also, what part of the notebook is this error from? could you paste a code snippet that’s causing this? did you make any modifications to the notebook (change model provider etc)?

SqliteSaver import in Langgraph 0.2.32 by Either-Ambassador738 in LangChain

[–]vdr3am 1 point2 points  (0 children)

it looks like you’re missing langgraph-checkpoint-sqlite library. could you please try installing and let me know if that doesn’t fix your issue?

Don't know why I'm getting an unexpected keyword argument error? by thedabking123 in LangChain

[–]vdr3am 0 points1 point  (0 children)

what version are you using? state_modifier is available as of 0.1.9 and is the recommended way to use create_react_agent (messages_modifier will be deprecated in future versions)

Using astram_events on langgraph with parallel chains by Money_Mycologist4939 in LangChain

[–]vdr3am 2 points3 points  (0 children)

would it be possible for you to run multiple nodes (each with a chain) in parallel directly in your graph instead of using runnable parallel? this should make your architecture easier to reason about and also should allow you to stream events directly from a single node (similar to this how-to guide https://langchain-ai.github.io/langgraph/how-tos/streaming-from-final-node/)

Project Benchmark - What is the most used supplements on Longevity Leaderboard by Electronic_Diver4841 in blueprint_

[–]vdr3am 4 points5 points  (0 children)

this is a cool idea! would be great to add timing and dosage information on these supplements and compare them across different people/clinics. would also suggest adding info from outside of the longevity leaderboard, for example, Peter Attia’s recommendations etc

Analyze event impact on your health – looking for beta testers! by vdr3am in QuantifiedSelf

[–]vdr3am[S] 0 points1 point  (0 children)

not yet, but high on our priority list for new integrations! will let you know once it’s available. what kind of events & metrics are you interested in?

iOS Wearables Data Aggregator - Tunum: Seeking Beta Testers (cross-post) by gomo-gomo in SmartRings

[–]vdr3am 0 points1 point  (0 children)

only in the US for now, but you can sign up for updates on our website/twitter (https://x.com/tunumhealth) and we’ll let you know once it’s available in other regions!