Integrate Salesforce as a custom tool in an AI Agents

Do you want a simple way to integrate Salesforce into your smolagents agents? There is an simple way to achieve this. First, let’s add smolagents, python-dotenv and simple-salesforce cli, in requirements.txt file: smolagents[gradio] python-dotenv simple-salesforce Next, let’s code a simple AI Agent: import os import yaml from dotenv import load_dotenv from simple_salesforce import Salesforce from smolagents import (CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool) from Gradio_UI import GradioUI load_dotenv('.env') @tool def get_insurance_policies_by_status(status: str) -> str: """A tool that fetches the number of insurance policies from Salesforce based on their status....

April 7, 2025 · 2 min · Alex Popescu

AWS Lambda With Magnum and FastAPI

Do you want a simple way to deploy an python FastAPI in AWS Lambda ? There is an simple way to do this with Magnum. First, let’s add FastAPI, magnum and SAM cli, in requirements.txt file: fastapi mangum aws-sam-cli Next, let’s code a simple FastAPI sample app: from fastapi import FastAPI from mangum import Mangum app = FastAPI() @app.get("/high-scores") async def high_scores(): return {"scores": [100, 200, 300]} @app.post("/insert-score") async def insert_score(data: dict): return {"status": "success", "data": data} lambda_handler = Mangum(app, lifespan="off") if __name__ == "__main__": import uvicorn uvicorn....

March 26, 2025 · 2 min · Alex Popescu

Add a certificate to Nginx Ingress Controller

Having installed Nginx, now it’s the time to setup the TLS for our kubernetes cluster. First we download the certificate from our certificate authority. Next we apply the next secret in our kubernetes cluster, updating the values with the base 64 encoded certificate and key. apiVersion: v1 kind: Secret metadata: name: podrunner-tls namespace: kube-system type: kubernetes.io/tls data: tls.crt: <REPLACE WITH BASE64 OF THE CERTIFICATE> tls.key: <REPLACE WITH BASE64 OF THE KEY> If you need help getting the base64 of the key and certificate, run the next commands:...

March 11, 2025 · 1 min · Alex Popescu

Replace Traefik with Nginx ingress controller in Kubernetes

If the default ingress controller (Traefik) not ok for you ? Here are some simple instructions on how to replace it with Nginx Uninstall traefik from an existing K3S instance sudo rm -rf /var/lib/rancher/k3s/server/manifests/traefik.yaml helm uninstall traefik traefik-crd -n kube-system sudo systemctl restart k3s Or the proper way to do so on installing k3s: curl -sfL https://get.k3s.io | sh -s - --cluster-init --disable-traefik Install Nginx Ingress Controller helm upgrade --install ingress-nginx ingress-nginx \ --repo https://kubernetes....

January 14, 2025 · 3 min · Alex Popescu

Single Server Kubernetes Installation

Do you want a simple single server kubernetes that is easy to install? Here is the guide for you. Installing kubernetes First, we install k3s kuberntes using the next command: curl -sfL https://get.k3s.io | sh -s - --cluster-init --node-external-ip <external-ip> Note: Replace external-ip with your server external IP. This is needed in order to get the traefik ingress controller working. Next we should copy the k3s kubernetes configuration file /etc/rancher/k3s/k3s.yaml to the default location ~/....

January 7, 2025 · 4 min · Alex Popescu