Skip to content

Ladvien/entity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Entity Framework 🚀

PyPI Docs Python 3.11+ Tests

Build AI agents in minutes, not weeks.

Quick Start

pip install entity-core
from entity import Agent

agent = Agent()  # Zero config
response = await agent.chat("Hello!")  # Ready to use

Core Concept

# Agent = Resources + Workflow
from entity import Agent
from entity.defaults import load_defaults

agent = Agent(
    resources=load_defaults(),  # Memory, LLM, Storage
    workflow=default_workflow()  # 6-stage pipeline
)

Progressive Examples

1. Basic Agent (3 lines)

from entity import Agent
agent = Agent()
await agent.chat("Tell me a joke")

2. Custom Personality (5 lines)

agent = Agent.from_config({
    "role": "You are a Python tutor",
    "plugins": {"think": ["reasoning_plugin"]}
})
await agent.chat("Explain decorators")

3. Agent with Tools (8 lines)

from entity.tools import calculator, web_search

agent = Agent.from_config({
    "plugins": {
        "do": [calculator, web_search]
    }
})
await agent.chat("Search Python 3.12 features and calculate 15% of 200")

4. Production Setup (10 lines)

from entity import Agent
from entity.monitoring import setup_observability

agent = Agent.from_config("production.yaml")
setup_observability(agent)
await agent.serve(port=8000)

Architecture: 6-Stage Pipeline

INPUT → PARSE → THINK → DO → REVIEW → OUTPUT

Each stage accepts plugins:

workflow = {
    "input": [TextAdapter()],      # Accept input
    "parse": [IntentParser()],     # Understand
    "think": [ReasoningEngine()],  # Plan
    "do": [ToolExecutor()],        # Execute
    "review": [SafetyFilter()],    # Validate
    "output": [Formatter()]         # Deliver
}

Plugin Development

from entity.plugins.base import Plugin

class MyPlugin(Plugin):
    supported_stages = ["think"]

    async def _execute_impl(self, context):
        # Your logic here
        return f"Processed: {context.message}"

# Use it
agent = Agent(plugins={"think": [MyPlugin()]})

Installation Options

# Basic
pip install entity-core

# With extras
pip install "entity-core[web,dev]"

# From source
git clone --recurse-submodules https://github.com/Ladvien/entity.git
cd entity && pip install -e .

Plugin Packages

# Optional plugins
pip install entity-plugin-gpt-oss  # Advanced reasoning
pip install entity-plugin-stdlib   # Standard tools

Real-World Configurations

Customer Support

# support.yaml
plugins:
  parse: [intent_classifier, sentiment_analyzer]
  do: [knowledge_base, ticket_system]
  review: [compliance_checker]

Code Reviewer

# reviewer.yaml
plugins:
  parse: [diff_parser, ast_analyzer]
  think: [pattern_matcher]
  do: [security_scanner, style_checker]
  output: [github_commenter]

Why Entity?

Metric Traditional Entity
Dev Time 2-3 weeks 2-3 days
Code Lines 2000+ ~200
Architecture Monolithic Plugin-based
Testing Complex Simple units

Resources

License

MIT


Build better agents, faster. 🚀

About

An AI entity framwork

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •