Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4,037 Commits

Repository files navigation

Entity Framework 🚀

PyPIDocsPython 3.11+Tests

Build AI agents in minutes, not weeks.

Quick Start

pip install entity-core
fromentityimportAgentagent=Agent() # Zero configresponse=awaitagent.chat("Hello!") # Ready to use

Core Concept

# Agent = Resources + WorkflowfromentityimportAgentfromentity.defaultsimportload_defaultsagent=Agent(
resources=load_defaults(), # Memory, LLM, Storageworkflow=default_workflow() # 6-stage pipeline
)

Progressive Examples

1. Basic Agent (3 lines)

fromentityimportAgentagent=Agent()
awaitagent.chat("Tell me a joke")

2. Custom Personality (5 lines)

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

3. Agent with Tools (8 lines)

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

4. Production Setup (10 lines)

fromentityimportAgentfromentity.monitoringimportsetup_observabilityagent=Agent.from_config("production.yaml")
setup_observability(agent)
awaitagent.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

fromentity.plugins.baseimportPluginclassMyPlugin(Plugin):
supported_stages= ["think"]
asyncdef_execute_impl(self, context):
# Your logic herereturnf"Processed: {context.message}"# Use itagent=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.yamlplugins:
parse: [intent_classifier, sentiment_analyzer]do: [knowledge_base, ticket_system]review: [compliance_checker]

Code Reviewer

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

Why Entity?

MetricTraditionalEntity
Dev Time2-3 weeks2-3 days
Code Lines2000+~200
ArchitectureMonolithicPlugin-based
TestingComplexSimple units

Resources

License

MIT


Build better agents, faster. 🚀

About

An AI entity framwork

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages