Skip to main content

Agent-Based Infrastructure Core - Runtime and CLI

Project description

ABI-Core ๐Ÿค–

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

โš ๏ธ 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
abi-core create project my-ai-system

# Navigate to your project
cd my-ai-system

# Create an agent
abi-core create agent my-agent

# Run your project
docker-compose up

๐ŸŽฏ What is ABI-Core?

ABI-Core 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 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

  • Vector Storage: Weaviate integration for semantic search
  • Embedding Management: Automatic text-to-vector conversion
  • Knowledge Graphs: NetworkX-based relationship modeling
  • 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 project
abi-core create project <name>

# Project status
abi-core status

# Run project services
abi-core run

Agent Development

# Create new agent
abi-core create agent <name>

# List agents
abi-core info agents

# Agent-specific operations
abi-core agent <name> status

Services

# Create semantic layer service
abi-core create service semantic-layer

# Create security guardian
abi-core create service guardian

๐Ÿ“ 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
โ”œโ”€โ”€ services/              # Supporting services
โ”‚   โ”œโ”€โ”€ semantic-layer/    # Vector DB & embeddings
โ”‚   โ””โ”€โ”€ guardian/          # Security & policies
โ”œโ”€โ”€ config/                # Configuration
โ”‚   โ””โ”€โ”€ config.py
โ”œโ”€โ”€ docker-compose.yml     # Container orchestration
โ””โ”€โ”€ README.md             # Project documentation

๐Ÿ”ง Configuration

ABI-Core uses environment variables and YAML configuration:

# .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)

# Build and run all services
docker-compose up --build

# Scale specific services
docker-compose up --scale my-agent=3

Kubernetes

# Generate K8s manifests
abi-core deploy kubernetes

# Apply to cluster
kubectl apply -f ./k8s/

๐Ÿงช Examples

Simple Agent

from abi_core.agent.agent import AbiAgent
from abi_core.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}")
        
        # Your agent logic here
        response = await self.llm.ainvoke(query)
        
        yield {
            'content': response.content,
            'response_type': 'text',
            'is_task_completed': True
        }

Agent Communication

# Agent A sends message to Agent B
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
cd abi-core
uv sync --dev

Running Tests

uv run pytest

๐Ÿ“„ License

Apache 2.0 License - see LICENSE file for details.

๐Ÿ†˜ Support

๐Ÿ—บ๏ธ Roadmap

  • v0.2.0: Enhanced agent orchestration
  • v0.3.0: Advanced semantic search
  • v0.4.0: Multi-cloud deployment
  • v1.0.0: Production-ready stable release

Built with โค๏ธ by the ABI-Core Team

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.0b1.tar.gz (101.4 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.0b1-py3-none-any.whl (126.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for abi_core_ai-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 181b21c0bb47783869c218552a438a60aade643aa711101ef509113b4c2234ca
MD5 140cc5f7bd33fe039705d48f38bd3273
BLAKE2b-256 759574f938cd8aec2b8fb7456d4b0beb8825dc53cc2593ddf3cd0654780f89b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for abi_core_ai-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf7f2ccc99e4f40850c848d775006dd46dabab4ccf32e914609a55ecbc89f500
MD5 8920d5ce4a9345266f6f4413841d323c
BLAKE2b-256 47185d55d54a7e104660d41f600a1d8f15b2534c5427c35c783b13604168ea8e

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