Skip to main content

Production-grade agentic architecture — EventBus, Sagas, Skills, and the 17 Laws.

Project description

OpenForgeAI

Open-source agentic architecture for production systems.

Built by one person. Running in production. Now open-source.


What Is This?

OpenForgeAI is the architecture framework extracted from Saarathi — a production AI-native platform built by a solo founder that competes with funded teams.

It provides the patterns you need to build systems where AI agents work as a real team: communicating via events, orchestrating multi-step workflows, and self-registering their capabilities.

This isn't a toy. These patterns run in production handling real users, real payments, and real-time messaging.

Core Components

EventBus — Agent Communication

A pub/sub event system where agents subscribe to events, emit new ones, and react autonomously. No direct function calls between agents.

from openforgeai.events import EventBus, Event

bus = EventBus()
bus.register_agent(my_agent)      # Agent subscribes to events it handles
await bus.publish(OrderCreated(order_id="123"))  # All subscribers react

Skill Registry — Agent Discovery

Auto-discovery and registration of agent skills. Drop a new skill file, it registers itself.

from openforgeai.agents import SkillRegistry

registry = SkillRegistry()
registry.discover("./skills/")    # Auto-finds all skills
registry.initialize(tenant_id="abc")  # Creates instances, wires EventBus

Saga Coordinators — Multi-Step Orchestration

Event-driven state machines for complex workflows. Each step completes on event arrival, not await calls.

from openforgeai.sagas import SagaCoordinator

class OnboardingSaga(SagaCoordinator):
    steps = ["send_welcome", "create_profile", "notify_team"]
    # Each step emits an event → next step triggers on completion event

Workflow Engine — Visual Process Automation

Define workflows as node graphs. Delay nodes, condition nodes, action nodes — all executing via the EventBus.

Deploy Validator — Pre-Deploy Safety

Catches broken imports, missing agent registrations, and compliance violations before you deploy.

python -m openforgeai.validators.deploy_check
# ✓ All skills imported
# ✓ All events have subscribers
# ✓ No orphan handlers

The 17 Laws of Agentic Engineering

The methodology behind the architecture. Read the full guide →

# Law One-liner
1 Contracts have handlers Every event type must have a subscriber
2 Coordinators emit, never call No direct skill.execute() from coordinators
3 Sagas track via events Steps complete on event arrival
4 No orphan events Every emitted event must have a subscriber
5 Search before create Check existing code before building new
6 PRD before code Spec first, understand why, then build
7 Verify before done Run checks, show output
14 Imports are code Every symbol used must be imported
15 Match the API Read method signature before calling
16 Definition of done Imports ✓ Signatures ✓ Required fields ✓ Actually runs ✓
17 Verify interfaces before use Read model definition → validate locally → smoke test

Quick Start

pip install openforgeai
from openforgeai import EventBus, BaseAgent, Event

# Define an event
class TaskCreated(Event):
    task_id: str
    title: str

# Define an agent
class NotificationAgent(BaseAgent):
    consumes_events = [TaskCreated]

    async def on_task_created(self, event: TaskCreated):
        print(f"New task: {event.title}")

# Wire it up
bus = EventBus()
agent = NotificationAgent()
bus.register_agent(agent)

await bus.publish(TaskCreated(task_id="1", title="Ship it"))
# Output: New task: Ship it

Who Is This For?

  • Solo founders building production SaaS without a team
  • Startup CTOs who want 10X team output with agentic patterns
  • Senior engineers transitioning to AI-native architecture
  • Anyone tired of AI demos that break in production

Learn More

The Story

I built Saarathi — an AI-native platform with real-time WhatsApp nurturing, automated webinar funnels, payment processing, CRM, and 14 AI agent skills working as a team. One person. Zero employees. Production-deployed. Real revenue.

The secret isn't "AI writes my code." The secret is architecture.

When your codebase is spaghetti, AI is a liability. When your codebase has clean contracts — EventBus, saga coordinators, skill registries — AI becomes a genuine team member.

Software engineering isn't dead. It's reinvented.

License

MIT — Use it, fork it, build with it.

Links

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

openforgeai-0.1.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

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

openforgeai-0.1.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file openforgeai-0.1.0.tar.gz.

File metadata

  • Download URL: openforgeai-0.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.3 cpython/3.11.1 HTTPX/0.28.1

File hashes

Hashes for openforgeai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b99e7f551c1bc1920bba727d2fbdde5b27fd2b0bcf4414da7235e50c942a89f
MD5 cd162eba778691328264f0e988ca564c
BLAKE2b-256 ea2e8eb9ab2d3cee35f79c58f7bd334762a1be94045743f74ca1858e265ad3c4

See more details on using hashes here.

File details

Details for the file openforgeai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: openforgeai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.3 cpython/3.11.1 HTTPX/0.28.1

File hashes

Hashes for openforgeai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75ff413530f747d7ea6571e83b3e6967e4e2e41f80b0fb065cec761692da5042
MD5 753678a449ea182db6c828db6a824ccd
BLAKE2b-256 b8c64e4291d9b12e4fa2233dcf456165b668d94603776208669fc00872a9197c

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