Skip to main content

Agent-Based Infrastructure Core - Runtime and CLI

Project description

ABI-Core ๐Ÿค–

PyPI version Python License

ABI-Core-AI โ€” The foundation for building Agent-Based Infrastructure (ABI) โ€” a new architectural paradigm where intelligent agents collaborate through semantic context, policy-driven governance, and modular orchestration.

Agent-Based Infrastructure Core โ€” A comprehensive framework for building, deploying, and managing AI agent systems with semantic layers, orchestration, and security policies.


๐Ÿงญ Core Philosophy

ABI-Core is built on three fundamental principles:

  1. Semantic Interoperability โ€” Agents must share meaning, not just data.
  2. Distributed Intelligence โ€” No single model owns the truth; collaboration is the substrate.
  3. Governed Autonomy โ€” Security and compliance must evolve as fast as intelligence itself.

โš ๏ธ Beta Release: This is a beta version. APIs may change and some features are experimental.


๐Ÿš€ Quick Start

Installation

pip install abi-core-ai

Create Your First Project

# Create a new ABI project with semantic layer
abi-core create project my-ai-system --with-semantic-layer

# Navigate to your project
cd my-ai-system

# Create an agent
abi-core add agent my-agent --description "My first AI agent"

# Create an agent card for semantic discovery
abi-core add agent-card my-agent --description "General purpose AI assistant" --url http://localhost:8000

# Run your project
abi-core run

๐ŸŽฏ What is ABI-Core?

ABI-Core-AI is a production-ready framework for building Agent-Based Infrastructure systems that combine:

  • ๐Ÿค– AI Agents โ€” LangChain-powered agents with A2A (Agent-to-Agent) communication
  • ๐Ÿง  Semantic Layer โ€” Vector embeddings and distributed knowledge management
  • ๐Ÿ”’ Security โ€” OPA-based policy enforcement and access control
  • ๐ŸŒ Web Interfaces โ€” FastAPI-based REST APIs and real-time dashboards
  • ๐Ÿ“ฆ Containerization โ€” Docker-ready deployments with orchestration

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   AI Agents     โ”‚โ—„โ”€โ”€โ–บโ”‚ Semantic Layer  โ”‚โ—„โ”€โ”€โ–บโ”‚   Guardian      โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚   Security      โ”‚
โ”‚ โ€ข LangChain     โ”‚    โ”‚ โ€ข Vector DB     โ”‚    โ”‚ โ€ข OPA Policies  โ”‚
โ”‚ โ€ข A2A Protocol  โ”‚    โ”‚ โ€ข Embeddings    โ”‚    โ”‚ โ€ข Access Controlโ”‚
โ”‚ โ€ข Custom Logic  โ”‚    โ”‚ โ€ข Knowledge     โ”‚    โ”‚ โ€ข Monitoring    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                       โ”‚                       โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Web Interface  โ”‚
                    โ”‚                 โ”‚
                    โ”‚ โ€ข FastAPI       โ”‚
                    โ”‚ โ€ข Real-time UI  โ”‚
                    โ”‚ โ€ข Monitoring    โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‹ Features

๐Ÿค– Agent System

  • Multi-Agent Architecture โ€” Create specialized agents for different tasks
  • A2A Communication โ€” Agents can communicate and collaborate
  • LangChain Integration โ€” Leverage the full LangChain ecosystem
  • Custom Tools โ€” Extend agents with domain-specific capabilities

๐Ÿง  Semantic Layer

  • Agent Discovery โ€” MCP-based agent finding and routing
  • Vector Storage โ€” Embedding-based semantic search
  • Agent Cards โ€” Structured agent metadata and capabilities
  • Access Validation โ€” OPA-integrated security for semantic access
  • Embedding Mesh โ€” Distributed embedding computation and caching
  • Context Awareness โ€” Agents understand semantic relationships

