Prerequisites
- Create an API key to authorize requests to Nebius Token Factory.
-
Save the API key into a
NEBIUS_API_KEYenvironment variable: -
Install the
strands-agentsand other packages:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Strands + Nebius Token Factory
NEBIUS_API_KEY environment variable:
export NEBIUS_API_KEY="<API_key>"
strands-agents and other packages:
pip install strands-agents 'strands-agents[litellm]' strands-agents-tools
from strands import Agent
from strands.models.litellm import LiteLLMModel
from strands_tools import calculator
model = LiteLLMModel(
client_args={
"api_key": os.environ.get("NEBIUS_API_KEY"),
},
# **model_config
model_id="nebius/meta-llama/Llama-3.3-70B-Instruct",
params={
"max_tokens": 1000,
"temperature": 0.7,
}
)
agent = Agent(model=model, tools=[calculator])
response = agent("What is 2+2")
print(response)
Was this page helpful?