Skip to main content

A Package containing core logic and schema for rakam-systems

Project description

Rakam System Core

The core package of Rakam Systems providing foundational interfaces, base components, and utilities.

Overview

rakam-systems-core is the foundation of the Rakam Systems framework. It provides:

  • Base Component: Abstract base class with lifecycle management
  • Interfaces: Standard interfaces for agents, tools, vector stores, embeddings, and loaders
  • Configuration System: YAML/JSON configuration loading and validation
  • Tracking System (experimental): Input/output tracking for debugging and evaluation
  • Logging Utilities (experimental): Structured logging with color support

This package is required by both rakam-systems-agent and rakam-systems-vectorstore.

Installation

pip install rakam-systems-core

Key Components

BaseComponent

All components extend BaseComponent which provides:

  • Lifecycle management with setup() and shutdown() methods
  • Auto-initialization via __call__
  • Context manager support
  • Built-in evaluation harness
from rakam_systems_core.ai_core.base import BaseComponent

class MyComponent(BaseComponent):
    def setup(self):
        super().setup()
        # Initialize resources

    def shutdown(self):
        # Clean up resources
        super().shutdown()

    def run(self, *args, **kwargs):
        # Main logic
        pass

Interfaces

Standard interfaces for building AI systems:

  • AgentComponent: AI agents with sync/async support
  • ToolComponent: Callable tools for agents
  • LLMGateway: LLM provider abstraction
  • VectorStore: Vector storage interface
  • EmbeddingModel: Text embedding interface
  • Loader: Document loading interface
  • Chunker: Text chunking interface
from rakam_systems_core.ai_core.interfaces.agent import AgentComponent
from rakam_systems_core.ai_core.interfaces.tool import ToolComponent
from rakam_systems_core.ai_core.interfaces.vectorstore import VectorStore

Configuration System

Load and validate configurations from YAML files:

from rakam_systems_core.ai_core.config_loader import ConfigurationLoader

loader = ConfigurationLoader()
config = loader.load_from_yaml("agent_config.yaml")
agent = loader.create_agent("my_agent", config)

Tracking System

Track inputs and outputs for debugging:

from rakam_systems_core.ai_core.tracking import TrackingMixin

class MyAgent(TrackingMixin, BaseAgent):
    pass

agent.enable_tracking(output_dir="./tracking")
# Use agent...
agent.export_tracking_data(format='csv')

Usage in Other Packages

Agent Package

# rakam-systems-agent uses core interfaces
from rakam_systems_core.ai_core.interfaces.agent import AgentComponent
from rakam_systems_agent import BaseAgent

agent = BaseAgent(name="my_agent", model="openai:gpt-4o")

Vectorstore Package

# rakam-systems-vectorstore uses core interfaces
from rakam_systems_core.ai_core.interfaces.vectorstore import VectorStore
from rakam_systems_vectorstore import ConfigurablePgVectorStore

store = ConfigurablePgVectorStore(config=config)

Documentation

For full API reference and architecture details, see the official documentation.

Development

This package contains only interfaces and utilities. To contribute:

  1. Install in editable mode: pip install rakam-systems-core
  2. Make changes to interfaces or utilities
  3. Ensure backward compatibility with agent and vectorstore packages
  4. Update version in pyproject.toml

License

Apache 2.0

Project details


Download files

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

Source Distribution

rakam_systems_core-0.1.4.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

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

rakam_systems_core-0.1.4-py3-none-any.whl (61.4 kB view details)

Uploaded Python 3

File details

Details for the file rakam_systems_core-0.1.4.tar.gz.

File metadata

  • Download URL: rakam_systems_core-0.1.4.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rakam_systems_core-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e199152218d111bf34f06061508a5c8774b844a78df2dcff70432d67fe198c25
MD5 0abd3162659fb50f5c9dceb97540aaa9
BLAKE2b-256 9ec2318a8d16aa782b8ac7b8ef1c943c879c77a62fd53f91076f7d7f64423483

See more details on using hashes here.

File details

Details for the file rakam_systems_core-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: rakam_systems_core-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 61.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rakam_systems_core-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1cee0ee462348eb2de34abc4e6b82cb634fbf65eb2f80690b0ac53ac1d9a9b9b
MD5 692aef4fd9d0ff3641c131172be64bf3
BLAKE2b-256 a92b226ce97cd89973221cc838fc5f67caa8827a26d04c568bdee2275fe1f2a4

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