WACP — turn any backend into an AI-agent-friendly system via /ai/* endpoints.
Project description
WACP Python SDK (wacp)
Version: 2.0.0
pip install wacp
One package for Python. Framework adapters live in submodules:
from wacp.fastapi import wacp_router
# later: from wacp.flask import ...
# later: from wacp.django import ...
Full changelog: ../CHANGELOG.md
Quick start (FastAPI)
from fastapi import FastAPI
from wacp.fastapi import wacp_router
app = FastAPI()
# ... your normal routes ...
app.include_router(
wacp_router(
app,
base_dir="ai", # folder with config/ + docs/
discover=True, # optional: write config/_discovered.json
)
)
If ai/config/ does not exist, the SDK auto-scaffolds starter JSON files on first boot.
Package layout
wacp/
core/ # config, scaffold, search, types (shared)
fastapi/ # FastAPI adapter (wacp_router, discovery)
# flask/ # planned
# django/ # planned
base_dir layout
ai/
config/
main.json
categories.json
endpoints.json
docs.json
custom-map.json
_discovered.json # only when discover=True (never served / never merged)
docs/
overview.md
Optional: set files.search_vocabulary in main.json to a JSON file under config/ for org-specific synonym overrides.
Routes
| Method | Path | Purpose |
|---|---|---|
| GET | /ai |
Entry: app info, navigation, quick access |
| GET | /ai/all |
Flat list of endpoints (?page=&limit= optional) |
| GET | /ai/category |
Category index |
| GET | /ai/category/{id} |
Endpoints in a category |
| GET | /ai/endpoint/{id} |
Full endpoint detail |
| GET | /ai/docs |
Docs index |
| GET | /ai/docs/{filename} |
Raw doc content |
| GET | /ai/search?q= |
Lexical search |
Discovery (discover=True)
from wacp.fastapi import wacp_router, FastAPIDiscovery
- Writes
base_dir/config/_discovered.json - Never served by
/ai, never merged intoendpoints.json - Scaffold runs before discovery on a fresh
base_dir
Search & pagination
Lightweight lexical search via GET /ai/search?q=....
List routes accept optional ?page=&limit=.
Versioning
2.0.0 — see CHANGELOG and wacp.__version__.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wacp-2.0.0.tar.gz.
File metadata
- Download URL: wacp-2.0.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
491e70f98d3b0fe27b8dc3fb17a8691cdb538c9f83ac74e9f2be571342487d4a
|
|
| MD5 |
59c8297e738999fae3d58610f5fe6550
|
|
| BLAKE2b-256 |
6c6bc7e78e4536ec38ecfc0dff0ff6182230af35015681c92916b1e346444dd4
|
File details
Details for the file wacp-2.0.0-py3-none-any.whl.
File metadata
- Download URL: wacp-2.0.0-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d51b79b0e82fffc8026374f123cc9a3ffcc0005d7fec8bd876da359fb036524
|
|
| MD5 |
f6e062fd2845d0a1f2927db1ed730282
|
|
| BLAKE2b-256 |
efcb967fd92ae015e6f56e81b9d5d58fdd3711ce3455dc5e929099209adc209e
|