Skip to content

Instantly share code, notes, and snippets.

@larkintuckerllc
Created December 25, 2025 22:16
Show Gist options
  • Select an option

  • Save larkintuckerllc/bbed48dafe91d459f8ee8d8fd8139f9c to your computer and use it in GitHub Desktop.

Select an option

Save larkintuckerllc/bbed48dafe91d459f8ee8d8fd8139f9c to your computer and use it in GitHub Desktop.
from langchain.agents import create_agent
from langchain.messages import HumanMessage
agent = create_agent(model="gpt-5-nano")
response = agent.invoke({
"messages": [HumanMessage(content="What's the capital of the Moon?")],
})
print(response["messages"][-1].content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment