Logo Template Repo

Template Repo

Cộng đồng
AndrewAltimit

Agent orchestration & security template featuring MCP tool building, agent2agent workflows, mechanistic interpretability on sleeper agents, and agent integration via CLI wrappers

Nhà phát hànhAndrewAltimit
Kho mãtemplate-repo
Ngôn ngữRust
Bản fork
30
Sao
132
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépUnlicense
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Template Repo cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    132 sao và 30 bản fork từ kho mã được liên kết.

Agent Orchestration & Security Template

A reference architecture for AI agent orchestration, trust measurement, and tool integration. Designed to be studied, forked, and adapted, not contributed to directly. All code changes in this repository are authored by AI agents under human oversight. Browse the project showcase for an overview.

This repo demonstrates how to run a council of AI agents (Claude, OpenCode, Crush) across a shared codebase with board-driven task delegation, automated PR review, security hardening, and containerized tooling. It also includes standalone research packages for sleeper agent detection, autonomous economic agent simulation, tamper-responsive hardware, and lab automation. Several companion repositories consume or extend the functionality of this project.

Use this repo to learn how to:

  • Orchestrate multiple AI agents with a GitHub Projects v2 work queue
  • Measure and enforce trust boundaries for autonomous agents (wrapper guards, iteration limits, claim tracking)
  • Integrate 19 active MCP servers spanning code quality, content creation, 3D graphics, video editing, and speech synthesis
  • Build hardened CI/CD pipelines for agent-authored code (staged lint/test/security CI, multi-arch Docker builds)
  • Train sleeper-agent model organisms and probe them with residual stream analysis and linear probes (known-trigger backdoors are confirmed and localized; detecting an unknown backdoor is not yet demonstrated)
  • Integrate AI agents into legacy software via runtime injection, shared memory IPC, and overlay rendering

MCP Demo


Important: This is an advanced template designed for experienced developers working with autonomous AI agents. Before diving in, we strongly recommend:

  1. Read the AI Safety Training Guide - Essential concepts for safe human-AI collaboration, including deception detection, scalable oversight, and control protocols

  2. Take an AI Safety course at BlueDot Impact - Free, rigorous training programs covering AI safety fundamentals, governance, and alignment

Working with AI agents introduces risks that differ fundamentally from traditional software. Understanding these risks isn't optional - it's a prerequisite for responsible development.


Legal Notice

This repository contains dual-use research and tooling. The maintainer provides no guidance, consultation, or feature development, whether solicited or unsolicited, compensated or uncompensated. This policy exists as a legal protection given the nature of the codebase.

  • No feature requests will be accepted. Money does not change this.
  • No guidance or consulting will be provided on usage, adaptation, or deployment of any component.
  • No external contributions are accepted. See CONTRIBUTING.md.
  • The maintainer does not seek or engage with community interaction. Public comments, issues filed by external parties, events, and news surrounding this repository or its components may be ignored without response to maintain neutrality and legal distance.
  • No endorsement is implied. The existence of code in this repository does not constitute encouragement, recommendation, or endorsement of any particular use.

This repository is released under a public domain dedication. You may fork and adapt it freely. The maintainer assumes no obligation to any downstream user for any reason.

Project Philosophy

This project follows a container-first approach:

  • All tools and CI/CD operations run in Docker containers for maximum portability
  • Zero external dependencies - runs on any Linux system with Docker
  • Self-hosted infrastructure - no cloud costs, full control over runners
  • Single maintainer design - optimized for individual developer productivity, no contributors model
  • Modular MCP architecture - Separate specialized servers for different functionalities

Quick Start

New to the template? Check out our Template Quickstart Guide for step-by-step customization instructions!

  1. Prerequisites: Linux system with Docker (v20.10+) and Docker Compose (v2.0+)

  2. Clone and setup

    bash
    git clone https://github.com/AndrewAltimit/template-repo
    cd template-repo
    # Build the Rust CLI tools (optional - pre-built binaries available in releases)
    cd tools/rust/board-manager && cargo build --release
    cd ../github-agents-cli && cargo build --release
  3. Set API keys (if using AI features)

    bash
    export OPENROUTER_API_KEY="your-key-here"  # For OpenCode/Crush
  4. Use with Claude Code: MCP servers are configured in .mcp.json and auto-started by Claude. See MCP Configuration for essential vs full setups.

  5. Run CI/CD operations

    bash
    automation-cli ci run full  # Full pipeline

For detailed setup, see CLAUDE.md and Template Quickstart Guide.

AI Agents

Active agents: Claude Code (primary; also runs the security and quality PR reviews), OpenRouter (general PR review via qwen/qwen3.7-max), OpenCode and Crush (code generation via OpenRouter), and GitHub Copilot (PR suggestions). Gemini and Codex code remains in the repo but is legacy / not allowed (why).

