ExoModel AI: Object-Oriented Agentic AI
Project description
๐ ExoModel AI
Your Python objects, autonomous.
Describe what you want โ the object thinks, acts, and responds.
๐ Official Documentation: https://exomodel.ai
๐ฆ GitHub Repository: https://github.com/exomodel-ai/exomodel
๐ฌ Contact: contact@exomodel.ai
Your domain objects already know how to do things.
Making them understand a natural language instruction shouldn't require
adapters, intent routers, and prompt templates written by hand.
ExoModel bridges natural language intent and object behavior โ so your domain objects can understand instructions, call their own methods, and respond with guaranteed structure. No glue code. No rewrites.
Install now: pip install exomodel
โก Why ExoModel?
| Traditional approach | With ExoModel |
|---|---|
| Write adapters and parsers before every feature | Objects understand instructions directly โ no translation layer |
Map intent to methods by hand (if intent == X) |
Objects discover and call their own methods based on intent |
| Glue code buries your domain logic | Domain code stays domain code |
| Tied to one LLM provider | Swap providers without touching business logic |
๐ค Why not just use LangChain directly?
LangChain is great โ ExoModel is actually built on top of it. But there's a gap between "I have an LLM" and "I have a working business application", and that's exactly what ExoModel fills.
1. LangChain thinks in pipelines. Your business thinks in objects.
When you model a Proposal, a LeadContact, or an AuditReport, you're thinking in entities โ not chains. LangChain makes you wrap your objects around the AI. ExoModel puts the AI inside the objects, where it belongs.
2. You still have to write all the glue code.
With raw LangChain, you manage prompt templates, output parsers, schema validation, RAG retrieval, and tool registration โ separately, by hand, for every entity. ExoModel handles all of that by convention. Define the schema, attach the documents, and the object knows what to do.
3. The output is still just text.
LangChain returns strings. Your application needs structured, validated, typed objects that can act โ objects you can save to a database, send to an API, render in a UI, or use to trigger further methods. ExoModel's output is always a live Pydantic object โ guaranteed schema, no parsing, ready to do work.
๐ฅ Core Features
- ๐ง Natural Language Updates โ Give objects instructions in plain English โ they update their own fields with guaranteed structure. No parsers, no manual mapping.
- ๐ Native RAG Grounding โ Ground your objects in real documents โ attach PDFs, URLs, or text files and the object reasons within your actual business context.
- ๐ค ExoAgent Orchestration โ Let objects coordinate without writing routing logic โ ExoAgent reads intent and decides which method or tool to invoke, not
if/else. - ๐ Schema-Validated Output โ Feed raw human input, get back schema-validated output โ ready for your APIs, databases, or UI. No parsing step.
- โ๏ธ Agentic Tools with
@llm_functionโ Expose any method as an agent tool with one decorator โ ExoAgent discovers and calls it autonomously. No registration, no wiring. - ๐ Collection Operations โ Operate on entire collections in one LLM call โ generate, update, and export lists of objects without looping manually.
๐ฆ Installation
ExoModel is LLM-agnostic. Install only the provider package you need:
pip install "exomodel[google]" # Gemini (default)
pip install "exomodel[anthropic]" # Claude
pip install "exomodel[openai]" # OpenAI / Azure OpenAI
pip install "exomodel[cohere]" # Cohere
pip install "exomodel[all]" # all providers
Then create a .env file at the root of your project:
MY_LLM_MODEL=google_genai:gemini-2.5-flash-lite
MY_EMB_MODEL=google_genai:gemini-embedding-001 # optional โ auto-detected from provider
GOOGLE_API_KEY=your-key-here
๐ Quick Start
Three steps. No boilerplate.
Step 1 โ Install
pip install "exomodel[google]"
Step 2 โ Inherit
from exomodel import ExoModel
class Proposal(ExoModel):
client: str = ""
budget: float = 0.0
flagged_for_legal: bool = False
def flag_for_review(self):
self.flagged_for_legal = True
@classmethod
def get_rag_sources(cls):
return ["proposal_rules.md"]
Step 3 โ Instruct
# The object updates fields and calls the right method โ from one instruction
p = Proposal.create("Draft a 50k proposal for Tesla")
p.update("apply the 10% safety margin and flag it for legal review")
# โ budget updated, flag_for_review() called โ no if/else, no manual routing
print(p.to_ui())
# The object checks itself against proposal_rules.md
print(p.run_analysis())
The @llm_function decorator makes any method callable by the agent. Point it at a rules document and the object validates itself โ no extra code.
from exomodel import ExoModel, llm_function
class LeadContact(ExoModel):
name: str = ""
status: str = "new"
score: int = 0
@llm_function
def qualify(self):
"""Qualify this lead based on company size and budget signals."""
self.status = "qualified"
@llm_function
def disqualify(self, reason: str):
"""Mark this lead as disqualified and record why."""
self.status = f"disqualified: {reason}"
lead = LeadContact.create("Sarah from Acme Corp, mentioned $200k budget")
lead.master_prompt("Evaluate this lead and take the right action")
# โ qualify() or disqualify() called autonomously based on context
๐ Architecture
| Class | Role |
|---|---|
ExoModel |
The intelligent object foundation โ schema-driven, AI-powered, RAG-aware. Subclass this to define your entities. |
ExoAgent |
The reasoning engine that routes tool calls, manages LLM context, and processes RAG sources. Used internally by ExoModel; also available for direct use. |
ExoModelList[T] |
Typed collection for bulk generation, updating, and export of ExoModel instances in a single LLM call. |
@llm_function |
Decorator that turns any method into an agentic tool, discoverable and callable by ExoAgent at runtime via master_prompt. |
๐ฏ Use Cases
- ๐ค Consultative Apps โ Build AI advisors that guide users through complex processes (insurance claims, financial planning) by populating structured objects in real time.
- ๐ Agentic Middleware โ Bridge human language and rigid backends. Every LLM output fits your API's exact specification before it hits the wire.
- ๐ Sales & CRM Automation โ Draft proposals, calculate pricing against business rules, and update lead status autonomously.
- ๐ต๏ธ Smart Auditing & Compliance โ Create objects that read their own source contracts to populate audit fields and flag inconsistencies without manual oversight.
- ๐ Intelligent Dashboarding โ Transform raw logs or transcripts into lists of structured objects (
ExoModelList), ready for data visualization.
๐ง Logging
ExoModel uses Python's standard logging module. No output is shown by default.
import logging
# Show warnings and errors only (recommended for production):
logging.getLogger("exomodel").setLevel(logging.WARNING)
# Show all internal traces (useful for debugging):
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("exomodel").setLevel(logging.DEBUG)
With ExoModel, your domain code stays domain code.
Your objects do what they were always meant to do โ just smarter.
๐ค Contributing
We welcome contributions! ExoModel is built by developers for developers.
- Fork the project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
๐ License
Distributed under the Apache License 2.0. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exomodel-1.0.2.tar.gz.
File metadata
- Download URL: exomodel-1.0.2.tar.gz
- Upload date:
- Size: 56.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
068933144d9bf9f861fda0e81deacd4c0994262999ba543327121447185358f0
|
|
| MD5 |
11f7b3fa6ad8a458b4648a433a1fbf81
|
|
| BLAKE2b-256 |
e7a3bbc632002418bd07417c103627345211df06c9c9ee66ace7457363b21b64
|
File details
Details for the file exomodel-1.0.2-py3-none-any.whl.
File metadata
- Download URL: exomodel-1.0.2-py3-none-any.whl
- Upload date:
- Size: 37.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a01957f071e823c70b14dd6e74b4ee610fbd74f143cbd6e10a9dcc1d8c346b2
|
|
| MD5 |
e1cd32112a694e5d96779a6023362fb4
|
|
| BLAKE2b-256 |
0fdd4d2bb61679984da1a5525d44b9fd27b299ec88915e783798264aa08f6987
|