Skip to content

aporthq/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ APort - Agent Identity & Policy Enforcement

APort Logo

The neutral, portable passport + verify + suspend rail for AI agents

GitHub Actions API Status License

๐ŸŒ Website โ€ข ๐Ÿ“š Docs โ€ข ๐Ÿš€ Try Now โ€ข ๐Ÿ’ฌ Support


๐ŸŽฏ The Problem

graph TD
    A[๐Ÿค– AI Agent] --> B[๐Ÿ’ณ Refund $1000]
    A --> C[๐Ÿ“Š Export 1M Rows]
    A --> D[๐Ÿ”€ Merge to Main]
    A --> E[๐Ÿš€ Deploy to Prod]
    
    B --> F[โŒ No Identity Check]
    C --> F
    D --> F
    E --> F
    
    F --> G[๐Ÿ’ฅ Security Incident]
    G --> H[โฐ Hours to Detect]
    H --> I[๐Ÿ’ฐ $10K+ in Damages]
    
    style A fill:#ff6b6b
    style F fill:#ff6b6b
    style G fill:#ff6b6b
    style I fill:#ff6b6b
Loading

Organizations are letting AI agents perform sensitive actions without proper identity verification or policy enforcement.

โœจ The Solution

graph TD
    A[๐Ÿค– AI Agent<br/>with Passport] --> B[๐Ÿ›ก๏ธ APort Verify]
    B --> C{Policy Check}
    C -->|โœ… Allowed| D[โœ… Action Proceeds]
    C -->|โŒ Blocked| E[๐Ÿšซ Action Blocked]
    
    F[๐Ÿ“‹ Policy Pack] --> B
    G[โšก Global Suspend] --> B
    
    style A fill:#06b6d4,color:#ffffff
    style B fill:#10b981,color:#ffffff
    style D fill:#10b981,color:#ffffff
    style E fill:#ef4444,color:#ffffff
    style F fill:#8b5cf6,color:#ffffff
    style G fill:#f59e0b,color:#ffffff
Loading

APort provides a neutral, portable identity and policy enforcement layer for AI agents across all platforms.

๐Ÿš€ Quick Start

1. Create Your Agent Passport

# Create a template passport via API
curl -X POST "https://api.aport.io/api/admin/create" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_API_KEY" \
  -d '{
    "name": "HappyRefunds Bot",
    "role": "Support Refunds",
    "description": "Refund helper for customer support",
    "capabilities": [{"id": "payments.refund", "params": {}}],
    "limits": {
      "refund_usd_max_per_tx": 50,
      "refund_usd_daily_cap": 200
    },
    "regions": ["US", "CA"],
    "contact": "team@aport.io",
    "links": {
      "homepage": "https://aport.io",
      "repo": "https://github.com/aporthq/agent-passport"
    },
    "kind": "template",
    "controller_type": "org",
    "status": "active"
  }'

2. Add Policy Enforcement

# .github/workflows/aport-verify.yml
name: APort Verify PR
on: [pull_request]

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: aporthq/policy-verify-action@v1
        with:
          agent-id: ${{ secrets.APORT_AGENT_ID }}
          policy-pack: 'repo.v1'

3. Integrate with Your App

// Express.js with Policy Pack middleware
const { requirePolicy } = require("@aport/middleware-express");

// Apply policy enforcement to refunds endpoint
app.post("/api/refunds", 
  requirePolicy("refunds.v1", "agt_inst_xyz789"),
  async (req, res) => {
    // Your business logic - policy already verified!
    const refund = await processRefund(req.body);
    res.json({ success: true, refund });
  }
);

๐ŸŽจ Features

๐Ÿท๏ธ Feature ๐Ÿ“ Description ๐ŸŽฏ Use Case
๐Ÿ†” Agent Identity Portable passports with capabilities & limits Know who your agents are
๐Ÿ“‹ Policy Packs Pre-built policies for common actions Enforce business rules
โšก Real-time Verify Sub-100ms policy checks Block bad actions instantly
๐Ÿšจ Global Suspend Kill switch across all platforms Stop incidents in seconds
๐Ÿ” Multi-level Assurance Email, GitHub, Domain verification Trust but verify
๐Ÿ“Š Audit Trail Complete action history Compliance & debugging

๐Ÿ› ๏ธ Supported Platforms

