Quickstart
Set up your SVAHNAR environment and deploy your first agent in minutes.
This guide covers getting your credentials, installing the SDK, and running a simple Web Search agent.
💡 Core Concepts​
Before diving in, it helps to understand the two main components you will use:
- API Key: Your unique identity that authorizes your machine to talk to SVAHNAR's cloud.
- Agent YAML: The blueprint file where you define what the agent does (its brain, tools, and instructions).
🚀 Setup & Installation​
Follow these steps to get your environment ready.
Get an API Key​
- Log in to the SVAHNAR Platform.
- Navigate to API Keys in your account settings.
- Click Create New Key and copy it immediately.

Export the API Key​
Make the key accessible to the SDK by exporting it as an environment variable.
- macOS / Linux
- Windows (PowerShell)
export SVAHNAR_API_KEY="your_api_key_here"
$Env:SVAHNAR_API_KEY = "your_api_key_here"
To make this change permanent on Windows, use:
setx SVAHNAR_API_KEY "your_api_key_here"
Create Your First Agent​
We will create a simple Web Search Agent. This requires two files: a configuration file (agent.yaml) and a python script (test.py) to run it.
1. Define the Agent (agent.yaml)
Create a file named agent.yaml and paste the following configuration:
create_agent_network:
agent-1:
agent_name: "Web_search"
LLM_config:
params:
model: "gpt-5"
max_tokens: 1000
request_timeout: 600
tools:
tool_assigned:
- name: "Tavily"
config:
max_results: 5
agent_function:
- "Your function is to search the web or internet for information"
incoming_edge:
- "Start"
outgoing_edge: []
2. Run the Agent (test.py)
Create a file named test.py to initialize the SDK and deploy the agent.
from svahnar import Svahnar
from pathlib import Path
# Initialize the client (automatically picks up env variable)
client = Svahnar()
# Create and deploy the agent
response = client.agents.create(
name="Web Search Agent",
description="This Agent searches the web for information.",
deploy_to="Organization",
yaml_content=Path("agent.yaml")
)
print(response)
3. Execute Run the script in your terminal to create your first Agent:
python test.py
🚑 Troubleshooting​
-
ModuleNotFoundError: No module named 'svahnar'
- Ensure you ran
pip install svahnar. - If you are using a virtual environment, make sure it is activated.
- Ensure you ran
-
Authentication Error / 401
- Check that you exported the
SVAHNAR_API_KEYcorrectly. - Try printing
os.environ.get('SVAHNAR_API_KEY')in Python to verify the script can see it.
- Check that you exported the
-
FileNotFoundError: agent.yaml
- Ensure
agent.yamlis in the same directory as yourtest.pyscript, or provide the full absolute path inPath().
- Ensure