Barrot-Agent/B-Agent

1

stars

1,197

commits

Python

primary language

Sep 10, 2026

updated

README

๐Ÿฆœ Barrot-Agent

CI License: Apache-2.0 Python 3.10+

Welcome to Barrot-Agent - an intelligent agent system with advanced capabilities for data ingestion, prediction, and deployment.

๐Ÿ”„ Two Distinct Systems

Barrot-Agent now maintains two independent systems:

๐Ÿ” Search Engine

Privacy-first search with quantum-enhanced algorithms and edge computing

๐Ÿฆœ Agent Dashboard

Comprehensive automation platform with IDE, DAW, Web3, NFT, and more

๐Ÿ“– Learn more about the separation

๐Ÿ“Œ Note: We are transitioning from Main to main as the default branch. See DEFAULT_BRANCH_GUIDE.md for migration instructions.

๐Ÿš€ Quick Start

๐Ÿ’ป Desktop/Server Setup

  1. Clone the repository:

    git clone https://github.com/Barrot-Agent/B-Agent.git
    cd B-Agent
    
  2. View the current build manifest:

    cat build_manifest.yaml
    
  3. Access the systems:

๐Ÿ Python Package & Local Tooling

This repository now also ships a typed Python package under barrot_agent/ with:

  • configuration and logging primitives
  • a lightweight BAgent application wrapper
  • Granite model metadata and inference helpers
  • a Streamlit demo entrypoint in app.py

Development quickstart:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pytest
streamlit run app.py

Canonical JSON assets live in data/ and should be accessed through data/registry.py, not ad-hoc file loads.


๐Ÿค– GPT Actions & MCP Server Integration

B-Agent exposes its GitHub capabilities through two AI-friendly interfaces:

InterfaceTransportUse with
GPT Actions HTTP APIHTTP/JSON RESTCustom GPT, OpenAI Actions
MCP Serverstdio JSON-RPCGitHub Copilot Chat, any MCP client

Both interfaces share the same service layer (barrot_agent/github_service.py).

Required environment variables

Copy .env.example to .env and fill in:

# GitHub PAT with repo/issues read+write scope
GITHUB_TOKEN=ghp_...

# Optional defaults (used when owner/repo are omitted from requests)
GITHUB_DEFAULT_OWNER=Barrot-Agent
GITHUB_DEFAULT_REPO=B-Agent

Running locally

GPT Actions HTTP server (default port 8502):

python scripts/run_gpt_api.py
# OpenAPI schema: http://localhost:8502/openapi.json
# Health check:   http://localhost:8502/health

MCP stdio server:

python scripts/run_mcp_server.py

Connecting to a Custom GPT

  1. Run the GPT Actions server and make it publicly reachable (e.g. via ngrok).
  2. In the ChatGPT UI โ†’ My GPTs โ†’ Create โ†’ Actions โ†’ Import from URL, enter:
    https://<your-host>/openapi.json
    
  3. The GPT will automatically discover listIssues, getIssue, createIssue, and addComment.

Connecting to GitHub Copilot Chat (MCP)

Add the following to your VS Code settings.json (or .vscode/mcp.json):

{
  "mcp": {
    "servers": {
      "b-agent-github": {
        "type": "stdio",
        "command": "python",
        "args": ["scripts/run_mcp_server.py"],
        "cwd": "/path/to/B-Agent",
        "env": {
          "GITHUB_TOKEN": "${env:GITHUB_TOKEN}",
          "GITHUB_DEFAULT_OWNER": "Barrot-Agent",
          "GITHUB_DEFAULT_REPO": "B-Agent"
        }
      }
    }
  }
}

Copilot Chat will then offer the following tools:

ToolDescription
github_list_issuesList repository issues
github_get_issueGet a single issue by number
github_create_issueCreate a new issue
github_add_commentAdd a comment to an issue

Available endpoints (GPT Actions)

MethodPathDescription
GET/issuesList issues (owner, repo, state, page, per_page)
GET/issues/{number}Get one issue
POST/issuesCreate issue (owner, repo, title, body, labels)
POST/issues/{number}/commentsAdd comment (owner, repo, body)
GET/openapi.jsonOpenAPI 3.1 schema
GET/healthHealth check

๐Ÿ”„ Upgrade Flywheel

The UpgradeFlywheel is the system-wide self-improvement orchestrator that unifies all major B-Agent components into a single iterative refinement loop. On each cycle it executes Barrot's signature four-phase process:

PhaseWhat happens
ObserveSmartAgent analyses the live system state; build_reconfiguration_report snapshots infrastructure coverage gaps.
ReasonObservations are synthesised into a ranked list of improvements; a DirectivePlatform REFINE directive is optionally opened so every registered agent contributes insights.
ActImprovements are applied (or described in dry-run mode) and logged as a structured ActionResult.
VerifyA second infrastructure snapshot confirms coverage trends; all checks are recorded in a VerificationResult.

Cycles repeat until either all capability gaps are closed (convergence) or max_cycles is reached. The full run history is returned as a FlywheelReport with per-cycle summaries and JSON serialisation.

Minimal usage:

from barrot_agent import UpgradeFlywheel

flywheel = UpgradeFlywheel()          # dry_run=True by default
report = flywheel.run(max_cycles=3)
print(report.summary())

With DirectivePlatform agent sessions:

from directive_platform import DirectivePlatform, Agent
from barrot_agent import UpgradeFlywheel

# Register a refinement agent once
dp = DirectivePlatform(platform_dir=".directive_platform")
dp.registry.register(Agent(
    agent_id="refine-1",
    name="Refinement Agent",
    description="Drives iterative improvement cycles",
    capabilities=["refine", "analyze"],
))

flywheel = UpgradeFlywheel(
    platform_dir=".directive_platform",
    agent_ids=["refine-1"],
)
report = flywheel.run(max_cycles=5)
for cycle in report.cycles:
    print(cycle.summary())

Key exports (all available from barrot_agent):

