Skip to content

Quickstart

Create your first agent, connect a tool and run it — in about five minutes.

You'll need a Vektra account and an API key. Create a free account if you don't have one yet.

1. Install the SDK

Install the official package for your language:

terminal
pip install vektra

2. Authenticate

Create a key in Settings → API keys and export it as an environment variable. Never commit keys to source control.

.env
export VEKTRA_KEY="vk_live_..."

3. Create an agent

An agent combines instructions, a list of tools and optional approval rules:

quickstart
from vektra import Vektra

client = Vektra(api_key="vk_live_...")

# Create an agent with tools and guardrails
agent = client.agents.create(
    name="Nova",
    instructions="Resolve billing tickets politely.",
    tools=["helpbase", "ledgerly"],
    approval={"refund": "over_100"},
)

run = agent.run(input="Where is my invoice for March?")
print(run.output)

4. Run your agent

Runs are asynchronous by default. Pass stream=True to receive each step as it happens, or register a webhook to be notified when the run completes.

ParameterTypeDescription
inputstringThe request for the agent.
streambooleanStream steps as server-sent events.
metadataobjectUp to 20 key-value pairs for your records.
max_stepsintegerHard limit on planning steps (default 8).

Next steps