AIP Server Python Sample
The Python reference implementation is the canonical, vendor-neutral runtime for the Agentic Intent Protocol (AIP). It showcases how to enforce canonical JSON transport, validate schemas, orchestrate asynchronous auctions, and persist ledger state using FastAPI and asyncio.- Source: github.com/GouniManikumar12/aip-server-python
- Purpose: Learning tool and starting point for building your own AIP-compliant server
- License: Apache 2.0
1. Clone the Repository
2. Install Prerequisites
- Python 3.11 (works on 3.10+)
- pip 23+
- Optional: Docker & Docker Compose
3. Project Overview
POST /context– acceptcontext_requestand launch async auctionsPOST /aip/bid-response– intake signed bids within the auction windowPOST /events/{event_type}– ingest CPX/CPC/CPA eventsGET /admin/*– health, stats, and config inspection
4. Configuration
Environment variables
| Name | Description |
|---|---|
AIP_CONFIG_PATH | Override path to server.yaml. |
AIP_BIDDERS_PATH | Override path to bidders.yaml. |
GOOGLE_APPLICATION_CREDENTIALS | Service-account JSON for Google Cloud integrations. |
YAML files
app/config/bidders.yaml: declare bidder endpoints, public keys, timeouts, and category pools.app/config/server.yaml: configure listener settings, transport guardrails, ledger backend, and auction window/distribution backend.
5. Run the Server Locally
Docker & Compose
6. Run Tests
The repo currently ships with lightweight sanity checks. Extend with pytest/mypy/conformance suites as needed.7. Use as a Starting Point
- Fork the repository and rename it for your organization.
- Swap
ledger.backendfor your production datastore and lock in Pub/Sub (or SNS/SQS/Event Grid/Kafka) distribution. - Replace placeholder configs with your bidder registry and security material.
- Add CI that runs schema validation, conformance tests from
aip-spec, and your integration suite. - Keep your fork rebased against upstream to track protocol updates.