---
title: Local set up
slug: local-set-up
docTags: 
createdAt: 2026-08-26T20:17:30.647Z
---

This guide walks you through setting up your local environment for Bridge agent development.

# Create your repository

1. Go to [bdg-sw-agents-bridge-agent-template](https://github.com/kyndryl-agentic-ai/bdg-sw-agents-bridge-agent-template)
2. Click **Use this template** → **Create a new repository**
3. Configure:
   - **Owner**: kyndryl-agentic-ai
   - **Repository name**: bdg-sw-agents-&#x7B;&#x7B;your-agent-name}}
   - **Visibility**: Private
4. Click **Create repository** 

# JFrog Artifactory authentication

The Bridge Agent SDK is hosted on a private JFrog Artifactory repository. Get JFrog API Token

1. Go to [https://kyndryl.jfrog.io](https://kyndryl.jfrog.io/)
2. Log in with your Kyndryl SSO.
3. Click your **User Profile** (top right) → **Edit Profile.**
4. Under Authentication Settings, click **Generate an Identity Token.**
5. Copy the generated token.

**Configure Authentication (.netrc - recommended)**

Create or edit \~/.netrc file:

```javascript
# Create .netrc file
cat >> ~/.netrc << 'EOF'
machine kyndryl.jfrog.io
login your-email@kyndryl.com
password your-jfrog-api-token
EOF
# Secure the file (required)
chmod 600 ~/.netrc
```

**Security note**: Never commit .netrc to version control.

# &#x20;Install dependencies

1. Activate your virtual environment: source venv/bin/activate
2. Install all dependencies (SDK from Artifactory): pip install -r requirements.txt 
3. Install test dependencies: pip install -r requirements-test.txt 

**Verify SDK Installation**

```javascript
from bridge_agent_sdk import BridgeBaseAgent, 
BridgeBaseWorkflowAgent, create_llm_client
print('✅ Bridge Agent SDK installed successfully!')"
```

#  Runtime modes

The SDK supports three runtime modes controlled by the KAIF\_MODE environment variable:

| <font color="#f3f4f6">**Mode**</font> | <font color="#f3f4f6">**Description**</font>                                                       | <font color="#f3f4f6">**Use case**</font> |
| ------------------------------------- | -------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| local\_dev                            | No Bridge Platform access. LLM calls go directly to OpenAI. Token/credentials are stubbed locally. | Local development without VPN             |
| bridge\_dev                           | Bridge Platform available at dev URLs. All services route through gateways.                        | Development with Bridge access            |
| production                            | Full Bridge Platform integration. All payload fields required.                                     | Production deployment                     |

# Configure environment

## Option A: local\_dev + OpenAI (default - fastest start)

Use this when you have a standard OpenAI API key and want the fastest path to running your agent.

Create .env file:

- KAIF\_MODE=local\_dev
- LLM\_PROVIDER=openai
- LLM\_MODEL=gpt-4.1-min 
- OPENAI\_API\_KEY=sk-your-openai-api-key-here
- OPENAI\_API\_BASE=https\://api.openai.com/v1
- Get your key: [https://platform.openai.com/api-keys](https://platform.openai.com/api-keys)

## Option B: local\_dev + Azure OpenAI

Use this when your organization provides Azure OpenAI resources.

- KAIF\_MODE=local\_dev
- LLM\_PROVIDER=azure\_openai
- LLM\_MODEL=gpt-4.1-mini
- AZURE\_OPENAI\_ENDPOINT=https\://my-resource.openai.azure.com
- AZURE\_OPENAI\_API\_KEY=your-azure-api-key
- AZURE\_OPENAI\_API\_VERSION=2024-02-01
- AZURE\_OPENAI\_DEPLOYMENT=my-gpt4-deployment

:::hint{type="info"}
AZURE\_OPENAI\_DEPLOYMENT is the deployment name you created in Azure Portal, not the model name. If omitted, the SDK uses LLM\_MODEL as the deployment name
:::

## Option C: local\_dev + hosted LLM (custom endpoint)

Use this for any OpenAI-compatible endpoint that uses non-standard auth (e.g. internal proxy, Kyndryl-hosted LLM).

- KAIF\_MODE=local\_dev
- LLM\_PROVIDER=hosted\_ll 
- HOSTED\_LLM\_BASE\_URL=https\://integration.chatops.kyndryl.net/v1
- HOSTED\_LLM\_AUTH\_HEADER=Bearer your-token-or-api-key
- HOSTED\_LLM\_MODEL=my-custom-model
- \# Optional extra HTTP headers (JSON)
- \# HOSTED\_LLM\_EXTRA\_HEADERS=\{"X-Team": "my-team"}

:::hint{type="info"}
You do NOT need OPENAI\_API\_KEY for the hosted\_llm provider - the SDK sets openai\_api\_key="none" internally and uses the Authorization header from HOSTED\_LLM\_AUTH\_HEADER.
:::

## Option D: bridge\_dev mode (with Bridge Platform)

Use this when you have access to Bridge Platform and need to test with real LLM Gateway, MCP tools, and platform services.

- KAIF\_MODE=bridge\_dev
- KAIF\_HOST=https\://dev1-aws-oregon-base.bridge.kyndryl.com
- SERVICE\_API\_KEY=your-service-api-key
- BRIDGE\_ACCOUNT\_ID=your-account-id
- bridge\_dev: What You Get
- LLM\_MODEL=gpt-4.1-mini

:::hint{type="info"}
SERVICE\_API\_KEY is mandatory in bridge\_dev mode, the SDK will crash on startup if it is missing.
:::

In bridge\_dev mode, all services route through KAIF\_HOST:

# Verify setup

- Test local\_dev + OpenAI. See [Open AI](https://github.com/kyndryl-agentic-ai/bdg-sw-agents-development-guide/blob/main/docs/01-getting-started/03-local-setup.md#test-local_dev--openai)
- Test local\_dev + hosted LLM. See [hosted LLM ](https://github.com/kyndryl-agentic-ai/bdg-sw-agents-development-guide/blob/main/docs/01-getting-started/03-local-setup.md#test-local_dev--hosted-llm)
- Test bridge\_dev mode. See[ testing](https://github.com/kyndryl-agentic-ai/bdg-sw-agents-development-guide/blob/main/docs/01-getting-started/03-local-setup.md#test-bridge_dev-mode)
- Run your agent

  ```javascript
  # local_dev - direct execution
  KAIF_MODE=local_dev python main.py
  # bridge_dev - with --execution_context CLI arg (platform-style invocation)
  KAIF_MODE=bridge_dev python main.py --agent_name my_agent --execution_context '{"agent_data":{"content":"test"},"system_data":{"metadata":{"workflow_id":"wf-1","account_id":"acc-1","instance_name":"test","agent_id":"test","user_id":"u1","session_id":"s1"},"connection_details":[],"timeout":1800,"type":"interactive"},"runtime_data":{}}'
  ```
- **Run Tests**

  ```javascript
  pytest tests/ -v
  ```

