Moderia is an AI agent that mediates digital deals between service providers and clients, powered by Nillion DB's secure data storage.
"Modern mediator for digital deals"
Moderia creates a secure marketplace where:
- Service providers list their availabilities and services
- Clients browse and book services
- The AI agent mediates the entire process
- Payments are held in escrow until successful completion
- The agent joins calls to take notes and mediate disputes
The platform uses Nillion DB for secure, encrypted data storage:
- Service listings are securely stored
- Bookings and transaction history are tracked
- Sensitive data is encrypted
- Meeting links and payment information are protected
- Review data and dispute information is securely managed
- Provider information
- Service details
- Availability
- Pricing information
- Service and client references
- Booking details
- Payment information
- Status tracking
- Service ratings
- Client feedback
- Provider responses
- Dispute information
- List and discover available services
- Real-time availability tracking
- Automatic scheduling
- Secure payment escrow
- Release upon completion
- Dispute resolution with partial refunds
- AI joins service calls
- Takes objective notes
- Records key points for potential disputes
- Ensures quality standards
- Review meeting notes
- Compare against service claims
- Issue fair judgments
- Handle compensation when necessary
The agent supports four operating modes:
- Chat Mode: Interactive command-line interface for direct user interaction
- Autonomous Mode: Bot operates independently, checking for disputes or upcoming bookings
- Telegram Mode: Interface through Telegram messenger
- Demo Mode: Run a guided demonstration of Moderia's capabilities
The demo mode walks you through a complete service lifecycle:
- Creating a new service
- Browsing available services
- Booking a service
- Generating meeting links
- Completing bookings with reviews
- Handling disputes
You can access demo mode in two ways:
- Terminal: Select "demo" or "4" when choosing a mode
- Telegram: Use the
/demo
command
Required environment variables:
OPENAI_API_KEY=your_openai_api_key_here
WALLET_PRIVATE_KEY=your_wallet_private_key_here
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
# Nillion DB Configuration
SV_ORG_DID=your_organization_did_here
SV_PRIVATE_KEY=your_secret_vault_private_key_here
SV_PUBLIC_KEY=your_secret_vault_public_key_here
SV_NODE1_URL=your_node1_url_here
SV_NODE1_DID=your_node1_did_here
SV_NODE2_URL=your_node2_url_here
SV_NODE2_DID=your_node2_did_here
SV_NODE3_URL=your_node3_url_here
SV_NODE3_DID=your_node3_did_here
SCHEMA_ID_SERVICE=your_schema_id_here
SCHEMA_ID_BOOKING=your_schema_id_here
SCHEMA_ID_REVIEW=your_schema_id_here
- Clone the repository
- Copy
.env.example
to.env
and fill in your credentials - Install dependencies with
npm install
- Build the project with
npm run build
- Start the agent with
npm start
-
Service Listing:
- Provider creates service (e.g., French lesson on Monday at 3PM)
- Details stored in Nillion DB
-
Discovery & Booking:
- Client searches for available services
- Books and pays for chosen service
- Payment held in escrow
- Meeting link generated
-
Service Delivery:
- Moderia sends reminders to both parties
- Agent joins the call to take notes
- Service is delivered
-
Completion & Payment:
- Client confirms completion
- Provider receives payment
- Optional reviews submitted
-
Dispute Resolution (if needed):
- Agent reviews meeting notes
- Makes fair judgment based on evidence
- Issues appropriate compensation
To extend Moderia's capabilities:
- Update the relevant action provider in
src/action-providers/nillion-db/
- Add new schemas if needed
- Update environment variables accordingly
- Test thoroughly before deployment
MIT
exit
: Return to mode selectionhelp
: Display help information- Natural language commands for all actions
Basic Commands:
/start
: Initialize the bot/menu
: Show all available commands/help
: Get detailed help/demo
: Run demo sequence/exit
: Return to terminal/kill
: Shut down application
Service Provider Actions:
- Create a new service
- Update service details
- List my services
- Set availability
Client Actions:
- Find services
- Book a service
- View my bookings
- Cancel booking
Payment & Reviews:
- Complete booking
- Leave review
- Check payment status
Support & Disputes:
- Report issue
- Open dispute
- Contact support
💡 All actions support natural language input - just describe what you want to do!