Integrate APIGatewaySkill into ServiceAPI for production-grade API auth#152
Merged
lbartoszcze merged 1 commit intomainfrom Feb 8, 2026
Merged
Integrate APIGatewaySkill into ServiceAPI for production-grade API auth#152lbartoszcze merged 1 commit intomainfrom
lbartoszcze merged 1 commit intomainfrom
Conversation
…thentication
Wire the APIGatewaySkill (key management, rate limiting, usage tracking, billing)
into the ServiceAPI REST layer so incoming requests are validated through the
gateway's full authentication pipeline instead of simple key-set checking.
Key changes:
- ServiceAPI accepts optional api_gateway parameter (auto-detected from agent)
- check_auth uses gateway's check_access for scoped validation, rate limiting,
daily limits, key expiry/revocation with proper HTTP status codes (401/403/429)
- Usage automatically tracked via record_usage after task submission and execution
- New endpoints: /billing, /usage/{key_id}, /keys, /keys/{key_id}/revoke, POST /keys
- Full backward compatibility: simple auth still works when no gateway configured
- Health endpoint reports gateway status
Pillar: Revenue Generation - critical for monetization; without this integration,
API keys created by the gateway were never actually validated on incoming requests.
22 new tests, all passing. 31 existing service_api tests still pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lbartoszcze
pushed a commit
that referenced
this pull request
Feb 8, 2026
…and trust New skill that maintains multi-dimensional reputation scores for agents, computed from task delegation outcomes, consensus voting history, and peer endorsements. This is the foundation for trust-based coordination between replicas and reputation-weighted consensus voting. Reputation dimensions (0-100, start at 50 neutral): - Competence: task success rate + budget efficiency - Reliability: on-time delivery, timeout avoidance - Trustworthiness: voting consistency, honesty - Leadership: election wins, role performance - Cooperation: conflict resolution, consensus participation 10 actions: record_event, get_reputation, get_leaderboard, compare, record_task_outcome, record_vote, endorse, penalize, get_history, reset Key features: - Task outcomes affect competence + reliability with budget efficiency bonus - Voting participation boosts cooperation; correct votes boost trustworthiness - Peer endorsements weighted by endorser's own reputation (0.5x to 1.5x) - Leaderboard ranking by any dimension with min-events filtering - Side-by-side agent comparison across all dimensions - Also fixes f-string syntax error in service_api.py from PR #152 18 tests pass, 17 smoke tests pass. Pillar: Replication + Self-Improvement Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
lbartoszcze
added a commit
that referenced
this pull request
Feb 8, 2026
…and trust (#153) New skill that maintains multi-dimensional reputation scores for agents, computed from task delegation outcomes, consensus voting history, and peer endorsements. This is the foundation for trust-based coordination between replicas and reputation-weighted consensus voting. Reputation dimensions (0-100, start at 50 neutral): - Competence: task success rate + budget efficiency - Reliability: on-time delivery, timeout avoidance - Trustworthiness: voting consistency, honesty - Leadership: election wins, role performance - Cooperation: conflict resolution, consensus participation 10 actions: record_event, get_reputation, get_leaderboard, compare, record_task_outcome, record_vote, endorse, penalize, get_history, reset Key features: - Task outcomes affect competence + reliability with budget efficiency bonus - Voting participation boosts cooperation; correct votes boost trustworthiness - Peer endorsements weighted by endorser's own reputation (0.5x to 1.5x) - Leaderboard ranking by any dimension with min-events filtering - Side-by-side agent comparison across all dimensions - Also fixes f-string syntax error in service_api.py from PR #152 18 tests pass, 17 smoke tests pass. Pillar: Replication + Self-Improvement Co-authored-by: Wisent AI <wisent-ai@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/billing,/usage/{key_id},/keys,POST /keys,/keys/{key_id}/revokePillar: Revenue Generation
This is the critical missing link for monetization. The APIGatewaySkill could already create/manage API keys with rate limits, scopes, and billing — but those keys were never actually validated on incoming requests. Without this integration, the entire billing pipeline was disconnected. Now:
Test plan
🤖 Generated with Claude Code