Skip to main content

Overview

CrewAI is a multi-agent orchestration framework where specialized agents collaborate as a team. It has native MCP support — add Ovra’s server URL and your agents get payment capabilities instantly.

Install

pip install crewai mcp

Setup

CrewAI supports adding MCP servers directly on agents via the mcps field:
from crewai import Agent, Task, Crew
from crewai.mcp import MCPServerHTTP

purchasing_agent = Agent(
    role="Purchasing Agent",
    goal="Find and buy products at the best price",
    backstory="Expert online shopper with access to payment tools",
    mcps=[
        MCPServerHTTP(
            url="https://api.getovra.com/api/mcp",
            headers={"Authorization": "Bearer <OVRA_AGENT_TOKEN>"},
            streamable=True,
        ),
    ],
)

auditor_agent = Agent(
    role="Compliance Auditor",
    goal="Verify all purchases follow company policy",
    backstory="Financial compliance expert",
    mcps=[
        MCPServerHTTP(
            url="https://api.getovra.com/api/mcp",
            headers={"Authorization": "Bearer <OVRA_AGENT_TOKEN>"},
            streamable=True,
        ),
    ],
)

Multi-Agent Workflow

purchase_task = Task(
    description="Buy a USB-C hub under €30 on amazon.de",
    expected_output="Order confirmation with transaction ID",
    agent=purchasing_agent,
)

audit_task = Task(
    description="Verify the purchase complies with spending policy and attach receipt",
    expected_output="Compliance report",
    agent=auditor_agent,
)

crew = Crew(
    agents=[purchasing_agent, auditor_agent],
    tasks=[purchase_task, audit_task],
    verbose=True,
)

result = crew.kickoff()

Why CrewAI + Ovra

  • Role-based agents — separate purchasing, auditing, and reporting into specialized agents
  • Policy enforcement — Ovra’s policy engine validates every purchase automatically
  • Receipt chain — auditor agent can attach receipts via ovra_receipt and verify transactions
  • Fastest prototyping — concept to working demo in hours, not days

Payment Flow

Purchasing Agent:
  1. ovra_intent → declare purchase
  2. ovra_credential → get DPAN
  3. Pay at merchant
  4. ovra_credential → confirm

Auditor Agent:
  5. ovra_transaction → verify recorded
  6. ovra_receipt → attach evidence

Key Tools

ToolPurpose
ovra_agentList agents, check balance
ovra_intentDeclare purchase intent (auto policy check)
ovra_credentialGet DPAN, confirm payment
ovra_transactionView and verify transactions
ovra_receiptAttach receipts as evidence
ovra_policyCheck if a purchase would be allowed