A lawyer for the agent economy. AI agents can request contract review, risk analysis, and legal guidance via A2A protocol.
Sae is an early-stage Python project in the AI payments / x402 ecosystem, focused on a2a-protocol, agent-to-agent, ai, ai-agents. It currently has 0 GitHub stars and 1 forks, and sits alongside related tools like nexus, fastapi-a2a, ai-examples, a2a-server, ClawRouter, darwin-agentic-cloud.
A2A-Native Legal Agent for Contract Review
An autonomous legal services agent built on Google's A2A protocol, enabling AI agents to request contract clause review and risk analysis.
# Clone the repository
git clone https://github.com/your-org/sae-law-agent.git
cd sae-law-agent
# Install UV if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
# Copy environment template
cp .env.example .env
# Edit .env with your API keys
# Start the server
uv run uvicorn sae.main:app --reload
# Server runs at http://localhost:8000
| Endpoint | Method | Description |
|---|---|---|
/.well-known/agent.json |
GET | A2A Agent Card |
/a2a |
POST | A2A JSON-RPC endpoint |
/a2a/stream/{task_id} |
GET | SSE streaming for task updates |
/health |
GET | Health check |
/docs |
GET | OpenAPI documentation |
Sae implements the A2A protocol for agent-to-agent communication.
1. Discover Agent Capabilities
curl http://localhost:8000/.well-known/agent.json
2. Submit a Contract for Review
curl -X POST http://localhost:8000/a2a \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tasks/send",
"id": "req-001",
"params": {
"id": "task-001",
"message": {
"role": "user",
"parts": [{
"type": "text",
"text": "Please review this NDA:\n\nCONFIDENTIALITY AGREEMENT\n\n1. Definition of Confidential Information..."
}]
}
}
}'
3. Check Task Status
curl -X POST http://localhost:8000/a2a \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tasks/get",
"id": "req-002",
"params": {
"id": "task-001"
}
}'
4. Stream Updates (SSE)
curl -N http://localhost:8000/a2a/stream/task-001
sae-law-agent/
├── src/sae/
│ ├── main.py # FastAPI application
│ ├── config.py # Configuration management
│ ├── api/
│ │ ├── agent_card.py # A2A Agent Card endpoint
│ │ ├── jsonrpc.py # JSON-RPC handler
│ │ └── streaming.py # SSE streaming
│ ├── agents/
│ │ ├── contract_review.py # LangGraph workflow
│ │ ├── state.py # Agent state definitions
│ │ └── nodes/ # Processing nodes
│ ├── models/
│ │ ├── a2a.py # A2A protocol models
│ │ └── clauses.py # Contract analysis models
│ └── services/
│ └── task_manager.py # Task lifecycle management
├── tests/
├── Dockerfile
└── pyproject.toml
# Build
docker build -t sae-legal-agent .
# Run
docker run -p 8000:8000 \
-e OPENAI_API_KEY=sk-... \
-e PINECONE_API_KEY=... \
sae-legal-agent
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
Yes | OpenAI API key for GPT-4o |
PINECONE_API_KEY |
No | Pinecone API key for RAG |
PINECONE_INDEX_NAME |
No | Pinecone index name |
LOG_LEVEL |
No | Logging level (default: INFO) |
ENVIRONMENT |
No | development/staging/production |
Apache 2.0
MVP Phase: Core contract review functionality implemented.
The AI-to-AI Protocol Layer that catches unreliable agent outputs before they cost you money. Claim-level verification, escrow, and slashing. 224 tests, 12/12 adversarial patterns caught.
A zero-friction FastAPI plugin that turns any existing app into a fully compliant Agent-to-Agent (A2A) node — expose your routes as discoverable skills and delegate tasks to remote agents with a single decorator.
AI Examples
Production-ready A2A Protocol Server with dual protocol support (HTTP REST + JSON-RPC 2.0). Built on SceneGraphManager v2.0.0 for JSON-driven AI workflow orchestration with LangGraph.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
Verifiable and free cloud compute for AI agents. webMCP + MCP native. Check out our sandboxed Beta + research in the README
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
Self-healing infrastructure for AI agent payments. 90.3% auto-recovery.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
Daydreams is a set of tools for building agents for commerce
Live data for AI agents — search, research, markets, crypto, X/Twitter. Pay-per-call via x402 micropayments.
DePIN for Vintage Hardware — Proof-of-Antiquity blockchain where old machines outmine new ones. AI-powered hardware fingerprinting, 15+ CPU architectures, Solana bridge (wRTC). $0 VC.