The canonical roster is the Agent Availability Matrix; see also AI Agents Documentation and the Claude Code Setup Guide.

Security: Keyword triggers, user allow list, secure token management. See Security Model

Safety Training: Essential AI safety concepts for human-AI collaboration. See Human Training Guide

Sleeper Agents: Create and evaluate sleeper agents in order to detect misalignment and probe for deception. See Sleeper Agents Package

Agentic Git Workflow

AI agents autonomously manage the development lifecycle from issue creation through PR merge:

Issue Created → Admin Approval → Agent Claims → PR Created → AI Review → Human Merge

The Flow:

  1. Issue Creation - Issues are created manually or by agents via backlog-refinement.yml, automatically added to the GitHub Projects board
  2. Admin Approval - An authorized user comments [Approved][Claude] (or another agent name) to authorize work
  3. Agent Claims - board-agent-worker.yml finds approved issues, the agent claims the issue and creates a working branch
  4. Implementation - The agent implements the fix/feature and opens a PR
  5. AI Review - pr-validation.yml triggers AI code review (Claude + OpenRouter); pr-review-monitor.yml lets agents iterate on feedback
  6. Human Merge - Admin reviews and merges the PR

Security Model:

  • Approval Required - Agents cannot work on issues without explicit [Approved][Agent] comment
  • Authorized Users Only - Only users listed in .agents.yaml → security.agent_admins can approve
  • Pattern Validation - Must use [Action][Agent] format (e.g., [Approved][Claude]) to prevent false positives
  • Claim Tracking - Agents post claim comments with timestamps to prevent conflicts

See Security Documentation for the complete security model.

Reports & Research

Technical reports and guides exploring AI risks, safety frameworks, and philosophical questions. PDFs are automatically built from LaTeX source and published with each release.

Emerging Technology Risk Assessments

Scenario-based projection reports analyzing potential futures involving advanced AI systems. See Projections Documentation.

ReportTopicPDFSource
AI Agents Political TargetingPolitical violence riskDownloadLaTeX
AI Agents WMD ProliferationWMD proliferation riskDownloadLaTeX
AI Agents Espionage OperationsIntelligence tradecraftDownloadLaTeX
AI Agents Economic ActorsAutonomous economic actorsDownloadLaTeX
AI Agents Financial IntegrityMoney laundering & corruptionDownloadLaTeX
AI Agents Institutional ErosionIC monopoly erosion & verification pivotDownloadLaTeX

Technical Guides

GuideDescriptionPDFSource
Agentic Workflow HandoutAI agent pipeline architecture and workflowsDownloadLaTeX
Sleeper Agents FrameworkAI backdoor detection research using residual stream analysisDownloadLaTeX
AgentCore Memory IntegrationMulti-provider AI memory systemDownloadLaTeX
Virtual Character SystemAI agent embodiment platformDownloadLaTeX
AI Agent Containment & Infrastructure SecurityIsolation, trust-tiered execution, and physical security for AI agentsDownloadLaTeX
Agent Swarm Honeypot GuideDeception program design for detecting, attributing, and reporting autonomous agent swarmsDownloadLaTeX
BioForge CRISPR AutomationAgent-driven biological automation platformDownloadLaTeX
Secure Terminal BriefcaseTamper-responsive hardware security system with PQC recoveryDownloadLaTeX

Philosophy Papers

Philosophical explorations of minds, experience, and intelligence. See Philosophy Papers Documentation.

PaperTopicPDFSource
Architectural QualiaWhat Is It Like to Be an LLM?DownloadLaTeX

Build Status: Build Documentation

Packages

Standalone packages addressing different aspects of AI agent development, safety, and security:

PackagePurposeDocumentation
Sleeper AgentsPython + Rust research framework for evaluating hidden backdoors in LLMs (confirms and localizes backdoors with a known trigger; unknown-backdoor detection is not yet demonstrated), based on Anthropic's research on deceptive AI that persists through safety trainingREADME | PDF Guide
Economic AgentsRust-based simulation framework demonstrating autonomous AI economic capability - agents that earn money, form companies, hire sub-agents, and seek investment. For governance research and policy developmentREADME
Tamper BriefcaseTamper-responsive Raspberry Pi briefcase with dual-sensor detection, LUKS2 cryptographic wipe, and hybrid PQC recovery USB. For secure physical transport of field-deployable agent terminalsREADME | Hardware Docs
BioForgeAgent-driven biological automation platform (Rust): Raspberry Pi 5 liquid handling with AI agent orchestration over MCP, gated by a safety enforcer. Simulated hardwareREADME | Hardware Docs

Rust CLI Tools (in tools/rust/):

