Skip to main content

Domain-agnostic LLM orchestration engine built on LangGraph

Project description

alfredagain

Domain-agnostic LLM orchestration engine built on LangGraph.

Alfred is a multi-agent assistant framework. You implement a DomainConfig to teach it your domain — entities, subdomains, prompts, database adapter — and Alfred handles the orchestration: routing, planning, CRUD execution, entity tracking, prompt assembly, and conversation memory.

Install

pip install alfredagain

Quick Start

from alfred.domain.base import DomainConfig, EntityDefinition, SubdomainDefinition
from alfred.domain import register_domain

class MyDomain(DomainConfig):
    @property
    def name(self) -> str:
        return "mydomain"

    @property
    def entities(self) -> dict[str, EntityDefinition]:
        # Define your entities...
        ...

    @property
    def subdomains(self) -> dict[str, SubdomainDefinition]:
        # Define your subdomains...
        ...

    # Implement remaining abstract methods...

# Register and run
register_domain(MyDomain())

from alfred.graph.workflow import run_alfred
response, conversation = await run_alfred(
    user_message="Hello!",
    user_id="user_1",
)

What Alfred Provides

  • Pipeline orchestration — Understand → Think → Act → Reply, with LangGraph state management
  • Entity tracking — SessionIdRegistry translates UUIDs to simple refs (recipe_1, item_2)
  • CRUD execution — Schema-driven database operations with middleware hooks
  • Prompt assembly — Domain-provided personas, examples, and context injection
  • Conversation memory — Turn summarization, context windowing, session persistence
  • Model routing — Complexity-based model selection (mini for simple, full for complex)
  • Streaming — 11 typed events for real-time UI updates

Architecture

Core is fully domain-agnostic. It never imports any domain package. Domains implement DomainConfig (66 methods — 23 abstract, 43 with defaults) and call register_domain().

See docs/architecture/ for detailed documentation:

  • overview.md — Architecture index + pipeline diagram
  • domain-implementation-guide.md — How to build a new domain
  • core-public-api.md — Entry points, extension protocols

Development

git clone https://github.com/jv92admin/alfred-core.git
cd alfred-core
python -m venv .venv
.venv\Scripts\activate  # Windows
pip install -e ".[dev]"
pytest tests/ -v

License

MIT

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

alfredagain-2.0.1.tar.gz (246.9 kB view details)

Uploaded Source

Built Distribution

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

alfredagain-2.0.1-py3-none-any.whl (189.4 kB view details)

Uploaded Python 3

File details

Details for the file alfredagain-2.0.1.tar.gz.

File metadata

  • Download URL: alfredagain-2.0.1.tar.gz
  • Upload date:
  • Size: 246.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for alfredagain-2.0.1.tar.gz
Algorithm Hash digest
SHA256 abe56c24c236d7c2fac9c17791246b2bca5ffcf2054d12c6b3b5e71331c31ec8
MD5 4194c98ba5109f6e025e6a2595ce98ac
BLAKE2b-256 b5edc2f301f2faea4174173993d8ff81ecec1968bd10c6a2e0da8d959045c1f3

See more details on using hashes here.

File details

Details for the file alfredagain-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: alfredagain-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 189.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for alfredagain-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 14cd4610e44aad3cefaeaceec9d18d5b9cee733d3e9c55e0b580b7cb5cab85e2
MD5 65651f8139686e6fa5ac54c3e55d4a52
BLAKE2b-256 166bb27eb86ca3f7fcb65ce5bb977064c47a0f4398a6af60c62b9dc85a157ce7

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