Getting Started with Fencepost
Quick Start
Fencepost takes under 30 minutes to set up. Here's how to get started:
1. Create an Account
Sign up at agentfence.io. No credit card required for the free tier.
2. Register Your First Agent
From the dashboard, click "Add Agent". Give it a name (e.g., "ResearchBot") and optionally set allowed domains.
3. Save Your API Key
Your API key is displayed once. Copy it immediately and store it in your environment variables:
export FENCEPOST_AGENT_KEY=fp_live_abc123...
4. Install the SDK
npm install fencepost-sdk
5. Wrap Your API Calls
import { Fencepost } from 'fencepost-sdk'
const agent = new Fencepost({
agentKey: process.env.FENCEPOST_AGENT_KEY
})
const response = await agent.proxy('https://api.openai.com/v1/chat/completions', {
method: 'POST',
body: JSON.stringify({ model: 'gpt-4', messages })
})
That's it. Every call through the proxy is scoped, logged, and revocable.