graph LR
    A[๐Ÿ›ก๏ธ APort Core] --> B[๐Ÿ’ณ Payments]
    A --> C[๐Ÿ“Š Data Export]
    A --> D[๐Ÿ”€ Git Operations]
    A --> E[๐Ÿš€ CI/CD]
    A --> F[๐Ÿ’ฌ Messaging]
    
    B --> B1[Stripe<br/>PayPal<br/>Square]
    C --> C1[Segment<br/>Fivetran<br/>Snowflake]
    D --> D1[GitHub<br/>GitLab<br/>Bitbucket]
    E --> E1[GitHub Actions<br/>Jenkins<br/>CircleCI]
    F --> F1[Slack<br/>Teams<br/>Discord]
    
    style A fill:#06b6d4,color:#ffffff
    style B fill:#10b981,color:#ffffff
    style C fill:#f59e0b,color:#ffffff
    style D fill:#8b5cf6,color:#ffffff
    style E fill:#ef4444,color:#ffffff
    style F fill:#06b6d4,color:#ffffff
Loading

๐Ÿ“ฆ Policy Packs

๐Ÿ’ณ Refunds Protection

{
  "policy": "refunds.v1",
  "limits": {
    "max_refund_per_tx": 1000,
    "max_refunds_per_day": 10,
    "allowed_currencies": ["USD", "EUR"]
  }
}

๐Ÿ“Š Data Export Control

{
  "policy": "data_export.v1", 
  "limits": {
    "max_rows_per_export": 100000,
    "allow_pii": false,
    "allowed_datasets": ["users", "orders"]
  }
}

๐Ÿ”€ Repository Safety

{
  "policy": "repo.v1",
  "limits": {
    "max_prs_per_day": 5,
    "allowed_repos": ["owner/repo1"],
    "require_review": true
  }
}

๐ŸŽฏ Real-World Examples

๐Ÿ›’ E-commerce Refund Bot

// Express.js with Policy Pack middleware
const { requirePolicy } = require("@aport/middleware-express");

app.post("/api/refunds", 
  requirePolicy("refunds.v1", "agt_inst_xyz789"),
  async (req, res) => {
    // Policy already verified! Check specific limits
    const passport = req.policyResult.passport;
    
    if (req.body.amount > passport.limits.refund_usd_max_per_tx) {
      return res.status(403).json({
        error: "Refund exceeds limit",
        requested: req.body.amount,
        limit: passport.limits.refund_usd_max_per_tx
      });
    }

    // Process refund safely
    const refund = await stripe.refunds.create({
      amount: req.body.amount,
      payment_intent: req.body.payment_intent
    });
    
    res.json({ success: true, refund });
  }
);

๐Ÿ”€ GitHub PR Automation

# .github/workflows/aport-verify.yml
name: APort Verify PR
on: [pull_request]

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Verify via APort
        run: |
          BODY=$(jq -n \
            --arg agent_id "$APORT_AGENT_ID" \
            --arg repo "$GITHUB_REPOSITORY" \
            --arg base "${{ github.event.pull_request.base.ref }}" \
            --arg head "${{ github.event.pull_request.head.ref }}" \
            --argjson files_changed "${{ steps.changed-files.outputs.files }}" \
            '{
              agent_id: $agent_id,
              context: {
                repo: $repo,
                base: $base,
                head: $head,
                files_changed: $files_changed,
                author: "${{ github.event.pull_request.user.login }}"
              }
            }')
          
          curl -s -X POST "https://api.aport.io/api/verify/policy/repo.v1" \
            -H "Content-Type: application/json" \
            -d "$BODY" | tee result.json
        env:
          APORT_AGENT_ID: ${{ secrets.APORT_AGENT_ID }}

๐Ÿ“Š Data Export Control

// FastAPI with Policy Pack middleware
from fastapi import FastAPI, Request
from aport.middleware import require_policy

@app.post("/api/data/export")
@require_policy("data_export.v1", "agt_inst_xyz789")
async def export_data(request: Request, export_data: dict):
    passport = request.state.policy_result.passport
    
    # Check PII permission
    if export_data.get("include_pii") and not passport.limits.allow_pii:
        raise HTTPException(403, {
            "error": "PII export not allowed",
            "agent_id": passport.agent_id,
            "upgrade_instructions": "Request PII export capability from your administrator"
        })
    
    # Check row limit
    if export_data["rows"] > passport.limits.max_rows_per_export:
        raise HTTPException(403, {
            "error": "Export exceeds row limit",
            "requested": export_data["rows"],
            "limit": passport.limits.max_rows_per_export
        })
    
    # Process export safely
    return {"success": True, "export_id": f"exp_{int(time.time())}"}