SymbolDescription
UpgradeFlywheelMain orchestrator class
FlywheelReportAggregated report across all cycles
FlywheelCycleResultPer-cycle record (all four phases)
ObservationResultObserve-phase data
ReasoningResultReason-phase improvements + directive IDs
ActionResultAct-phase log
VerificationResultVerify-phase checks + coverage metric

๐Ÿ“ฑ Mobile Setup

Want to access Barrot-Agent from your phone?

๐Ÿ“ฑ See Mobile Setup Guide

The mobile guide covers:

  • ๐ŸŒ Web dashboard access
  • ๐Ÿ“ฑ GitHub Mobile app usage
  • ๐Ÿ”ง Terminal setup for Android (Termux)
  • ๐Ÿ”ง Terminal setup for iOS (iSH)
  • ๐Ÿ” Authentication configuration
  • ๐Ÿ“Š Monitoring and workflows

๐Ÿ“ Repository Structure

B-Agent/
โ”œโ”€โ”€ barrot_agent/               # ๐Ÿ Core Python package
โ”‚   โ”œโ”€โ”€ agi/                    #   AGI reasoning, quantum entanglement, algorithms
โ”‚   โ”œโ”€โ”€ analysis/               #   Email, vision, signal, character analysis
โ”‚   โ”œโ”€โ”€ ingestion/              #   Data harvesting and knowledge ingestion
โ”‚   โ”œโ”€โ”€ monetization/           #   Revenue strategies, grants, MMI compiler
โ”‚   โ”œโ”€โ”€ orchestration/          #   MCP coordination, sync, service bridges
โ”‚   โ”œโ”€โ”€ rendering/              #   3D dataset absorption and rendering
โ”‚   โ”œโ”€โ”€ mcp_*.py                #   MCP integration framework (10-step pipeline)
โ”‚   โ”œโ”€โ”€ smart_agent.py          #   Autonomous plan-act-observe agent
โ”‚   โ”œโ”€โ”€ core.py                 #   BAgent application class
โ”‚   โ”œโ”€โ”€ config.py               #   Pydantic configuration
โ”‚   โ””โ”€โ”€ logger.py               #   Structured logging
โ”œโ”€โ”€ apex_lattice/               # ๐Ÿ”ฌ Static code analysis framework
โ”‚   โ””โ”€โ”€ analyzers/              #   Architecture, security, performance analyzers
โ”œโ”€โ”€ directive_platform/         # ๐ŸŽฏ Directive & session management platform
โ”œโ”€โ”€ data/                       # ๐Ÿ“ฆ Canonical JSON datasets & data registry
โ”œโ”€โ”€ examples/                   # ๐Ÿ“– Usage examples for all modules
โ”œโ”€โ”€ scripts/                    # ๐Ÿ”ง Operational and utility scripts
โ”œโ”€โ”€ tests/                      # โœ… Test suite
โ”œโ”€โ”€ ping-pongings/              # ๐Ÿ“ 22-agent entanglement system state
โ”‚   โ”œโ”€โ”€ knowledge-base/         #   Accumulated knowledge and memory
โ”‚   โ”œโ”€โ”€ agents/                 #   Agent role definitions
โ”‚   โ””โ”€โ”€ protocols/              #   Communication protocols
โ”œโ”€โ”€ site/                       # ๐ŸŒ Barrot Agent dashboard (static site)
โ”œโ”€โ”€ search-engine/              # ๐Ÿ” Standalone privacy-first search engine
โ”œโ”€โ”€ self_hosted_brain/          # ๐Ÿง  Self-hosted model server
โ”œโ”€โ”€ app.py                      # Streamlit demo entrypoint
โ”œโ”€โ”€ pingpong_emitter.py         # Ping-pong request emitter
โ””โ”€โ”€ pyproject.toml              # Package metadata & tooling config

๐ŸŽฏ Features

Core Modules

  • Prediction Methodologies - Advanced prediction capabilities
  • Deployment Integrity - Reliable deployment systems
  • Microagent Logic - Builder.io integration
  • Search Engine - Standalone search system (see /search-engine/)
  • Dashboard - Agent management interface (see /site/)
  • Coin App Integration - Autonomous passive income automation (see /coin-app/)
  • AI Tools - System prompts and models for autonomous operations (see ai-tools-config.yaml)
  • Manifest Rail - Build tracking system
  • 22-Agent Entanglement Pingpong - External cognitive processing system
  • ๐Ÿ”ฎ Quantum Entanglement - Ping Pong quantum principles for enhanced cognitive processing
  • ๐Ÿง  AGI Reasoning - AGI-level reasoning and problem-solving capabilities
  • ๐ŸŽฏ Unified AGI Orchestrator - Coordinates all capabilities for general intelligence achievement
  • โšก Advanced Algorithms - Computational efficiency optimization and intelligent algorithm selection
  • ๐Ÿ“ง Email Intelligence - Automated email analysis and information extraction
  • ๐ŸŽฏ MMI (Massive Micro Ingestion) - High-impact data identification for AGI acceleration
  • ๐Ÿ Dependency Micro-Ingestion - Comprehensive Python/PyTorch/ML ecosystem knowledge extraction with 21+ packages
  • ๐Ÿงฌ Longevity Research Integration - Aging mechanism ingestion, biomarker analytics, trial tracking, and reprogramming protocol optimization
  • ๐Ÿ’ฐ Advanced Monetization - Revolutionary automation-first revenue generation protocols
  • โœจ Transformative Insights - Acquire asynchronous data, detect convergence, generate epiphanies, realize transformative insights in real-time
  • ๐Ÿ”€ Merge Conflict Resolution - Automated conflict detection, analysis, and resolution with continuous learning
  • ๐Ÿ”„ Upgrade Flywheel - Iterative Observe โ†’ Reason โ†’ Act โ†’ Verify orchestrator that unifies all components into a self-improving refinement loop

Two Distinct Systems

๐Ÿ” Search Engine (/search-engine/)