๐Ÿ”’ Security & Governance

  • Policy Engine โ€” Open Policy Agent (OPA) integration
  • Access Control โ€” Fine-grained permissions and roles
  • Audit Logging โ€” Complete activity tracking
  • Compliance โ€” Built-in security best practices

๐ŸŒ Web & APIs

  • REST APIs โ€” FastAPI-based service endpoints
  • Real-time Updates โ€” WebSocket support for live data
  • Admin Dashboard โ€” Monitor and manage your agent system
  • Custom UIs โ€” Build domain-specific interfaces

๐Ÿ› ๏ธ CLI Commands

Project Management

# Create new projects with optional services
abi-core create project <name> [--domain <domain>] [--with-semantic-layer] [--with-guardian]
abi-core status                    # Check project status
abi-core run                       # Start all services
abi-core info                      # Show project information

Agent Development

# Create and manage agents
abi-core add agent <name> [--description <desc>] [--model <model>] [--with-web-interface]
abi-core remove agent <name>       # Remove an agent
abi-core info agents               # List all agents

Services Management

# Add services to existing projects
abi-core add service semantic-layer [--name <name>] [--domain <domain>]
abi-core add service guardian [--name <name>] [--domain <domain>]
abi-core add service guardian-native [--name <name>] [--domain <domain>]

# Quick service shortcuts
abi-core add semantic-layer [--domain <domain>]    # Add semantic layer directly
abi-core remove service <name>                     # Remove any service

Agent Cards & Semantic Layer

# Manage agent cards for semantic discovery
abi-core add agent-card <name> [--description <desc>] [--model <model>] [--url <url>] [--tasks <tasks>]
abi-core add policies <name> [--domain <domain>]   # Add security policies

Examples

# Create a finance project with semantic layer and security
abi-core create project fintech-ai --domain finance --with-semantic-layer --with-guardian

# Add a specialized trading agent
abi-core add agent trader --description "AI trading assistant" --model llama3.2:3b

# Create agent card for semantic discovery
abi-core add agent-card trader --description "Execute trading operations" --url http://localhost:8001 --tasks "trade,analyze,risk-assessment"

# Add semantic layer to existing project
abi-core add semantic-layer --domain finance

# Remove components when needed
abi-core remove service semantic_layer
abi-core remove agent trader

๐Ÿ“ Project Structure

When you create a new project, you get:

my-project/
โ”œโ”€โ”€ agents/                 # Your AI agents
โ”‚   โ””โ”€โ”€ my-agent/
โ”‚       โ”œโ”€โ”€ agent.py        # Agent implementation
โ”‚       โ”œโ”€โ”€ main.py         # Entry point
โ”‚       โ”œโ”€โ”€ models.py       # Data models
โ”‚       โ””โ”€โ”€ agent_cards/    # Agent cards for semantic discovery
โ”œโ”€โ”€ services/               # Supporting services
โ”‚   โ”œโ”€โ”€ semantic_layer/     # AI agent discovery & routing
โ”‚   โ”‚   โ””โ”€โ”€ layer/
โ”‚   โ”‚       โ”œโ”€โ”€ mcp_server/ # MCP server for agent communication
โ”‚   โ”‚       โ””โ”€โ”€ embedding_mesh/ # Vector embeddings & search
โ”‚   โ””โ”€โ”€ guardian/           # Security & policy enforcement
โ”œโ”€โ”€ agent_cards/            # Global agent cards directory
โ”œโ”€โ”€ config/                 # Configuration files
โ”‚   โ””โ”€โ”€ config.py
โ”œโ”€โ”€ compose.yaml            # Container orchestration
โ”œโ”€โ”€ .abi/                   # ABI project metadata
โ”‚   โ””โ”€โ”€ runtime.yaml
โ””โ”€โ”€ README.md               # Project documentation

๐Ÿ”ง Configuration

ABI-Core uses environment variables and YAML configuration files:

# .abi/runtime.yaml
agents:
  my-agent:
    model: "llama3.2:3b"
    port: 8000
    
semantic_layer:
  provider: "weaviate"
  host: "localhost:8080"
  