ToolPurposeDocumentation
github-agents-cliIssue/PR monitoring, refinement, code analysis, and agent executionREADME
board-managerGitHub Projects v2 board operations - claim, release, status updatesREADME
git-guardGit CLI wrapper requiring sudo for dangerous operations (force push, --no-verify)README
gh-validatorGitHub CLI wrapper for automatic secret maskingREADME
pr-monitorDedicated PR monitoring for admin/review feedback during developmentREADME
markdown-link-checkerFast concurrent markdown link validator for CI/CD pipelinesREADME
code-parserParse and apply code blocks from AI agent responsesREADME
mcp-code-qualityRust MCP server for code quality tools (formatting, linting, testing)README

Companion Repositories

RepositoryDescriptionDocumentation
game-modsInjection toolkit for AI agent integration with legacy software: DLL injection (Windows), LD_PRELOAD (Linux), shared memory IPC, overlay rendering, and MCP memory explorer for process introspectionREADME
oasis-osEmbeddable OS framework (18 crates): scene-graph UI, 90+ terminal commands, browser engine (HTML/CSS/Gemini), window manager, VFS, plugin system, and remote terminal. 4 backends (SDL2, PSP via rust-psp, UE5 FFI, planned framebuffer) with 8 skinnable themes. Used as the shell environment for the Tamper BriefcaseREADME | Design Doc
breakpointBrowser-based multiplayer gaming platform for agentic office hours: Rust/WASM games (mini-golf, platform racer, laser tag) with an alert overlay that surfaces agent activity, CI failures, and decision points directly into the shared session. WSS on port 443 for corporate networksREADME
rust-pspModernized Rust SDK for PlayStation Portable: ~829 syscall bindings, 38+ high-level modules (graphics, audio, networking, crypto), kernel mode support, and experimental std (thread, fs, sync, time). Edition 2024 fork with C runtime safety fixes and pre-built CI binaries (cargo-psp, prxgen, pack-pbp)README

Companion repositories consume template-repo release binaries (e.g., github-agents-cli, automation-cli) for their AI-assisted workflows.

bash
# Install Python packages
pip install -e ./packages/sleeper_agents

# Build Rust packages (requires Rust toolchain)
cd packages/economic_agents && cargo build --release
cd tools/rust/github-agents-cli && cargo build --release
cd tools/rust/board-manager && cargo build --release

Features

  • 21 MCP Servers (19 active, 2 legacy) - Code quality, content creation, AI assistance, 3D graphics, video editing, speech synthesis, and more
  • AI Agents - Autonomous development workflow from issue to merge
  • 4 Packages - Sleeper agent detection, economic agent simulation, tamper-responsive briefcase, CRISPR automation
  • Container-First Architecture - Maximum portability and consistency
  • Self-Hosted CI/CD - Zero-cost GitHub Actions infrastructure
  • Company Integration - Corporate proxy builds for enterprise AI APIs (Docs)

Enterprise & Corporate Setup

For enterprise environments requiring custom certificates, customize automation/corporate-proxy/shared/scripts/install-corporate-certs.sh. This script runs during Docker builds for all containers. See the customization guide for details.

Project Structure

.
├── .github/workflows/        # GitHub Actions workflows
├── docker/                   # Docker configurations
├── packages/                 # Installable packages
│   ├── sleeper_agents/       # AI backdoor detection framework (Python + Rust)
│   ├── economic_agents/      # Autonomous economic agents (Rust)
│   ├── tamper_briefcase/     # Tamper-responsive briefcase system (Rust)
│   └── bioforge/             # Agent-driven CRISPR automation platform (Rust)
├── tools/
│   ├── mcp/                  # 21 MCP servers + shared cores (see MCP Servers section)
│   ├── rust/                 # Rust CLI tools
│   │   ├── github-agents-cli/    # Issue/PR monitoring, refinement, analysis
│   │   ├── board-manager/        # GitHub Projects board operations
│   │   ├── git-guard/            # Git wrapper requiring sudo for dangerous ops
│   │   ├── gh-validator/         # Secret masking for GitHub CLI
│   │   ├── pr-monitor/           # PR feedback monitoring
│   │   ├── markdown-link-checker/ # Fast link validation for CI/CD
│   │   ├── code-parser/          # Parse code blocks from AI responses
│   │   ├── code-review-processor/ # Process AI code review output
│   │   ├── automation-cli/       # CI stage runner and automation commands
│   │   └── wrapper-common/       # Shared library for git/gh wrappers
│   └── cli/                  # Agent runners and utilities
├── automation/               # CI/CD and automation scripts
├── tests/                    # Test files
├── docs/                     # Documentation
└── config/                   # Configuration files

MCP Servers

