Skip to main content

ExoModel AI: Object-Oriented Agentic AI

Project description

๐ŸŒŒ ExoModel AI

Your Python objects, autonomous.

Describe what you want โ€” the object thinks, acts, and responds.

PyPI version License

๐Ÿ“– 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.

  1. Fork the project.
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

๐Ÿ“„ License

Distributed under the Apache License 2.0. See LICENSE for more information.

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

exomodel-1.0.2.tar.gz (56.7 kB view details)

Uploaded Source

Built Distribution

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

exomodel-1.0.2-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

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

Hashes for exomodel-1.0.2.tar.gz
Algorithm Hash digest
SHA256 068933144d9bf9f861fda0e81deacd4c0994262999ba543327121447185358f0
MD5 11f7b3fa6ad8a458b4648a433a1fbf81
BLAKE2b-256 e7a3bbc632002418bd07417c103627345211df06c9c9ee66ace7457363b21b64

See more details on using hashes here.

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

Hashes for exomodel-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a01957f071e823c70b14dd6e74b4ee610fbd74f143cbd6e10a9dcc1d8c346b2
MD5 e1cd32112a694e5d96779a6023362fb4
BLAKE2b-256 0fdd4d2bb61679984da1a5525d44b9fd27b299ec88915e783798264aa08f6987

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