security:
  opa_enabled: true
  policies_path: "./policies"

๐Ÿš€ Deployment

Docker (Recommended)

docker-compose up --build
docker-compose up --scale my-agent=3

Kubernetes

abi-core-ai deploy kubernetes
kubectl apply -f ./k8s/

๐Ÿงช Examples

Simple Agent

from abi_core_ai.agent.agent import AbiAgent
from abi_core_ai.common.utils import abi_logging

class MyAgent(AbiAgent):
    def __init__(self):
        super().__init__(
            agent_name='my-agent',
            description='A helpful AI assistant'
        )
    
    async def stream(self, query: str, context_id: str, task_id: str):
        abi_logging(f"Processing: {query}")
        response = await self.llm.ainvoke(query)
        yield {
            'content': response.content,
            'response_type': 'text',
            'is_task_completed': True
        }

Agent Communication

await self.send_message(
    target_agent="agent-b",
    message="Process this data",
    data={"items": [1, 2, 3]}
)

๐Ÿ“š Documentation


๐Ÿค Contributing

We welcome contributions! This is a beta release, so your feedback is especially valuable.

Development Setup

git clone https://github.com/Joselo-zn/abi-core-ai
cd abi-core-ai
uv sync --dev

Running Tests

uv run pytest

๐Ÿ“„ License

Apache 2.0 License โ€” see LICENSE for details.


๐Ÿ†˜ Support


๐Ÿ—บ๏ธ Roadmap

Milestone Description Status
v0.2.0 Enhanced agent orchestration ๐Ÿ”œ In progress
v0.3.0 Advanced semantic search ๐Ÿง  Planned
v0.4.0 Multi-cloud deployment ๐Ÿงฉ Planned
v1.0.0 Production-ready stable release ๐Ÿ Target Q3 2026

Built with โค๏ธ by Josรฉ Luis Martรญnez
Creator of ABI (Agent-Based Infrastructure) โ€” redefining how intelligent systems interconnect.

โœจ From Curiosity to Creation: A Personal Note

I first saw a computer in 1995. My dad had received a Windows 3.11 machine as payment for a job. I was fascinated. At the time, I wanted to study robotics โ€” but when I touched that machine, everything changed.

I didn't understand what the Internet was, and I had no idea where to goโ€ฆ but even in that confusion, I felt something big. When I wrote my first Visual C++ program in 1999, I felt like a hacker. When I built my first web page, full of GIFs, I was flying.

Nobody taught me. I just read manuals. And now, years later, that journey continues โ€” not just as a coder, but as the creator of ABI. This is for the kids like me, then and now.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abi_core_ai-0.1.0b28.tar.gz (124.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abi_core_ai-0.1.0b28-py3-none-any.whl (153.3 kB view details)

Uploaded Python 3

File details

Details for the file abi_core_ai-0.1.0b28.tar.gz.

File metadata

  • Download URL: abi_core_ai-0.1.0b28.tar.gz
  • Upload date:
  • Size: 124.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for abi_core_ai-0.1.0b28.tar.gz
Algorithm Hash digest
SHA256 cafe29795d2b130b17be65a9ebc7a3de833c84792c77ce8f12edd098015e48f3
MD5 067c31ad0bd1f1ec2220127f4468483b
BLAKE2b-256 9b6f496f12bf9537794cd7fc6f663bacc7d42b4d61669138a831f0f625d47070

See more details on using hashes here.

File details

Details for the file abi_core_ai-0.1.0b28-py3-none-any.whl.

File metadata

File hashes

Hashes for abi_core_ai-0.1.0b28-py3-none-any.whl
Algorithm Hash digest
SHA256 a60ad486feb56b00e35358e514ce216f452182763cc6c8e7fb69939f74643fd8
MD5 6239f482b5f2f4fa7e6e7ea59e999eeb
BLAKE2b-256 71232efe5dc6427c059e58e4360cbb1ae156026a57668105765e7d4a7e57dd55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page