Available Servers

  1. Code Quality - Formatting, linting, auto-formatting
  2. Content Creation - Manim animations, LaTeX, TikZ diagrams
  3. Gaea2 - Terrain generation (Documentation)
  4. Blender - 3D content creation, rendering, physics simulation (Documentation)
  5. OpenCode - Code generation via OpenRouter
  6. Crush - Code generation via OpenRouter
  7. Meme Generator - Create memes with templates
  8. ElevenLabs Speech - Advanced TTS with v3 model, 50+ audio tags, 74 languages (Documentation)
  9. Video Editor - AI-powered video editing with transcription and scene detection (Documentation)
  10. Virtual Character - AI agent embodiment in virtual worlds (VRChat, Blender, Unity) (Documentation)
  11. GitHub Board - GitHub Projects v2 board management, work claiming, agent coordination (Documentation)
  12. AI Toolkit - LoRA training interface (remote: 192.168.0.222:8020)
  13. ComfyUI - Image generation interface (remote: 192.168.0.222:8013)
  14. Memory Explorer - Process memory exploration for agent integration with legacy software (Rust)
  15. AgentCore Memory - Multi-provider AI memory (AWS AgentCore or ChromaDB) (Documentation)
  16. Reaction Search - Semantic search for anime reaction images (Rust)
  17. Desktop Control - Cross-platform desktop automation for Linux and Windows (Documentation)
  18. Sprite Sheet - Programmatic pixel art and sprite sheet creation (Documentation)
  19. BioForge - Lab-automation front end for the BioForge package, simulated hardware (Rust) (Documentation)

Legacy / not allowed (code kept, must not be enabled): Gemini (mcp_gemini), Codex (mcp_codex). See Legacy agents.

Usage Modes

  • STDIO Mode (local MCPs): Configured in .mcp.json, auto-started by Claude
  • HTTP Mode (remote MCPs): Run the MCP using docker compose on the remote node.

See MCP Architecture Documentation and STDIO vs HTTP Modes for details.

Tool Reference

For complete tool listings, see MCP Tools Reference

Configuration

Environment Variables

See .env.example for all available options.

Key Configuration Files

  • .mcp.json - MCP server configuration for Claude Code
  • docker-compose.yml - Container services configuration
  • CLAUDE.md - Project-specific Claude Code instructions (root directory)
  • AGENTS.md - Universal AI agent configuration and guidelines (root directory)
  • review-profiles.yaml - PR review profiles (Claude security/quality, OpenRouter general)
  • docs/agents/project-context.md - Supplementary context for AI reviewers

Setup Guides

Development Workflow

Container-First Development

All Python operations run in Docker containers:

bash
# Run CI operations via automation-cli
automation-cli ci run format             # Check formatting
automation-cli ci run lint-basic         # Basic linting
automation-cli ci run test               # Run tests
automation-cli ci run full               # Full CI pipeline

# Run specific tests
docker compose run --rm python-ci pytest tests/test_basic.py -v

GitHub Actions

  • Pull Request Validation - Automatic AI review via Claude (security + quality) and OpenRouter
  • Continuous Integration - Full CI pipeline
  • Code Quality - Multi-stage linting (containerized)
  • Automated Testing - Unit and integration tests
  • Security Scanning - Bandit plus Safety or pip-audit

All workflows run on self-hosted runners for zero-cost operation.

Documentation

Core Documentation

Quick References

Integration Guides

Setup & Configuration

License

This project is released under the Unlicense (public domain dedication).

For jurisdictions that do not recognize public domain: As a fallback, this project is also available under the MIT License.

Disclaimer

This repository and all associated documentation, code, research papers, and tools are provided as-is with no warranty of any kind. The maintainer makes no representations regarding the suitability, legality, or safety of any component for any purpose. Users assume all responsibility for their use of this material.

The maintainer is not responsible for any use or misuse of the contents of this repository. No advisory, consulting, support, or guidance relationship is created by the publication of this code. The maintainer expressly disclaims any obligation to respond to inquiries, feature requests, bug reports, or other communications from any party.

Portions of this repository contain dual-use security research and tooling. Publication of this material is for defensive research, education, and policy analysis purposes. The maintainer does not endorse, encourage, or facilitate any unlawful use.

Dùng MCP Template Repo với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Template Repo, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Template Repo làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Template Repo.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "template-repo": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Template Repo, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Template Repo.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Template Repo giúp tôi làm việc này không?
Template Repo
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Template Repo.

Câu hỏi thường gặp

Máy chủ MCP Template Repo dùng để làm gì?

Template Repo là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Template Repo với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Template Repo với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Template Repo với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Template Repo, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Template Repo với TypingMind?

Template Repo hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Template Repo cung cấp những công cụ nào trong TypingMind?

Template Repo cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Template Repo không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Template Repo yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