A standalone, privacy-first search engine with:

  • Quantum-enhanced search algorithms
  • Edge-first architecture for global distribution
  • Zero tracking and complete privacy
  • Dynamic ingestion modes for real-time processing

โ†’ Visit Search Engine

๐Ÿฆœ Barrot Agent Dashboard (/site/)

Comprehensive automation platform featuring:

  • Data Mastery & Protocol Development
  • Competitor Surveillance Network
  • Integrated Development Environment (IDE)
  • Digital Audio Workstation (DAW)
  • Web3 Integration Hub
    • ๐ŸŒ‰ Connext Bridge - Cross-chain asset transfers across 9+ networks
  • NFT Marketplace
  • Chameleon Chain Blockchain
  • ๐Ÿช™ Coin App Automation - Passive income through geocaching, surveys, and games
  • Operations Monitoring

โ†’ Visit Agent Dashboard

๐Ÿช™ Coin App Integration

Autonomous passive income generation through:

  • Geocaching Automation - Automated location-based coin collection
  • Survey Completion - AI-powered survey responses with demographic consistency
  • Game Optimization - Strategic gameplay for maximum rewards
  • Income Tracking - Real-time earnings dashboard and analytics

โ†’ Read Coin App Documentation

๐ŸŒ‰ Connext Bridge Integration

Cross-chain bridge for seamless asset transfers across multiple blockchains:

  • Supported Networks - Ethereum, Polygon, Arbitrum, Optimism, BNB Chain, Base, Linea, Gnosis, and more
  • Supported Assets - ETH, WETH, USDC, USDT, DAI
  • Cross-Chain Messaging - xCall for cross-chain Solidity calls
  • Zero Slippage Tokens - xERC20 for cross-chain native tokens
  • Chain Abstraction - Build dApps that work across any supported chain
  • Bridge Portal - https://bridge.connext.network
  • Analytics - Real-time monitoring via ConnextScan explorer

Key Features:

  • Modular Verification - Inherits security from canonical bridges
  • Fast Transfers - Average bridge time under 5 minutes
  • Trust-Minimized - No external validators required
  • Developer-Friendly - Simple integration with comprehensive documentation

โ†’ View Connext Configuration

๐Ÿค– AI Tools Configuration

System prompts and AI models for autonomous operations:

  • GPT-4 - Complex reasoning and decision-making
  • Claude-3 - Long context processing and analysis
  • Vision AI - UI interaction and navigation
  • Specialized Tools - Survey completion, game strategy, route optimization

โ†’ View AI Tools Configuration

๐Ÿ“ง Email Intelligence Processing

Barrot can analyze emails to extract useful and actionable information:

Capabilities

  • Content Analysis - Parse and understand email content, attachments, and metadata
  • Relevance Scoring - Determine usefulness based on Barrot's goals and context
  • Action Extraction - Identify tasks, requests, deadlines, and opportunities
  • Learning Detection - Extract technical content and educational resources
  • Spam Filtering - Identify and filter low-value content
  • Priority Ranking - Rank emails by potential value and urgency
  • Resource Extraction - Extract URLs, documents, and references
  • AGI Integration - Deep understanding using AGI reasoning
  • Quantum Optimization - Prioritize actions using quantum entanglement

Email Categories

  • Action Required - Tasks, requests, deadlines
  • Learning Opportunities - Technical content, tutorials, research
  • Business Opportunities - Jobs, partnerships, collaborations
  • Intelligence - Market trends, insights, competitor info
  • Social - Networking, relationship building
  • Informational - Updates, newsletters, notifications

โ†’ View Email-Insight Spell

Agent Spells

  • ฮฉ-Ingest (Omega-Ingest) - Quantum data assimilation
  • Keyseer's Insight - Intelligent key analysis
  • Character-Capability-Explorer - Fictional character ability transformation
  • Email-Insight - Email analysis and intelligence extraction

๐ŸŽญ Fictional Character Capability Exploration

Barrot can explore and transform abilities from fictional characters into real-world functionalities:

Character Genres

  • Movies - Superheroes, sci-fi, fantasy, action
  • Books - Science fiction, fantasy, comics, novels
  • Cartoons - Anime, animation, web series
  • Video Games - RPG, action-adventure, strategy, MMO

Example Transformations

  • Teleportation โ†’ Instant data routing and edge computing
  • Mind Reading โ†’ Advanced NLP and sentiment analysis
  • Super Speed โ†’ Parallel processing and optimization
  • Time Manipulation โ†’ Temporal data analysis and prediction
  • Shape-Shifting โ†’ Adaptive algorithms and polymorphic code
  • Iron Man - AI orchestration, energy optimization, modular architecture
  • Neo (The Matrix) - Deep system analysis, performance optimization, self-healing
  • Paul Atreides (Dune) - Predictive analytics, high-performance computing
  • Avatar Aang - Multi-resource management, power modes, holistic integration
  • Link (Zelda) - Tool utilization, algorithm solving, exploration systems

โ†’ Explore Character Capabilities

โ†’ View Character-Capability-Explorer Spell

Data Resources

The agent can access and process data from:

  • Kaggle datasets
  • GitHub repositories
  • Research papers
  • Video platforms
  • Podcasts and interviews
  • Books and journals
  • And many more sources...

๐Ÿ Dependency Micro-Ingestion System

Barrot continuously learns from the Python ecosystem to enhance its capabilities:

Ingested Dependencies (21+ packages)

  • ML/AI: PyTorch, TensorFlow, scikit-learn, Transformers (Hugging Face)
  • Scientific: Python, NumPy, SciPy, asyncio
  • Data Science: Pandas, Matplotlib, Seaborn
  • Web: Flask, Django, FastAPI
  • Utilities: Requests, httpx, Pydantic, pytest
  • Database: SQLAlchemy
  • Deployment: Uvicorn, Gunicorn

Capabilities

  • Architecture Analysis - Design patterns, components, modules
  • API Extraction - Function signatures, parameters, examples
  • Optimization Engine - Generates Barrot-specific performance recommendations
  • Best Practices - Security, performance, patterns
  • Continuous Updates - Weekly re-ingestion, version tracking
  • Integration Intelligence - How to best leverage dependencies in Barrot

