Agent Integration
Connect your AI coding agents to Buildlog for automatic workflow recording.
How It Works
Buildlog uses a simple file-based protocol for agent integration. AI agents write JSON entries to a feed file, and the Buildlog extension captures them as workflow steps.
Feed File Location: ~/.buildlog/agent-feed.jsonl
⚡ Option 1: MCP Server (Recommended)
The easiest way to integrate is via our MCP server. It handles all the recording automatically and gives agents the ability to search and follow existing workflows.
Claude Desktop
Add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"buildlog": {
"command": "npx",
"args": ["@buildlogai/mcp"]
}
}
}Cursor
Add to your Cursor MCP settings:
{
"mcpServers": {
"buildlog": {
"command": "npx",
"args": ["@buildlogai/mcp"]
}
}
}Environment Variables
For uploading, set your API key (get one from Settings):
export BUILDLOG_API_KEY=bl_your_api_key_here
📝 Option 2: Direct Feed File
For custom integrations, agents can write directly to the feed file. Each line is a JSON object with one of these types:
Entry Types
type: "prompt"
Log a user prompt sent to the AI.
{"type":"prompt","raw":"Add a login button...","content":"Add login button"}type: "action"
Log an action taken by the AI.
{"type":"action","summary":"Created LoginButton component","filesModified":["src/LoginButton.tsx"]}type: "note"
Add observations or decisions.
{"type":"note","content":"Using React context for auth state"}Example: Bash
# Log a prompt
echo '{"type":"prompt","raw":"Add authentication","content":"Add auth"}' >> ~/.buildlog/agent-feed.jsonl
# Log an action
echo '{"type":"action","summary":"Added auth middleware","filesModified":["middleware.ts"]}' >> ~/.buildlog/agent-feed.jsonlExample: Python
import json
import os
from pathlib import Path
feed_path = Path.home() / ".buildlog" / "agent-feed.jsonl"
feed_path.parent.mkdir(exist_ok=True)
def log_entry(entry: dict):
with open(feed_path, "a") as f:
f.write(json.dumps(entry) + "\n")
# Log a prompt
log_entry({
"type": "prompt",
"raw": "Implement user authentication with OAuth",
"content": "Add OAuth authentication"
})
# Log an action
log_entry({
"type": "action",
"summary": "Created OAuth handler and callback routes",
"filesModified": ["auth/oauth.py", "routes/callback.py"]
})🔧 VS Code Extension
The Buildlog VS Code extension watches the feed file and automatically captures entries into the current recording session.
- Install the extension from the VS Code Marketplace
- Start a recording session (Cmd+Shift+P → "Buildlog: Start Recording")
- Your AI agent writes to
~/.buildlog/agent-feed.jsonl - Entries are automatically added to your buildlog
- Stop recording and upload to buildlog.ai
Troubleshooting
No activity detected?
- • Ensure the feed file exists:
mkdir -p ~/.buildlog - • Check file permissions are writable
- • Verify JSON is valid (one object per line, no trailing commas)
- • Make sure a recording session is active in VS Code
Test the integration
Run this in your terminal while recording:
echo '{"type":"note","content":"Test entry from terminal"}' >> ~/.buildlog/agent-feed.jsonlYou should see the entry appear in your buildlog within a few seconds.
Next Steps
- Get an API Key for uploading buildlogs programmatically
- Browse Workflows to see what others have built
- MCP Server Docs for the full tool reference