Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic Fabriq Network Connector

The Network Connector lets Agentic Fabriq reach APIs and tools running inside your private network — no inbound firewall rules required. The connector runs inside your environment and opens an outbound connection to Agentic Fabriq. All requests from AF to your private tools flow through that tunnel.

How it works

Agentic Fabriq Cloud  ──outbound WebSocket──▶  Connector (your network)  ──▶  Your private API

The connector does not require inbound firewall changes for tunnel traffic. It connects out to AF over TLS (port 443) and waits for requests.

Requirements

  • Docker, or Python 3.11+
  • Outbound HTTPS/WSS access to dashboard.agenticfabriq.com on port 443
  • No inbound firewall changes needed

Setup

Step 1 — Create a connector in the AF dashboard

  1. Go to Admin Console → Network Connectors
  2. Click Add Connector, give it a name
  3. Copy the enrollment token shown after creation

Step 2 — Enroll to get your agent secret

curl -X POST https://dashboard.agenticfabriq.com/api/v1/connector/enroll \
  -H 'Content-Type: application/json' \
  -d '{"enrollment_token": "<your_enrollment_token>"}'

Response:

{
  "connector_id": "abc-123",
  "agent_secret": "xxxxxxxxxxxx"
}

Save both values — the agent_secret is shown once only.

Step 3 — Build the image

Clone this repo and build using your own registry:

git clone https://github.com/agenticfabriq/network-connector-code.git
cd network-connector-code

docker build -t <your-registry>/af-connector:latest .
docker push <your-registry>/af-connector:latest

Step 4 — Run the connector

Docker:

docker run -d --restart=unless-stopped \
  --name af-connector \
  -p 127.0.0.1:8080:8080 \
  -e CONNECTOR_ID=<connector_id> \
  -e CONNECTOR_AGENT_SECRET=<agent_secret> \
  -e AF_HOST=wss://dashboard.agenticfabriq.com \
  <your-registry>/af-connector:latest

Docker Compose:

services:
  af-connector:
    image: <your-registry>/af-connector:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:8080:8080"
    environment:
      AF_HOST: wss://dashboard.agenticfabriq.com
      CONNECTOR_ID: <connector_id>
      CONNECTOR_AGENT_SECRET: <agent_secret>

Python (without Docker):

pip install .
af-connector \
  --af-host wss://dashboard.agenticfabriq.com \
  --connector-id <connector_id> \
  --agent-secret <agent_secret>

Once running, the connector will appear as Active in the AF dashboard within a few seconds.

Step 5 — Attach a tool to the connector

In the AF dashboard, go to Integrations and create or edit a custom tool. Set the base URL to the internal address of your private API (e.g. http://my-internal-api:8080), then select the connector from the Network Connector dropdown.

AF will now route all calls to that tool through your connector.

Environment variables

Variable Required Description
AF_HOST Yes WebSocket URL of your AF instance
CONNECTOR_ID Yes Connector ID from the enrollment step
CONNECTOR_AGENT_SECRET Yes Agent secret from the enrollment step
HEALTH_PORT No Port for the /health endpoint (default: 8080)

Health check

The connector exposes a /health endpoint on port 8080:

curl http://localhost:8080/health
# {"status": "ok"}

The Docker examples bind this health endpoint to 127.0.0.1 on the host. Omit the port binding if you do not need host-level health checks.

Use this for liveness probes in Kubernetes or ECS.

Kubernetes example

apiVersion: apps/v1
kind: Deployment
metadata:
  name: af-connector
spec:
  replicas: 1
  selector:
    matchLabels:
      app: af-connector
  template:
    metadata:
      labels:
        app: af-connector
    spec:
      containers:
      - name: connector
        image: <your-registry>/af-connector:latest
        env:
        - name: AF_HOST
          value: wss://dashboard.agenticfabriq.com
        - name: CONNECTOR_ID
          valueFrom:
            secretKeyRef:
              name: af-connector-secret
              key: connector-id
        - name: CONNECTOR_AGENT_SECRET
          valueFrom:
            secretKeyRef:
              name: af-connector-secret
              key: agent-secret
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 5
          periodSeconds: 30

Security

  • The connector makes outbound-only tunnel connections — no inbound firewall changes are required
  • Authentication uses short-lived HS256 JWTs signed with your agent secret
  • The agent secret is stored in Agentic Fabriq's secrets vault and never logged
  • Rotating or revoking the connector from the AF dashboard immediately disconnects it

Troubleshooting

Connector stays Inactive after starting

  • Verify AF_HOST, CONNECTOR_ID, and CONNECTOR_AGENT_SECRET are set correctly
  • Check outbound connectivity: curl https://dashboard.agenticfabriq.com/health

Tool calls return CONNECTOR_OFFLINE

  • The connector process has stopped or lost its connection — check container logs and restart

Tool calls return CONNECTOR_TIMEOUT

  • Your private API did not respond within 30 seconds — check that the base URL is reachable from the connector's network

License

MIT

About

Agentic Fabriq network connector: reach tools inside a private network from the Fabriq gateway without opening inbound ports

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages