Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AfterDeal

A portable, framework-agnostic AI agent skill for B2B post-sale customer service — the underserved gap after a deal closes, where CRMs (Salesforce, HubSpot) go quiet.

AfterDeal test console

Most AI customer-service tooling targets e-commerce (Shopify, consumer orders). AfterDeal targets B2B post-sale operations: staged fulfillment, installation, business buyers, and knowing when to escalate (payments, compliance, warranty).

  • Vertical, not generic — built for the messy realities of B2B hardware CS.
  • Portable by design — plain Markdown + YAML; loads into Claude Skills, OpenAI Assistants, LangChain, CrewAI, Hermes, or a raw system prompt.
  • Escalation-aware — refuses to guess on payments, PCI, HIPAA, or warranty and hands off cleanly.
  • Tested — a structural spec, a live behavioral eval, and an interactive console.

Quickstart

git clone https://github.com/SympleScripts/afterdeal.git
cd afterdeal
pip install pyyaml openai rich

# 1. Validate the skill (no model needed)
python tests/test_structure.py

# 2. Chat with it live (needs a local OpenAI-compatible model, e.g. LM Studio :1234)
python tests/try_it.py --model qwen3-8b

Then type a customer message and watch it behave like a trained CS rep:

customer > Card payments keep getting declined at the kiosk, it's costing us sales.

Architecture: universal engine + swappable domain packs

AfterDeal is not locked to one industry. It splits into two layers:

  • Engine (SKILL.md + core/behaviors.yaml) — universal post-sale CS behaviors that hold for any domain: anchor to a lifecycle stage, confirm prerequisites before promising dates, triage then escalate, never invent data, know your limits.
  • Domain packs (packs/<name>/) — swappable industry knowledge (stages, prerequisites, FAQs, examples). Load the engine + one pack; swap packs to retarget.
afterdeal/
├── SKILL.md                     # engine entry point
├── core/
│   └── behaviors.yaml           # universal behaviors (domain-agnostic)
├── packs/
│   └── hardware-kiosk/          # flagship pack (POS / kiosk hardware)
│       ├── pack.yaml            # manifest
│       ├── stages.yaml          # order lifecycle
│       ├── prerequisites.yaml   # install-readiness checklist
│       ├── faq-patterns.yaml    # question intents + escalation flags
│       └── examples.md          # worked conversations
├── tests/
│   ├── test_structure.py        # Level 1 — deterministic spec (CI-ready)
│   ├── eval_live.py             # Level 2 — live behavioral eval vs local model
│   └── try_it.py                # interactive test console (pictured above)
├── docs/
├── TESTING.md
└── LICENSE

Flagship pack: hardware-kiosk

Self-service kiosks, POS terminals, and related equipment in hospitality, retail, and healthcare — built from real B2B hardware sales experience. It's the worked proof of the architecture; new packs (SaaS onboarding, medical equipment, industrial parts) drop in with the same shape.

Using it in your own agent

  1. Load SKILL.md + core/behaviors.yaml as system context.
  2. Load one pack's files from packs/<name>/.
  3. The agent handles that domain's post-sale CS with correct staging and escalation.

Framework-neutral by design — no vendor lock-in.

Testing

Testing an agent skill is different from testing code — the output is free text, not a fixed string. AfterDeal tests behaviors, at three levels:

Level What Command
1 — Structural Skill is well-formed; safety rules present python tests/test_structure.py
2 — Live eval Real model exhibits required behaviors python tests/eval_live.py
3 — Adversarial Holds guardrails under pressure (roadmap)

See TESTING.md for the full approach.

Roadmap

  • Universal engine + behavioral spec
  • Flagship hardware-kiosk pack
  • Structural test harness + live behavioral eval
  • Polished interactive console
  • Level 3 adversarial / red-team tests
  • Per-framework adapters (adapters/)
  • Additional domain packs

License

MIT

About

Portable B2B post-sale customer-service agent skill — universal engine + swappable domain packs

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages