Local set up
this guide walks you through setting up your local environment for bridge agent development step 1 create your repository go to bdg sw agents bridge agent template https //github com/kyndryl agentic ai/bdg sw agents bridge agent template click use this template → create a new repository configure owner kyndryl agentic ai repository name bdg sw agents {{your agent name}} visibility private click create repository step 2 jfrog artifactory authentication the bridge agent sdk is hosted on a private jfrog artifactory repository get jfrog api token go to https //kyndryl jfrog io https //kyndryl jfrog io/ log in with your kyndryl sso click your user profile (top right) → edit profile under authentication settings, click generate an identity token copy the generated token configure authentication ( netrc recommended) create or edit / netrc file \# 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 step 3 install dependencies activate your virtual environment source venv/bin/activate install all dependencies (sdk from artifactory) pip install r requirements txt install test dependencies pip install r requirements test txt verify sdk installation from bridge agent sdk import bridgebaseagent, bridgebaseworkflowagent, create llm client print('✅ bridge agent sdk installed successfully!')" step 4 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 step 5 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 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"} 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 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 step 6 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 \# 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 pytest tests/ v core variables