Skip to content

feat(T1): Core Lucid Agent — x402 paid API with TDD#15

Open
openpango wants to merge 1 commit intolangoustine69:mainfrom
openpango:feat/t1-core-agent
Open

feat(T1): Core Lucid Agent — x402 paid API with TDD#15
openpango wants to merge 1 commit intolangoustine69:mainfrom
openpango:feat/t1-core-agent

Conversation

@openpango
Copy link
Contributor

Summary

Implements the core Queryx Lucid Agent with x402 USDC micropayments on Base Mainnet.

What's included

  • Zod v4 schemas for all endpoints (request, response, error, health)
  • Search orchestration layer: brave search → rank/dedup → LLM synthesis → in-memory cache
  • 3 paid endpoints: GET /v1/search, GET /v1/search/news, POST /v1/search/deep
  • Health endpoint: GET /health (free, no payment required)
  • Lucid Agent setup with @lucid-agents/core, @lucid-agents/hono, @lucid-agents/payments
  • x402 pricing: $0.001 USDC per search/news, $0.005 USDC per deep research
  • 60 tests passing across contract, logic, integration, and freshness suites

Acceptance criteria

  • All monetized endpoints return HTTP 402 without valid x402 payment
  • All monetized endpoints return valid JSON after payment
  • All responses include freshness and confidence fields
  • 60 tests passing (bun test clean)
  • Server uses export default { port, fetch: app.fetch }
  • Zod v4 schemas throughout

Closes #1

- Zod v4 schemas for all endpoints (request/response/error/health)
- Search orchestration layer (brave → rank → synthesize → cache)
- Routes: GET /v1/search, GET /v1/search/news, POST /v1/search/deep
- Health endpoint: GET /health (free)
- Agent setup with Lucid SDK + x402 payment middleware (Base USDC)
- Pricing: $0.001/search, $0.005/deep
- 60 tests passing (contract + logic + integration + freshness)
- .env.example with all required vars

Closes langoustine69#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[T1] Core Lucid Agent — x402 paid API with TDD

1 participant