https://devpost.com/software/traid-h6db5a
Text a photo + a casual instruction ("Sell this keyboard, has a scratch, want it gone quickly") to your Poke assistant. trAId identifies the item, researches eBay with a real logged-in browser, texts you the comparable listings it found (title + price), prices it, drafts a listing, asks you to approve over text, publishes to eBay, then autonomously negotiates with buyers — only interrupting you when a sale closes or a listing goes stale. It can also buy: give it an item and a price cap and it hunts, haggles, and closes under budget.
Built for CalHacks AI Hackathon 2026 (24h). See PRD-trAId.md
for the full spec and docs/demo_runbook.md for the demo.
| Sponsor | Role |
|---|---|
| Poke | The entire UI. Our /mcp server exposes start_sale, approve_sale, … ; we push proactive texts via a Poke webhook trigger (the /inbound/api-message endpoint 200s but silently drops messages). No app, no dashboard. |
| AgentSpan | Durable workflow runtime + the visual dashboard at localhost:6767. Survives restarts; real pause/resume at the approval step. Also our only LLM path — Agent(model="anthropic/claude-…"). |
| Browserbase + Stagehand | One persistent browser context (logged into eBay once in the console) drives research, publish, and offer threads with natural-language act/extract. |
| Redis | RedisVL hybrid comparable search + semantic cache, Redis Agent Memory for seller prefs, plain keys for state + the duplicate-publish lock. |
Every Claude call — product ID, pricing bullets, copy, revision parsing,
negotiation decisions — goes through AgentSpan's native model layer
(app/agents/llm.py). Nothing in this repo imports the anthropic SDK directly.
Stagehand uses its own internal LLM to drive the browser; that's the automation
engine's requirement, separate from our reasoning layer.
Poke ──(MCP /mcp)──▶ FastAPI ──▶ AgentSpan sale workflow (durable, resumable)
▲ identify→memory→eBay research→report comps→price→copy
└──(Poke webhook: proactive)─── →propose→⏸approve→eBay publish→verify→notify
│
┌──────────────────────┼───────────────────────────┐
▼ ▼ ▼
AgentSpan(Claude) Browserbase/Stagehand Redis
(1 persistent context) (RedisVL + Agent Memory
+ state keys + lock)
Post-publish: a sell-side negotiation monitor + a buy-side purchase flow hang off
the same Redis state, the shared Browserbase context, and the Poke path.
app/
main.py FastAPI: mounts MCP at /mcp, runs the negotiation monitor
mcp_server.py Poke-facing MCP tools
poke_client.py outbound proactive Poke messages
config.py models.py settings + Pydantic contracts
agents/ llm.py (AgentSpan Claude chokepoint), identify, pricing, copywriter,
revision_parser, negotiator (hard floor/cap guardrails in code)
browser/ session (one shared context), research(+ebay_research),
publish(+ebay_publish), threads(+ebay_offers)
memory/ comparables_index (RedisVL), seller_memory (Agent Memory)
state/ redis_state (keys + publish lock), negotiation_state (policy+scheduler)
workflow/ sale, management, negotiation, purchase
scripts/ seed_seller_memory
docs/ demo_runbook.md
uv venv && source .venv/bin/activate
uv pip install -r requirements.txt
cp .env.example .env # fill in keys
# In the Browserbase console: create a Context, open it, log into eBay by hand
# once, then paste its id into BROWSERBASE_CONTEXT_ID in .env. (No login code —
# the session cookies persist in that one context across every run.)
# prerequisites: Redis Stack, Redis Agent Memory Server, AgentSpan local server
python -m scripts.seed_seller_memory # seed demo seller prefs
uvicorn app.main:app --port 8000
npx poke@latest tunnel http://localhost:8000/mcp -n "trAId"Grounded against live docs on 2026-06-20; pin exact signatures on Day 1:
- AgentSpan:
Agent/AgentRuntime/AgentHandlekwargs, multimodal vision message shape inagents/llm.py,runtime.start/handle.approvereturn types. - MCP SDK:
FastMCP.streamable_http_app()mount path +session_manager.run(). - RedisVL:
SearchIndex,VectorQuery,SemanticCacheimport paths. - Redis Agent Memory client:
search_long_term_memory/create_long_term_memorysignatures (wrapped defensively inmemory/seller_memory.py). - Stagehand Python:
StagehandConfigfields +page.act/extractschema arg. Each is isolated behind a thin adapter so a signature fix touches one file.