Here's my hope for our headline hello world exampl...
# proj-sdk
w
Here's my hope for our headline hello world example
Copy code
import os
from openhands.sdk import (
    LLM,
    Agent,
    Conversation,
)
from openhands.tools.preset.default import get_default_tools

llm = LLM(
    model="anthropic/claude-sonnet-4-20250514",
    api_key=os.getenv("ANTROPIC_API_KEY"),
)

tools = get_default_tools(working_dir=os.getcwd())

agent = Agent(llm=llm, tools=tools)

conversation = Conversation(agent=agent)
conversation.send_message(
    "Write hello_world.py, then run it."
)
conversation.run()

print(conversation.state.message[-1])
I think this works today?
c
I think we have recently made
service_id
mandatory for LLM. It's a bit strange thing, the code just went that way, but my guess is that we will need to change something and maybe it won't be
w
ah yes thank you, I did remove that
IMO it should just default to a UUID
c
Idk, it means both “service id” and “llm id”, which is a little confusing (visible now on the router example, there are three LLMs and one service) IMHO service is only a handful of things, the components using an LLM, so that could be like an enum for us, but accept a fallback “unspecified”, idk LLM id, it makes sense to give it an automatic name, something I’d imagine like, model_name+hash 🤔
w
"service" is one of those horrible overloaded words I try to avoid 🙂