Building Internal AI Tooling

Give your team shared agents with proper permissions. No more credential sharing.

Your team needs AI access. The current solution? Share API keys in Slack. Copy prompts in Notion. Hope nobody leaks credentials. There's a better way.

Source: agent crate and oauth crate

The Internal Tooling Problem

Teams face these challenges with AI tooling:

Problem Current "Solution"
API key access Shared in Slack/1Password
Prompt consistency Copy-paste from Notion
Cost attribution No idea who spent what
Access control All or nothing
Audit trail Hope for the best
Onboarding "Ask Sarah for the key"

How SystemPrompt Solves It

Centralized Agent Access

Define agents once, share with your team:

# services/agents/code-reviewer.yaml
name: code-reviewer
description: "Reviews code for security and best practices"
system_prompt: |
  You are a senior code reviewer. Review code for:
  - Security vulnerabilities
  - Performance issues
  - Best practices
  - Maintainability

  Provide specific, actionable feedback.
skills:
  - id: code_review
    name: "Code Review"

Everyone uses the same optimized prompts. No copy-paste drift.

Team Member Access

Add team members with proper credentials:

# Add team member
systemprompt admin users create \
  --email alice@company.com \
  --name "Alice Engineer" \
  --scopes "user,agent:code-reviewer,agent:docs-writer"

# They receive login credentials automatically

Each team member:

  • Has their own login
  • Gets access to specific agents
  • Has usage tracked individually
  • Can be removed without affecting others

Skills for Common Workflows

Package common workflows as skills:

# services/skills/pr-review.yaml
id: pr_review
name: "PR Review Workflow"
description: "Complete pull request review process"
steps:
  - name: fetch
    tool: github_get_pr
    description: "Fetch PR details"
  - name: analyze
    agent: code-reviewer
    task: "Review the code changes"
  - name: comment
    tool: github_post_comment
    description: "Post review comments"

Team members invoke skills without knowing the details:

# Anyone can run the skill
systemprompt core skills run pr_review --pr 123

Role-Based Access

Different roles get different agents:

# Engineering team
engineering:
  scopes:
    - agent:code-reviewer
    - agent:docs-writer
    - agent:test-generator

# Marketing team
marketing:
  scopes:
    - agent:content-writer
    - agent:social-media
    - agent:analytics-reporter

# Leadership
leadership:
  scopes:
    - agent:*
    - analytics:read

No Credential Sharing

API keys stay in SystemPrompt:

# services/ai/config.yaml
ai:
  providers:
    anthropic:
      api_key: ${ANTHROPIC_API_KEY}  # From environment
    openai:
      api_key: ${OPENAI_API_KEY}

Team members authenticate with SystemPrompt. SystemPrompt handles provider credentials. No keys in Slack.

Implementation Patterns

Team Agent Architecture

┌─────────────────────────────────────────────────────────────┐
│                    INTERNAL TOOLING                          │
│                                                              │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐   │
│  │  Alice   │  │   Bob    │  │  Carol   │  │   Dave   │   │
│  │   Eng    │  │   Eng    │  │Marketing │  │   Ops    │   │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  └────┬─────┘   │
│       │             │             │             │           │
│       ▼             ▼             ▼             ▼           │
│  ┌──────────────────────────────────────────────────────┐  │
│  │                  SYSTEMPROMPT                         │  │
│  │                                                       │  │
│  │  ┌────────────┐  ┌────────────┐  ┌────────────┐     │  │
│  │  │   Code     │  │  Content   │  │   Ops      │     │  │
│  │  │  Reviewer  │  │   Writer   │  │  Assistant │     │  │
│  │  └────────────┘  └────────────┘  └────────────┘     │  │
│  │                                                       │  │
│  │  API Keys: Anthropic, OpenAI, Gemini                 │  │
│  │  (Team never sees these)                              │  │
│  └──────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────┘

Common Agent Types

Code Review Agent

name: code-reviewer
system_prompt: |
  Review code for security, performance, and best practices.
  Focus on actionable feedback.
capabilities:
  - file:read
mcp_servers:
  - github-server

Documentation Writer

name: docs-writer
system_prompt: |
  Write clear, concise technical documentation.
  Follow the team's style guide.
capabilities:
  - file:read
  - file:write

Test Generator

name: test-generator
system_prompt: |
  Generate comprehensive unit tests.
  Cover edge cases and error conditions.
capabilities:
  - file:read
  - file:write

Incident Responder

name: incident-responder
system_prompt: |
  Help diagnose and resolve production incidents.
  Suggest debugging steps and potential fixes.
capabilities:
  - log:read
mcp_servers:
  - monitoring-server
  - database-server

Onboarding Workflow

When a new team member joins:

# 1. Create user account
systemprompt admin users create \
  --email newperson@company.com \
  --name "New Person" \
  --role engineering

# 2. They receive email with:
#    - Login link (WebAuthn)
#    - Getting started guide
#    - Available agents list

# 3. They can immediately use agents
systemprompt admin agents message code-reviewer \
  "Review this function for security issues: ..."

No waiting for API keys. No credential handoff. No security training on key management.

Offboarding

When someone leaves:

# Disable their account
systemprompt admin users disable alice@company.com

# Their access is immediately revoked
# Audit trail shows their historical usage
# No shared credentials to rotate

Cost Management

Per-User Tracking

See who's using what:

systemprompt analytics ai costs --by user --period month

# Output:
# User                    Tokens      Cost
# ----------------------  ----------  -------
# alice@company.com       1,250,000   $45.50
# bob@company.com           890,000   $32.10
# carol@company.com         450,000   $16.25

Budget Alerts

Set spending limits:

# services/billing/config.yaml
budgets:
  team:
    monthly_limit: 500
    alert_threshold: 0.8
    notify: finance@company.com
  per_user:
    monthly_limit: 100
    alert_threshold: 0.9
    notify: user

Usage Reports

Generate reports for finance:

# Monthly usage report
systemprompt analytics report monthly \
  --format csv \
  --output usage-january.csv

Security Best Practices

Principle of Least Privilege

Give minimum necessary access:

# Junior engineer: limited agents
junior_engineer:
  scopes:
    - agent:code-reviewer
    - agent:docs-writer

# Senior engineer: more access
senior_engineer:
  scopes:
    - agent:code-reviewer
    - agent:docs-writer
    - agent:test-generator
    - agent:incident-responder

Audit Everything

Review access logs regularly:

# Who accessed what
systemprompt infra logs --type agent.message --period week

# Failed access attempts
systemprompt infra logs --type permission.denied

Regular Access Reviews

Periodically review who has access:

# List all users and their scopes
systemprompt admin users list --detailed

# Review inactive users
systemprompt admin users list --inactive-days 90

Getting Started

CLI Help: Run systemprompt admin users --help and systemprompt admin agents --help. See CLI Reference.

  1. Set up authentication:
# services/auth/config.yaml
auth:
  webauthn:
    enabled: true
    rp_name: "Company AI Tools"
  oauth2:
    enabled: true
  1. Create shared agents:
# services/agents/assistant.yaml
name: assistant
description: "General purpose team assistant"
system_prompt: |
  You help the team with various tasks.
  1. Add team members:
systemprompt admin users create \
  --email teammate@company.com \
  --scopes "user,agent:assistant"
  1. Team members login and start using:
# After WebAuthn registration
systemprompt admin agents message assistant "Help me with..."

Previous Next
Multi-Tenant AI Complete Workflow