Shared setup

Install once. Keep credentials outside your code.

Every framework uses the same Quasentra client and API key. Complete this page once, then copy only the small adapter snippet from your framework guide.

1. Install the package you need

Plain Python
python -m pip install quasentra
LangChain
python -m pip install quasentra "langchain>=1.0,<2" "langgraph>=1.0,<2"
LangGraph
python -m pip install "quasentra[langgraph]"
CrewAI
python -m pip install "quasentra[crewai]"
OpenAI Agents
python -m pip install "quasentra[openai-agents]"

Run only the command for your framework. The double quotes work in PowerShell, Windows Command Prompt, macOS and Linux.

2. Create a scoped API key

In Dashboard → API Keys, allow the exact agent IDs used by this application and select:

  • agent:register — lets the SDK register the agent and its tools.
  • policy:sync — lets code-defined permissions appear in the dashboard.
  • decision:create — checks each protected tool call.
  • tool:execute — add this only when using Trusted Gateway connectors.

3. Create one reusable client

import os
from quasentra import Quasentra

security = Quasentra(
    api_key=os.environ["QUASENTRA_API_KEY"],
    base_url=os.getenv("QUASENTRA_URL", "https://quasentra.com"),
)

Create this object once when the application starts. Reuse it for all agents in that process instead of creating a new HTTP client for every request.

Development and production

EnvironmentRecommended configuration
Local developmentLocal URL, development API key and test agents/data.
StagingHosted URL, separate staging key and non-production business systems.
ProductionHosted URL, minimum-scope production key stored in a secret manager.

Never expose the key

Do not put it in frontend JavaScript, prompts, screenshots or Git. If it is exposed, revoke it from the dashboard and generate a replacement.