๐Ÿ“Š Performance & Reliability

Metric Target Actual
โšก Verify Latency <100ms p95 ~50ms p95
๐Ÿšจ Suspend Time <30s global ~15s global
๐Ÿ“ˆ Uptime 99.9% 99.99%
๐Ÿ”„ Throughput 10k req/s 50k+ req/s

๐Ÿ† Why Choose APort?

graph TD
    A[๐Ÿค” Current State] --> B[โŒ Custom Solutions]
    A --> C[โŒ Platform Lock-in]
    A --> D[โŒ No Global Control]
    
    E[โœจ With APort] --> F[โœ… Standardized]
    E --> G[โœ… Portable]
    E --> H[โœ… Global Suspend]
    
    B --> I[๐Ÿ’ฐ High Cost]
    C --> I
    D --> I
    
    F --> J[๐Ÿ’ฐ Lower Cost]
    G --> J
    H --> J
    
    style A fill:#ef4444,color:#ffffff
    style E fill:#10b981,color:#ffffff
    style I fill:#ef4444,color:#ffffff
    style J fill:#10b981,color:#ffffff
Loading

๐ŸŽฏ Neutral & Portable

  • Works across all platforms
  • No vendor lock-in
  • Open standards

โšก Real-time Enforcement

  • Sub-100ms policy checks
  • Global suspend in seconds
  • Edge-deployed for speed

๐Ÿ” Enterprise Ready

  • Multi-level assurance
  • Complete audit trails
  • Compliance built-in

๐Ÿ› ๏ธ Developer Friendly

  • Simple APIs
  • Rich SDKs
  • GitHub Actions ready

๐Ÿ‘ฅ For Every Role

๐Ÿค– Agent Builders

Create and manage AI agent passports with capabilities and limits

# Issue a template passport
curl -X POST "https://api.aport.io/api/admin/create" \
  -H "Authorization: Bearer YOUR_ADMIN_API_KEY" \
  -d '{
    "name": "HappyRefunds Bot",
    "role": "Support Refunds", 
    "capabilities": [{"id": "payments.refund", "params": {}}],
    "limits": {"refund_usd_max_per_tx": 50}
  }'

๐Ÿข Platform Developers

Integrate APort middleware to protect sensitive operations

// Express.js middleware
const { requirePolicy } = require("@aport/middleware-express");

app.post("/api/refunds", 
  requirePolicy("refunds.v1", "agt_inst_xyz789"),
  async (req, res) => {
    // Policy already verified!
    res.json({ success: true, refund: await processRefund(req.body) });
  }
);

๐Ÿ”ง DevOps Engineers

Add GitHub Actions for automated policy verification

# .github/workflows/aport-verify.yml
name: APort Verify PR
on: [pull_request]
jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: aporthq/policy-verify-action@v1
        with:
          agent-id: ${{ secrets.APORT_AGENT_ID }}
          policy-pack: 'repo.v1'

๐ŸŽฏ No-Code Platforms

Mint instance passports for each tenant installation

# Mint instance passport on tenant install
curl -X POST "https://api.aport.io/api/passports/agt_tmpl_abc123/instances" \
  -H "Authorization: Bearer YOUR_PLATFORM_API_KEY" \
  -d '{
    "platform_id": "gorgias",
    "controller_id": "org_acme",
    "tenant_ref": "store_987",
    "overrides": {"limits": {"refund_usd_max_per_tx": 50}}
  }'

๐Ÿš€ Get Started Today

๐ŸŽฏ For Developers

Try APort

๐Ÿข For Platforms

Contact Sales

๐Ÿ’ฌ Get Support

Support

๐Ÿ“š Resources

๐Ÿค Contributing

We love contributions! Whether it's:

  • ๐Ÿ› Bug fixes
  • โœจ New features
  • ๐Ÿ“š Documentation
  • ๐ŸŽจ Design improvements
  • ๐Ÿงช Tests

Check out our Contributing Guide to get started.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ›ก๏ธ Secure your AI agents. Trust but verify.

GitHub Twitter LinkedIn

Made with โค๏ธ by the APort team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published