feature.agent

Docs

The widget for extension authors, what a feature can do, and the same actions over HTTP, MCP and the terminal. Auth is one account key, fa_…, sent as Authorization: Bearer.

Put the widget in your own extension

The widget is plain JavaScript with no build step. Copy three files into your extension (or install @profullstack/feature-agent and copy them from node_modules):

content.js · background.js · runtime.js

// manifest.json (Manifest V3)
{
  "permissions": ["userScripts", "storage", "activeTab", "scripting", "alarms"],
  "host_permissions": ["<all_urls>"],
  "background": { "service_worker": "background.js", "type": "module" },
  "content_scripts": [{ "matches": ["<all_urls>"], "js": ["feature-agent/content.js"], "run_at": "document_idle" }],
  "action": {}
}

// background.js (your service worker)
import { installFeatureAgent } from './feature-agent/background.js';
installFeatureAgent();              // options: { api: 'https://feature.agent.pit.world', openOnAction: true }

That is all: clicking your toolbar icon opens the builder on the current page, features people keep are registered through the browser's userScripts API, and the account key lives in the extension's own storage, never in a page. Set openOnAction: false and send {fa: 'toggle'} to a tab to open it from your own UI. Narrow host_permissions and the content script matches if your extension only covers some sites.

What a feature can do

A feature is one script (plus styles) that runs after the page loads, on the paths it was built for, inside the site's own page. Its code gets one object:

fa.root(tag)the feature's own container element, created once
fa.store.get/set/delete/listJSON values saved for this person on c0mpute, the same in every browser they use
fa.shared.get/set/delete/listJSON values shared by everyone who installs the feature
fa.ai(prompt)a short answer from a language model
fa.fetch(url, init)another site, only the hosts the feature declared, sent without cookies
fetch('/api/…')the site itself, with the person's signed-in session, as any script in the page
fa.toast(text) · fa.onNavigate(fn) · fa.pagea message, single-page-app navigation, the current address

Limits: 60 KB of script, 500 stored keys per person and 5,000 shared keys per feature, 64 KB per value.

Get a key

curl -s -X POST https://feature.agent.pit.world/api/v1/signup -H 'content-type: application/json' -d '{"label":"my script"}'

The answer has key. It is a full account with the 30-day trial. No email, no card.

Build a feature

curl -s -X POST https://feature.agent.pit.world/api/v1/features/build \
  -H "authorization: Bearer $FA_KEY" -H 'content-type: application/json' \
  -d '{"url":"https://news.ycombinator.com/","prompt":"add a button in the header that hides stories I have already opened"}'
# -> {"job":"…","state":"running"}   then:
curl -s https://feature.agent.pit.world/api/v1/jobs/JOB_ID -H "authorization: Bearer $FA_KEY"

Poll the job every few seconds until state is done (the result has the feature) or failed (not counted). Send page with an outline of the page if you have the live DOM; without it the public page at url is read. Pass feature_id to change an existing feature.

Endpoints

POST /api/v1/signupa new account key (trial)
GET /api/v1/meplan, what is left today, keys
GET /api/v1/planslimits and prices (no key needed)
POST /api/v1/features/build{url, prompt, page?, selection?, feature_id?} → job
GET /api/v1/jobs/:idstate, step, result
GET /api/v1/features?origin=&state=&code=1your features
GET/PATCH/DELETE /api/v1/features/:idPATCH {state: "on"|"off"}, or {name, js, css, hosts, paths} to edit by hand
GET /api/v1/features/:id/versions · POST …/rollback{version}
POST /api/v1/features/:id/share{on: true|false} → share_url
GET /api/v1/shared/:slug · POST …/installread or copy a shared feature
GET /api/v1/features/:id/userscriptstandalone .user.js
POST /api/v1/features/:id/rt{op, args}: store.get|set|delete|list, shared.*, ai (→ job)
POST /api/v1/checkout{"plan":"month|year"} → CoinPay checkout URL

MCP

Streamable HTTP at https://feature.agent.pit.world/mcp with your key as the Bearer token. Tools: account build_feature job_status list_features get_feature set_feature_state edit_feature feature_versions rollback_feature delete_feature share_feature install_shared_feature export_userscript feature_data.

claude mcp add --transport http feature-agent https://feature.agent.pit.world/mcp --header "Authorization: Bearer $FA_KEY"

CLI and terminal dashboard

curl -fsSL https://feature.agent.pit.world/install.sh | sh
feature-agent                       # terminal dashboard (makes a free account on first use)
feature-agent build https://example.com/orders "add a CSV export button above the table" --on
feature-agent ls
feature-agent show <id> --code
feature-agent off <id>
feature-agent export <id>           # standalone userscript
feature-agent mcp                   # stdio MCP server for your agent

v0.1.1 · llms.txt