Generated Outputs

  • 21+ dependency knowledge files (JSON)
  • 4+ optimization recommendations (Critical, High, Medium priority)
  • Complete taxonomy by category, priority, use case
  • Integration notes for Barrot systems

โ†’ View Dependency Ingestion README
โ†’ View Configuration

Usage:

# Run full ingestion
python3 dependency_micro_ingestion.py

# View examples
python3 example_dependency_ingestion.py

๐Ÿ”ง Configuration

Build Manifest

The build_manifest.yaml file tracks:

  • Build signature and timestamp
  • Active modules
  • Rail status (ingestion, deployment, microagent, etc.)
  • Resource connections
  • Provenance hash

Workflows

Automated workflows handle:

  • Build manifest updates
  • Repository cleanup
  • Dashboard publishing
  • Bundle management
  • Barrot-SHRM ping-pong health monitoring

22-Agent Entanglement Pingpong System

Barrot defers complex cognitive processing to an external 22-agent entanglement system:

  • Management: External (Sean's 22-agent system)
  • Configuration: pingpong-config.yaml
  • Emitter: pingpong_emitter.py Python module
  • Enforcement: Non-negotiable external control

Usage Example:

from pingpong_emitter import emit_pingpong_request

payload = {
    "topic": "MMI Self-Ingestion",
    "glyph": "GLYPH_MMI",
    "recursion_depth": "โˆž",
    "notes": "Triggering recursive cognition exchange"
}

emit_pingpong_request(payload)  # Creates pingpong_request.json

The external system monitors commits to pingpong_request.json and processes requests automatically.

๐Ÿ“Š Monitoring

Web Dashboards

Access the live dashboards at:

# Barrot Agent Dashboard
https://barrot-agent.github.io/Barrot-Agent/site/

# Search Engine
https://barrot-agent.github.io/Barrot-Agent/search-engine/

GitHub Actions

Monitor workflow runs:

https://github.com/Barrot-Agent/Barrot-Agent/actions

Build Status

Check current build status:

cat build_manifest.yaml

View recent activity:

cat memory-bundles/outcome-relay.md | tail -20

๐Ÿš€ Deployment

Barrot-Agent can be deployed to multiple cloud platforms:

  • GitHub Pages (Current): https://barrot-agent.github.io/Barrot-Agent/
  • Heroku: One-click deployment with app.json
  • Render: Static site deployment with render.yaml
  • Railway: Docker-based deployment with railway.json
  • Fly.io: Global edge deployment with fly.toml
  • Docker: Self-hosted container deployment

๐Ÿ“– See Full Deployment Guide

Quick Deploy

Deploy to Heroku

Docker

docker build -t barrot-agent .
docker run -p 8080:8080 barrot-agent

๐Ÿค Contributing

Contributions are welcome! Please feel free to:

  • Submit issues
  • Create pull requests
  • Improve documentation
  • Add new features

๐Ÿ“„ License

ISC License - See repository for details

๐Ÿ“š Documentation

Data Unification (2026-06-17): All root-level markdown docs have been consolidated into the docs/ directory. The originals remain at the root as legacy references.

Consolidated Docs (docs/)

FileContents
docs/ingestion.mdIngestion manifest, data transformation, micro-ingestion systems
docs/agi.mdAGI architecture, implementation summaries, quantum AGI
docs/millennium_problems.mdMillennium Problems research, status, transformative insights
docs/character_capabilities.mdCharacter capability system, Chameleon chain, dynamic search
docs/email.mdEmail processing, feature summary, quickstart
docs/monetization.mdMMI, monetization protocols, COIN app, Connext bridge
docs/research.mdAdvanced propulsion & energy research
docs/system.mdSystem architecture, merge conflict guide, ops
docs/STEP5_BARROT_INITIATIVE.mdData unification initiative โ€” Step 5 self-directed work

Data Layer (data/)

FileContents
data/registry.pyCentral data registry โ€” typed loaders with caching
data/schemas.pyCanonical TypedDict schemas for all data domains
data/merge_conflict_unified.jsonUnified merge-conflict knowledge base
data/millennium_problems_unified.jsonAll 7 Millennium Problems with metadata
data/mmi_monetization_unified.jsonMMI recommendations, protocols, council weights
data/character_capabilities_unified.jsonCharacter database + discovered capabilities
data/longevity_unified.jsonLongevity research knowledge base template
data/biomarker_tracking.jsonBiomarker timeline and trial tracking template
data/reprogramming_protocols.jsonEpigenetic reprogramming protocol library template

Longevity Integration Quick Usage

python -m pytest tests/test_longevity_modules.py --no-cov

python - <<'PY'
from longevity_micro_ingestion import LongevityMicroIngestion
payload = LongevityMicroIngestion().build_unified_payload(
    paper_text="Transient Oct4/Sox2/Klf4/c-Myc expression improved NAD+ and epigenetic clocks.",
    trial_records=[],
    methylation_samples=[],
    biomarker_measurements={}
)
print(payload["research_domain"], payload["omega_ingest"]["compatibility"])
PY

Legacy Root-Level Docs

๐Ÿ’ฐ Support Barrot-Agent

Love Barrot-Agent? Consider becoming a sponsor!

Sponsor

Your sponsorship helps us:

  • ๐Ÿ”ฌ Accelerate AGI research
  • ๐Ÿ† Dominate AI benchmarks
  • ๐Ÿค– Develop autonomous capabilities
  • ๐Ÿ“Š Improve transparency and logging
  • ๐ŸŒ Grow the open-source community

View Sponsorship Tiers


Barrot-Agent - Intelligent automation and data processing at your fingertips ๐Ÿฆœโœจ

Contributors

Barrot-Agent

605 commits

Copilot

386 commits

dependabot[bot]

52 commits

Barrot-Agent/B-Agent

1

stars

1,197

commits

Python

primary language

Sep 10, 2026

updated

README

๐Ÿฆœ Barrot-Agent

CI License: Apache-2.0 Python 3.10+

Welcome to Barrot-Agent - an intelligent agent system with advanced capabilities for data ingestion, prediction, and deployment.

๐Ÿ”„ Two Distinct Systems

Barrot-Agent now maintains two independent systems:

๐Ÿ” Search Engine

Privacy-first search with quantum-enhanced algorithms and edge computing

๐Ÿฆœ Agent Dashboard

Comprehensive automation platform with IDE, DAW, Web3, NFT, and more

๐Ÿ“– Learn more about the separation

๐Ÿ“Œ Note: We are transitioning from Main to main as the default branch. See DEFAULT_BRANCH_GUIDE.md for migration instructions.

๐Ÿš€ Quick Start

๐Ÿ’ป Desktop/Server Setup

  1. Clone the repository:

    git clone https://github.com/Barrot-Agent/B-Agent.git
    cd B-Agent
    
  2. View the current build manifest:

    cat build_manifest.yaml
    
  3. Access the systems:

๐Ÿ Python Package & Local Tooling

This repository now also ships a typed Python package under barrot_agent/ with:

  • configuration and logging primitives
  • a lightweight BAgent application wrapper
  • Granite model metadata and inference helpers
  • a Streamlit demo entrypoint in app.py

Development quickstart:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pytest
streamlit run app.py

Canonical JSON assets live in data/ and should be accessed through data/registry.py, not ad-hoc file loads.


๐Ÿค– GPT Actions & MCP Server Integration

B-Agent exposes its GitHub capabilities through two AI-friendly interfaces:

InterfaceTransportUse with
GPT Actions HTTP APIHTTP/JSON RESTCustom GPT, OpenAI Actions
MCP Serverstdio JSON-RPCGitHub Copilot Chat, any MCP client

Both interfaces share the same service layer (barrot_agent/github_service.py).

Required environment variables

Copy .env.example to .env and fill in:

# GitHub PAT with repo/issues read+write scope
GITHUB_TOKEN=ghp_...

# Optional defaults (used when owner/repo are omitted from requests)
GITHUB_DEFAULT_OWNER=Barrot-Agent
GITHUB_DEFAULT_REPO=B-Agent

Running locally

GPT Actions HTTP server (default port 8502):

python scripts/run_gpt_api.py
# OpenAPI schema: http://localhost:8502/openapi.json
# Health check:   http://localhost:8502/health

MCP stdio server:

python scripts/run_mcp_server.py

Connecting to a Custom GPT

  1. Run the GPT Actions server and make it publicly reachable (e.g. via ngrok).
  2. In the ChatGPT UI โ†’ My GPTs โ†’ Create โ†’ Actions โ†’ Import from URL, enter:
    https://<your-host>/openapi.json
    
  3. The GPT will automatically discover listIssues, getIssue, createIssue, and addComment.

Connecting to GitHub Copilot Chat (MCP)

Add the following to your VS Code settings.json (or .vscode/mcp.json):

{
  "mcp": {
    "servers": {
      "b-agent-github": {
        "type": "stdio",
        "command": "python",
        "args": ["scripts/run_mcp_server.py"],
        "cwd": "/path/to/B-Agent",
        "env": {
          "GITHUB_TOKEN": "${env:GITHUB_TOKEN}",
          "GITHUB_DEFAULT_OWNER": "Barrot-Agent",
          "GITHUB_DEFAULT_REPO": "B-Agent"
        }
      }
    }
  }
}

Copilot Chat will then offer the following tools:

ToolDescription
github_list_issuesList repository issues
github_get_issueGet a single issue by number
github_create_issueCreate a new issue
github_add_commentAdd a comment to an issue

Available endpoints (GPT Actions)

MethodPathDescription
GET/issuesList issues (owner, repo, state, page, per_page)
GET/issues/{number}Get one issue
POST/issuesCreate issue (owner, repo, title, body, labels)
POST/issues/{number}/commentsAdd comment (owner, repo, body)
GET/openapi.jsonOpenAPI 3.1 schema
GET/healthHealth check

๐Ÿ”„ Upgrade Flywheel

The UpgradeFlywheel is the system-wide self-improvement orchestrator that unifies all major B-Agent components into a single iterative refinement loop. On each cycle it executes Barrot's signature four-phase process:

PhaseWhat happens
ObserveSmartAgent analyses the live system state; build_reconfiguration_report snapshots infrastructure coverage gaps.
ReasonObservations are synthesised into a ranked list of improvements; a DirectivePlatform REFINE directive is optionally opened so every registered agent contributes insights.
ActImprovements are applied (or described in dry-run mode) and logged as a structured ActionResult.
VerifyA second infrastructure snapshot confirms coverage trends; all checks are recorded in a VerificationResult.

Cycles repeat until either all capability gaps are closed (convergence) or max_cycles is reached. The full run history is returned as a FlywheelReport with per-cycle summaries and JSON serialisation.

Minimal usage:

from barrot_agent import UpgradeFlywheel

flywheel = UpgradeFlywheel()          # dry_run=True by default
report = flywheel.run(max_cycles=3)
print(report.summary())

With DirectivePlatform agent sessions:

from directive_platform import DirectivePlatform, Agent
from barrot_agent import UpgradeFlywheel

# Register a refinement agent once
dp = DirectivePlatform(platform_dir=".directive_platform")
dp.registry.register(Agent(
    agent_id="refine-1",
    name="Refinement Agent",
    description="Drives iterative improvement cycles",
    capabilities=["refine", "analyze"],
))

flywheel = UpgradeFlywheel(
    platform_dir=".directive_platform",
    agent_ids=["refine-1"],
)
report = flywheel.run(max_cycles=5)
for cycle in report.cycles:
    print(cycle.summary())

Key exports (all available from barrot_agent):

SymbolDescription
UpgradeFlywheelMain orchestrator class
FlywheelReportAggregated report across all cycles
FlywheelCycleResultPer-cycle record (all four phases)
ObservationResultObserve-phase data
ReasoningResultReason-phase improvements + directive IDs
ActionResultAct-phase log
VerificationResultVerify-phase checks + coverage metric

๐Ÿ“ฑ Mobile Setup

Want to access Barrot-Agent from your phone?

๐Ÿ“ฑ See Mobile Setup Guide

The mobile guide covers:

  • ๐ŸŒ Web dashboard access
  • ๐Ÿ“ฑ GitHub Mobile app usage
  • ๐Ÿ”ง Terminal setup for Android (Termux)
  • ๐Ÿ”ง Terminal setup for iOS (iSH)
  • ๐Ÿ” Authentication configuration
  • ๐Ÿ“Š Monitoring and workflows

๐Ÿ“ Repository Structure

B-Agent/
โ”œโ”€โ”€ barrot_agent/               # ๐Ÿ Core Python package
โ”‚   โ”œโ”€โ”€ agi/                    #   AGI reasoning, quantum entanglement, algorithms
โ”‚   โ”œโ”€โ”€ analysis/               #   Email, vision, signal, character analysis
โ”‚   โ”œโ”€โ”€ ingestion/              #   Data harvesting and knowledge ingestion
โ”‚   โ”œโ”€โ”€ monetization/           #   Revenue strategies, grants, MMI compiler
โ”‚   โ”œโ”€โ”€ orchestration/          #   MCP coordination, sync, service bridges
โ”‚   โ”œโ”€โ”€ rendering/              #   3D dataset absorption and rendering
โ”‚   โ”œโ”€โ”€ mcp_*.py                #   MCP integration framework (10-step pipeline)
โ”‚   โ”œโ”€โ”€ smart_agent.py          #   Autonomous plan-act-observe agent
โ”‚   โ”œโ”€โ”€ core.py                 #   BAgent application class
โ”‚   โ”œโ”€โ”€ config.py               #   Pydantic configuration
โ”‚   โ””โ”€โ”€ logger.py               #   Structured logging
โ”œโ”€โ”€ apex_lattice/               # ๐Ÿ”ฌ Static code analysis framework
โ”‚   โ””โ”€โ”€ analyzers/              #   Architecture, security, performance analyzers
โ”œโ”€โ”€ directive_platform/         # ๐ŸŽฏ Directive & session management platform
โ”œโ”€โ”€ data/                       # ๐Ÿ“ฆ Canonical JSON datasets & data registry
โ”œโ”€โ”€ examples/                   # ๐Ÿ“– Usage examples for all modules
โ”œโ”€โ”€ scripts/                    # ๐Ÿ”ง Operational and utility scripts
โ”œโ”€โ”€ tests/                      # โœ… Test suite
โ”œโ”€โ”€ ping-pongings/              # ๐Ÿ“ 22-agent entanglement system state
โ”‚   โ”œโ”€โ”€ knowledge-base/         #   Accumulated knowledge and memory
โ”‚   โ”œโ”€โ”€ agents/                 #   Agent role definitions
โ”‚   โ””โ”€โ”€ protocols/              #   Communication protocols
โ”œโ”€โ”€ site/                       # ๐ŸŒ Barrot Agent dashboard (static site)
โ”œโ”€โ”€ search-engine/              # ๐Ÿ” Standalone privacy-first search engine
โ”œโ”€โ”€ self_hosted_brain/          # ๐Ÿง  Self-hosted model server
โ”œโ”€โ”€ app.py                      # Streamlit demo entrypoint
โ”œโ”€โ”€ pingpong_emitter.py         # Ping-pong request emitter
โ””โ”€โ”€ pyproject.toml              # Package metadata & tooling config

๐ŸŽฏ Features

Core Modules

  • Prediction Methodologies - Advanced prediction capabilities
  • Deployment Integrity - Reliable deployment systems
  • Microagent Logic - Builder.io integration
  • Search Engine - Standalone search system (see /search-engine/)
  • Dashboard - Agent management interface (see /site/)
  • Coin App Integration - Autonomous passive income automation (see /coin-app/)
  • AI Tools - System prompts and models for autonomous operations (see ai-tools-config.yaml)
  • Manifest Rail - Build tracking system
  • 22-Agent Entanglement Pingpong - External cognitive processing system
  • ๐Ÿ”ฎ Quantum Entanglement - Ping Pong quantum principles for enhanced cognitive processing
  • ๐Ÿง  AGI Reasoning - AGI-level reasoning and problem-solving capabilities
  • ๐ŸŽฏ Unified AGI Orchestrator - Coordinates all capabilities for general intelligence achievement
  • โšก Advanced Algorithms - Computational efficiency optimization and intelligent algorithm selection
  • ๐Ÿ“ง Email Intelligence - Automated email analysis and information extraction
  • ๐ŸŽฏ MMI (Massive Micro Ingestion) - High-impact data identification for AGI acceleration
  • ๐Ÿ Dependency Micro-Ingestion - Comprehensive Python/PyTorch/ML ecosystem knowledge extraction with 21+ packages
  • ๐Ÿงฌ Longevity Research Integration - Aging mechanism ingestion, biomarker analytics, trial tracking, and reprogramming protocol optimization
  • ๐Ÿ’ฐ Advanced Monetization - Revolutionary automation-first revenue generation protocols
  • โœจ Transformative Insights - Acquire asynchronous data, detect convergence, generate epiphanies, realize transformative insights in real-time
  • ๐Ÿ”€ Merge Conflict Resolution - Automated conflict detection, analysis, and resolution with continuous learning
  • ๐Ÿ”„ Upgrade Flywheel - Iterative Observe โ†’ Reason โ†’ Act โ†’ Verify orchestrator that unifies all components into a self-improving refinement loop

Two Distinct Systems

๐Ÿ” Search Engine (/search-engine/)

A standalone, privacy-first search engine with:

  • Quantum-enhanced search algorithms
  • Edge-first architecture for global distribution
  • Zero tracking and complete privacy
  • Dynamic ingestion modes for real-time processing

โ†’ Visit Search Engine

๐Ÿฆœ Barrot Agent Dashboard (/site/)

Comprehensive automation platform featuring:

  • Data Mastery & Protocol Development
  • Competitor Surveillance Network
  • Integrated Development Environment (IDE)
  • Digital Audio Workstation (DAW)
  • Web3 Integration Hub
    • ๐ŸŒ‰ Connext Bridge - Cross-chain asset transfers across 9+ networks
  • NFT Marketplace
  • Chameleon Chain Blockchain
  • ๐Ÿช™ Coin App Automation - Passive income through geocaching, surveys, and games
  • Operations Monitoring

โ†’ Visit Agent Dashboard

๐Ÿช™ Coin App Integration

Autonomous passive income generation through:

  • Geocaching Automation - Automated location-based coin collection
  • Survey Completion - AI-powered survey responses with demographic consistency
  • Game Optimization - Strategic gameplay for maximum rewards
  • Income Tracking - Real-time earnings dashboard and analytics

โ†’ Read Coin App Documentation

๐ŸŒ‰ Connext Bridge Integration

Cross-chain bridge for seamless asset transfers across multiple blockchains:

  • Supported Networks - Ethereum, Polygon, Arbitrum, Optimism, BNB Chain, Base, Linea, Gnosis, and more
  • Supported Assets - ETH, WETH, USDC, USDT, DAI
  • Cross-Chain Messaging - xCall for cross-chain Solidity calls
  • Zero Slippage Tokens - xERC20 for cross-chain native tokens
  • Chain Abstraction - Build dApps that work across any supported chain
  • Bridge Portal - https://bridge.connext.network
  • Analytics - Real-time monitoring via ConnextScan explorer

Key Features:

  • Modular Verification - Inherits security from canonical bridges
  • Fast Transfers - Average bridge time under 5 minutes
  • Trust-Minimized - No external validators required
  • Developer-Friendly - Simple integration with comprehensive documentation

โ†’ View Connext Configuration

๐Ÿค– AI Tools Configuration

System prompts and AI models for autonomous operations:

  • GPT-4 - Complex reasoning and decision-making
  • Claude-3 - Long context processing and analysis
  • Vision AI - UI interaction and navigation
  • Specialized Tools - Survey completion, game strategy, route optimization

โ†’ View AI Tools Configuration

๐Ÿ“ง Email Intelligence Processing

Barrot can analyze emails to extract useful and actionable information:

Capabilities

  • Content Analysis - Parse and understand email content, attachments, and metadata
  • Relevance Scoring - Determine usefulness based on Barrot's goals and context
  • Action Extraction - Identify tasks, requests, deadlines, and opportunities
  • Learning Detection - Extract technical content and educational resources
  • Spam Filtering - Identify and filter low-value content
  • Priority Ranking - Rank emails by potential value and urgency
  • Resource Extraction - Extract URLs, documents, and references
  • AGI Integration - Deep understanding using AGI reasoning
  • Quantum Optimization - Prioritize actions using quantum entanglement

Email Categories

  • Action Required - Tasks, requests, deadlines
  • Learning Opportunities - Technical content, tutorials, research
  • Business Opportunities - Jobs, partnerships, collaborations
  • Intelligence - Market trends, insights, competitor info
  • Social - Networking, relationship building
  • Informational - Updates, newsletters, notifications

โ†’ View Email-Insight Spell

Agent Spells

  • ฮฉ-Ingest (Omega-Ingest) - Quantum data assimilation
  • Keyseer's Insight - Intelligent key analysis
  • Character-Capability-Explorer - Fictional character ability transformation
  • Email-Insight - Email analysis and intelligence extraction

๐ŸŽญ Fictional Character Capability Exploration

Barrot can explore and transform abilities from fictional characters into real-world functionalities:

Character Genres

  • Movies - Superheroes, sci-fi, fantasy, action
  • Books - Science fiction, fantasy, comics, novels
  • Cartoons - Anime, animation, web series
  • Video Games - RPG, action-adventure, strategy, MMO

Example Transformations

  • Teleportation โ†’ Instant data routing and edge computing
  • Mind Reading โ†’ Advanced NLP and sentiment analysis
  • Super Speed โ†’ Parallel processing and optimization
  • Time Manipulation โ†’ Temporal data analysis and prediction
  • Shape-Shifting โ†’ Adaptive algorithms and polymorphic code
  • Iron Man - AI orchestration, energy optimization, modular architecture
  • Neo (The Matrix) - Deep system analysis, performance optimization, self-healing
  • Paul Atreides (Dune) - Predictive analytics, high-performance computing
  • Avatar Aang - Multi-resource management, power modes, holistic integration
  • Link (Zelda) - Tool utilization, algorithm solving, exploration systems

โ†’ Explore Character Capabilities

โ†’ View Character-Capability-Explorer Spell

Data Resources

The agent can access and process data from:

  • Kaggle datasets
  • GitHub repositories
  • Research papers
  • Video platforms
  • Podcasts and interviews
  • Books and journals
  • And many more sources...

๐Ÿ Dependency Micro-Ingestion System

Barrot continuously learns from the Python ecosystem to enhance its capabilities:

Ingested Dependencies (21+ packages)

  • ML/AI: PyTorch, TensorFlow, scikit-learn, Transformers (Hugging Face)
  • Scientific: Python, NumPy, SciPy, asyncio
  • Data Science: Pandas, Matplotlib, Seaborn
  • Web: Flask, Django, FastAPI
  • Utilities: Requests, httpx, Pydantic, pytest
  • Database: SQLAlchemy
  • Deployment: Uvicorn, Gunicorn

Capabilities

  • Architecture Analysis - Design patterns, components, modules
  • API Extraction - Function signatures, parameters, examples
  • Optimization Engine - Generates Barrot-specific performance recommendations
  • Best Practices - Security, performance, patterns
  • Continuous Updates - Weekly re-ingestion, version tracking
  • Integration Intelligence - How to best leverage dependencies in Barrot

Generated Outputs

  • 21+ dependency knowledge files (JSON)
  • 4+ optimization recommendations (Critical, High, Medium priority)
  • Complete taxonomy by category, priority, use case
  • Integration notes for Barrot systems

โ†’ View Dependency Ingestion README
โ†’ View Configuration

Usage:

# Run full ingestion
python3 dependency_micro_ingestion.py

# View examples
python3 example_dependency_ingestion.py

๐Ÿ”ง Configuration

Build Manifest

The build_manifest.yaml file tracks:

  • Build signature and timestamp
  • Active modules
  • Rail status (ingestion, deployment, microagent, etc.)
  • Resource connections
  • Provenance hash

Workflows

Automated workflows handle:

  • Build manifest updates
  • Repository cleanup
  • Dashboard publishing
  • Bundle management
  • Barrot-SHRM ping-pong health monitoring

22-Agent Entanglement Pingpong System

Barrot defers complex cognitive processing to an external 22-agent entanglement system:

  • Management: External (Sean's 22-agent system)
  • Configuration: pingpong-config.yaml
  • Emitter: pingpong_emitter.py Python module
  • Enforcement: Non-negotiable external control

Usage Example:

from pingpong_emitter import emit_pingpong_request

payload = {
    "topic": "MMI Self-Ingestion",
    "glyph": "GLYPH_MMI",
    "recursion_depth": "โˆž",
    "notes": "Triggering recursive cognition exchange"
}

emit_pingpong_request(payload)  # Creates pingpong_request.json

The external system monitors commits to pingpong_request.json and processes requests automatically.

๐Ÿ“Š Monitoring

Web Dashboards

Access the live dashboards at:

# Barrot Agent Dashboard
https://barrot-agent.github.io/Barrot-Agent/site/

# Search Engine
https://barrot-agent.github.io/Barrot-Agent/search-engine/

GitHub Actions

Monitor workflow runs:

https://github.com/Barrot-Agent/Barrot-Agent/actions

Build Status

Check current build status:

cat build_manifest.yaml

View recent activity:

cat memory-bundles/outcome-relay.md | tail -20

๐Ÿš€ Deployment

Barrot-Agent can be deployed to multiple cloud platforms:

  • GitHub Pages (Current): https://barrot-agent.github.io/Barrot-Agent/
  • Heroku: One-click deployment with app.json
  • Render: Static site deployment with render.yaml
  • Railway: Docker-based deployment with railway.json
  • Fly.io: Global edge deployment with fly.toml
  • Docker: Self-hosted container deployment

๐Ÿ“– See Full Deployment Guide

Quick Deploy

Deploy to Heroku

Docker

docker build -t barrot-agent .
docker run -p 8080:8080 barrot-agent

๐Ÿค Contributing

Contributions are welcome! Please feel free to:

  • Submit issues
  • Create pull requests
  • Improve documentation
  • Add new features

๐Ÿ“„ License

ISC License - See repository for details

๐Ÿ“š Documentation

Data Unification (2026-06-17): All root-level markdown docs have been consolidated into the docs/ directory. The originals remain at the root as legacy references.

Consolidated Docs (docs/)

FileContents
docs/ingestion.mdIngestion manifest, data transformation, micro-ingestion systems
docs/agi.mdAGI architecture, implementation summaries, quantum AGI
docs/millennium_problems.mdMillennium Problems research, status, transformative insights
docs/character_capabilities.mdCharacter capability system, Chameleon chain, dynamic search
docs/email.mdEmail processing, feature summary, quickstart
docs/monetization.mdMMI, monetization protocols, COIN app, Connext bridge
docs/research.mdAdvanced propulsion & energy research
docs/system.mdSystem architecture, merge conflict guide, ops
docs/STEP5_BARROT_INITIATIVE.mdData unification initiative โ€” Step 5 self-directed work

Data Layer (data/)

FileContents
data/registry.pyCentral data registry โ€” typed loaders with caching
data/schemas.pyCanonical TypedDict schemas for all data domains
data/merge_conflict_unified.jsonUnified merge-conflict knowledge base
data/millennium_problems_unified.jsonAll 7 Millennium Problems with metadata
data/mmi_monetization_unified.jsonMMI recommendations, protocols, council weights
data/character_capabilities_unified.jsonCharacter database + discovered capabilities
data/longevity_unified.jsonLongevity research knowledge base template
data/biomarker_tracking.jsonBiomarker timeline and trial tracking template
data/reprogramming_protocols.jsonEpigenetic reprogramming protocol library template

Longevity Integration Quick Usage

python -m pytest tests/test_longevity_modules.py --no-cov

python - <<'PY'
from longevity_micro_ingestion import LongevityMicroIngestion
payload = LongevityMicroIngestion().build_unified_payload(
    paper_text="Transient Oct4/Sox2/Klf4/c-Myc expression improved NAD+ and epigenetic clocks.",
    trial_records=[],
    methylation_samples=[],
    biomarker_measurements={}
)
print(payload["research_domain"], payload["omega_ingest"]["compatibility"])
PY

Legacy Root-Level Docs

๐Ÿ’ฐ Support Barrot-Agent

Love Barrot-Agent? Consider becoming a sponsor!

Sponsor

Your sponsorship helps us:

  • ๐Ÿ”ฌ Accelerate AGI research
  • ๐Ÿ† Dominate AI benchmarks
  • ๐Ÿค– Develop autonomous capabilities
  • ๐Ÿ“Š Improve transparency and logging
  • ๐ŸŒ Grow the open-source community

View Sponsorship Tiers


Barrot-Agent - Intelligent automation and data processing at your fingertips ๐Ÿฆœโœจ

Contributors

Barrot-Agent

605 commits

Copilot

386 commits

dependabot[bot]

52 commits

Languages

Python

95.8%

JavaScript

2.1%

HTML

1.4%