@awi-protocol/site-sdk
v1.0.1
Published
Build agent-native endpoints for your website
Maintainers
Readme
@awi-protocol/site-sdk
Make your website AI-agent native in 5 lines of code. Expose structured endpoints so AI agents can interact with your site without writing brittle scrapers.
Install
npm install @awi-protocol/site-sdkUsage (Express / NestJS / Native HTTP)
import { AWISite } from '@awi-protocol/site-sdk';
import express from 'express';
const app = express();
const site = new AWISite({ prefix: '/awi' });
// Register your agent-friendly routes
site.route('/search', async (req, res) => {
const results = await db.search(req.query.q);
res.json(results);
}, ['GET']);
// Attach to your Express app
app.use(site.middleware());
app.listen(3000);Now, agents can discover your routes at GET /awi/manifest and get structured blueprints at POST /awi/blueprint.
