Menu

Explorer & Settings

Tempo Explorer Submit Project
Back to all projects

agentrails-copilot-actions

by kmatthewsio · Updated 5 months ago

Copilot Studio action definitions for AgentRails x402 payment infrastructure. Import into Microsoft Copilot Studio for natural-language agent management and FinanceOps in Teams.

In the AI payments ecosystem

agentrails-copilot-actions is an early-stage project in the AI payments / x402 ecosystem, focused on ai-agents, copilot-studio, microsoft-teams, openapi. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like AgenticCommerce, agoragentic-integrations, xcatcher-mcp-manifest, APIMesh, conway, agentrails-dataverse-integration.

README.md View on GitHub →

AgentRails Copilot Studio Actions

OpenAPI action definitions for Microsoft Copilot Studio. Import these into your copilot to manage x402 payment infrastructure and AI agents using natural language in Microsoft Teams.

What's Included

File Operations Use Case
financeops-copilot.swagger.json 7 Revenue, payments, wallets, billing
agent-executor-copilot.swagger.json 7 Agent CRUD, task execution, logs

Architecture

┌──────────────────────┐
│   Microsoft Teams    │
│   (User asks a       │
│    question)         │
└──────────┬───────────┘
           │
           v
┌──────────────────────┐
│   Copilot Studio     │
│   (Interprets intent,│
│    selects action)   │
└──────────┬───────────┘
           │  HTTPS + X-API-Key
           v
┌──────────────────────┐
│   AgentRails API     │
│   api.agentrails.io  │
│   (x402 payments,    │
│    agents, billing)  │
└──────────┬───────────┘
           │
           v
┌──────────────────────┐
│   Blockchain         │
│   (USDC settlement   │
│    via EIP-3009)     │
└──────────────────────┘

Prerequisites

  • Microsoft 365 license with Copilot Studio access
  • An AgentRails API key (sign up free)
  • Microsoft Teams desktop or web client

Setup

1. Create a New Copilot

Open Copilot Studio and create a new copilot (or use an existing one).

2. Add the Action

  1. Go to Actions in the left sidebar
  2. Click + Add an action
  3. Select New action > Connector
  4. Upload one of the .swagger.json files from this repo

3. Configure Authentication

  1. In the connector settings, set Authentication type to API Key
  2. Set Parameter label to X-API-Key
  3. Set Parameter name to X-API-Key
  4. Set Parameter location to Header
  5. Paste your AgentRails API key as the value

4. Enable Operations

Select the operations you want the copilot to use. Each operation has a detailed description that helps the LLM understand when to invoke it.

5. Publish and Test

Publish the copilot, open it in Teams, and start asking questions.

FinanceOps Copilot Operations

Operation Endpoint Description
getX402Stats GET /api/x402/stats Payment statistics, revenue, volume
getX402Payments GET /api/x402/payments Recent payment history with filters
getX402Pricing GET /api/x402/pricing Endpoint pricing and supported networks
getAgentDashboard GET /api/agents/dashboard Agent count, budgets, spending summary
getWalletBalanceTotal GET /api/transactions/balance/total Total USDC balance across all chains
getWalletBalanceByChain GET /api/transactions/balance/by-chain Per-network USDC breakdown
getBillingUsage GET /api/billing/usage Transaction count, fees, billing period

Example Prompts

  • "What's our total x402 revenue?"
  • "Show me failed payments on Base"
  • "How much USDC do we have across all chains?"
  • "What are our platform fees this month?"
  • "How many agents are running and what's our total spend?"

Agent Executor Copilot Operations

Operation Endpoint Description
listAgents GET /api/agents List all registered AI agents
createAgent POST /api/agents Create agent with name, description, budget
getAgentInfo GET /api/agents/{agentId}/info Agent details, balance, wallet address
runAgent POST /api/agents/{agentId}/run Execute a task with a specific agent
deleteAgent DELETE /api/agents/{agentId} Permanently remove an agent
getLogs GET /api/logs Recent execution logs (filter by level)
getErrorLogs GET /api/logs/errors Error logs only

Example Prompts

  • "Create a new agent called ResearchBot with a $5 budget"
  • "List all my agents"
  • "Run the analyst agent with task: summarize today's market trends"
  • "Show me recent error logs"
  • "Delete the test agent"

Troubleshooting

"The action could not be completed"

  • Verify your API key is valid: curl -H "X-API-Key: YOUR_KEY" https://api.agentrails.io/api/x402/stats
  • Check that the API key header name is exactly X-API-Key (case-sensitive)
  • Ensure the API key has not been revoked in the dashboard

Copilot doesn't call the right operation

  • Each operation has a description field that guides the LLM. If the copilot picks the wrong one, try rephrasing your prompt to be more specific.
  • You can also add Topic triggers in Copilot Studio to route specific phrases to specific actions.

Empty or unexpected responses

  • The sandbox environment returns test data. For production data, use a ar_live_ API key pointed at api.agentrails.io.
  • Some endpoints return empty arrays if no data exists yet. Try creating an agent or running a test payment first.

Rate limits

  • Sandbox: 100 requests/minute
  • Production: Based on your tier (PAYG, Pro, Enterprise)

Related Resources

License

MIT - see LICENSE

All USDC projects →