Skip to main content
Strands is an open source agentic framework. Strands docs

Prerequisites

  1. Create an API key to authorize requests to Nebius Token Factory.
  2. Save the API key into a NEBIUS_API_KEY environment variable:
    export NEBIUS_API_KEY="<API_key>"
    
  3. Install the strands-agents and other packages:
    pip install strands-agents 'strands-agents[litellm]' strands-agents-tools
    

Quickstart

We can access Nebius AI models via LiteLLM API.
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)

More Examples

View more examples in our cookbook.