Skip to main content

Create Agents AI

Production-oriented Python library for building conversational AI agents with pluggable providers, extensible tools, conversation history, and metrics following Clean Architecture.

Python PyPI version CI Pipeline codecov License Code style: Ruff Checked with mypy

Documentation • Quick Start • API Reference • Contributing • Security • License


Overview

Create Agents AI (createagents) is a modular and extensible Python framework designed to build intelligent, testable conversational agents. Built on Clean Architecture and SOLID principles, it provides strict provider isolation, automatic conversation history, tool integration, metrics export, and an interactive terminal CLI.

Project status: Beta. APIs and behavior may evolve as the project matures.

Key Capabilities

  • Clean Architecture: Inward dependency flow with business logic isolated from external frameworks and providers.
  • Pluggable Providers: First-class support for OpenAI and Ollama (local and private on localhost).
  • Extensible Tools: Standard BaseTool interface with built-in date/time and secure local file reading.
  • Contextual History: Automatic multi-turn conversation memory management.
  • Metrics Export: Export interaction metrics to JSON and Prometheus formats without requiring external daemons.
  • Silent by Default: Zero unsolicited console logging until explicitly enabled via LoggingConfig.
  • Type Safety & Quality: The codebase is type-checked with mypy, verified with Ruff and Bandit, and covered by automated test gates.

Supported Providers

Provider Status Prerequisites
OpenAI Supported OPENAI_API_KEY environment variable
Ollama Supported Reachable Ollama instance (no API key required on localhost)

Installation

For End Users

Install the latest published package from PyPI:

# Standard installation
pip install createagents

# With file-reading tools (PDF, Excel, CSV, Parquet)
pip install 'createagents[file-tools]'

For Development and Contributors

Clone the repository and use uv for reproducible dependency resolution:

git clone https://github.com/jordanestralioto/Create-Agents-AI.git
cd Create-Agents-AI

# Install all locked dependencies
uv sync --locked

# Or include optional file-tools
uv sync --locked --extra file-tools

See CONTRIBUTING.md and the Developer Contribution Guide for full instructions.


Quick Start

1. OpenAI Agent

Set your API key:

export OPENAI_API_KEY="your-openai-api-key-here"

Note: Replace "YOUR_MODEL" below with your desired OpenAI model identifier.

import asyncio
from createagents import CreateAgent


async def main() -> None:
    # Initialize the agent
    agent = CreateAgent(
        provider='openai',
        model='YOUR_MODEL',
        instructions='You are a helpful and concise software engineering assistant.',
    )

    # Send a message
    response = await agent.chat('How do I structure a Python project?')
    print(response)


if __name__ == '__main__':
    asyncio.run(main())

2. Local Ollama Agent

Ensure your Ollama server is running and pull your preferred model:

# Pull model and start the Ollama server
ollama pull YOUR_OLLAMA_MODEL
ollama serve

Note: Replace "YOUR_OLLAMA_MODEL" with a locally installed model name.

import asyncio
from createagents import CreateAgent


async def main() -> None:
    # Initialize local Ollama agent
    agent = CreateAgent(
        provider='ollama',
        model='YOUR_OLLAMA_MODEL',
        instructions='You are a local private assistant.',
    )

    response = await agent.chat('Explain Clean Architecture in two sentences.')
    print(response)


if __name__ == '__main__':
    asyncio.run(main())

Built-in Tools

Create Agents AI includes standard tools out of the box and supports custom extensions through BaseTool.

Tool Name Class Description Requirements
currentdate CurrentDateTool Current date/time across any IANA timezone Built-in
readlocalfile ReadLocalFileTool Reads local text, markdown, CSV, Excel (.xlsx, .xlsm, and .xls subject to reader availability), PDF, and Parquet pip install 'createagents[file-tools]'

Using Tools

import asyncio
from createagents import CreateAgent


async def main() -> None:
    agent = CreateAgent(
        provider='openai',
        model='YOUR_MODEL',
        tools=['currentdate'],
    )

    # The agent automatically determines when to call the tool
    response = await agent.chat(
        'What is the current time in America/New_York?'
    )
    print(response)


if __name__ == '__main__':
    asyncio.run(main())

Configuration & Environment

Environment Variables

Variable Scope Purpose
OPENAI_API_KEY OpenAI Required API authentication token
OPENAI_TIMEOUT OpenAI Request timeout in seconds
OPENAI_MAX_RETRIES OpenAI Maximum retry attempts for failed requests
OPENAI_MAX_TOOL_ITERATIONS OpenAI Maximum tool execution loops per chat turn
OLLAMA_HOST Ollama Ollama server host URL (default: http://localhost:11434)
OLLAMA_MAX_RETRIES Ollama Maximum retry attempts for Ollama requests
OLLAMA_MAX_TOOL_ITERATIONS Ollama Maximum tool execution loops per chat turn
LOG_LEVEL Logging Base logging level (DEBUG, INFO, WARNING, ERROR)
LOG_TO_FILE Logging Enable writing logs to disk (true/false)
LOG_FILE_PATH Logging Destination path for log files
LOG_JSON_FORMAT Logging Format logs as structured JSON (true/false)
FILE_TOOL_BASE_DIR File Tool Restricts readlocalfile access to a sandbox directory

Agent Runtime Configuration

from createagents import CreateAgent

config = {
    'temperature': 0.7,  # Allowed range: 0.0 to 2.0
    'max_tokens': 1500,  # Positive integer
    'top_p': 0.9,  # Allowed range: 0.0 to 1.0
    'stream': False,  # Enable token-by-token streaming
}

# Provider-specific reasoning/thinking options:
# Ollama: think=True/False or "low"|"medium"|"high"
# OpenAI: think="low"|"medium"|"high" (on supported reasoning models)

agent = CreateAgent(
    provider='openai',
    model='YOUR_MODEL',
    instructions='Be technical and concise.',
    config=config,
    history_max_size=20,
)

Logging & Metrics

Silent Library Logging

The library installs a NullHandler and remains completely silent by default. Consumers can opt into logging during development or configure handlers explicitly:

import logging
from createagents import LoggingConfig

# Enable console logging for development
LoggingConfig.configure_for_development(level=logging.INFO)

Metrics Export

Collect and export interaction metrics (latency, token counts, model calls) to structured JSON or Prometheus format strings and files:

from createagents import CreateAgent

agent = CreateAgent(provider='openai', model='YOUR_MODEL')

# Retrieve metrics objects
metrics = agent.get_metrics()

# Export metrics to JSON or Prometheus format files/strings
agent.export_metrics_json('metrics.json')
agent.export_metrics_prometheus('metrics.prom')

Note: The package exports metrics formatted for Prometheus scraping or file collectors; it does not run a background Prometheus HTTP server or monitoring daemon.


Architecture

Create Agents AI is structured around strict Clean Architecture boundaries:

┌────────────────────────────────────────────────────────────┐
│ MAIN (Composition Root & Facade)                           │
│ CreateAgent: src/createagents/main/facade/client.py        │
│ AgentComposer: src/createagents/main/composers/            │
└──────────────────────────────┬─────────────────────────────┘
                               │ wires and injects dependencies
        ┌──────────────────────┼──────────────────────┐
        │                      │                      │
        ▼                      ▼                      ▼
┌───────────────┐   ┌────────────────┐   ┌────────────────────────┐
│ PRESENTATION  │   │ APPLICATION    │   │ INFRASTRUCTURE         │
│ CLI Terminal  │──▶│ Use Cases      │◀──│ Adapters & Factories   │
│ Application   │   │ DTOs & Ports   │   │ (OpenAI, Ollama, Tools)│
└───────────────┘   └───────┬────────┘   └────────────────────────┘
                            │ depends only on
                            ▼
                    ┌────────────────┐
                    │ DOMAIN         │
                    │ Entities/Rules │
                    └────────────────┘
  • Domain: Pure business entities, value objects, and domain exceptions. No external dependencies.
  • Application: Use cases, DTOs, and interface ports (e.g. ChatRepository). Depends solely on Domain.
  • Infrastructure: Concrete adapters implementing application ports (OpenAI, Ollama, tools, logging, metrics).
  • Presentation: Interactive terminal CLI consuming the application facade lazily.
  • Main: Composition root (AgentComposer) wiring concrete adapters into use cases, and the public CreateAgent facade.

Read the Architecture Developer Guide for full architectural details.


Documentation Directory

The complete documentation suite is published and accessible:

English Documentation (Primary)

Portuguese Documentation


Governance & Community

Support & Contact

  • Maintainer: Jordan Estralioto
  • Email: estraliotojordan@gmail.com
  • Security: Please report security vulnerabilities privately according to SECURITY.md.

Metadata

Release files for createagents 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for createagents 0.3.0
File Size Uploaded
createagents-0.3.0.tar.gz 87.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for createagents 0.3.0
File Interpreter ABI Platform
createagents-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 208.5 kB

Release files / createagents-0.3.0.tar.gz

Download URL createagents-0.3.0.tar.gz
Size 87.7 kB
Tags Source
SHA-256 checksum
How to use checksums
26316f0132a7a0a55995418a4ce04bfce4d60302e01883207ebd9a70e8f7508f
BLAKE2b-256 checksum
How to use checksums
cf5ca0c2605e1db0b9669a13ec4cf99a06d9ee3a059aa9bfd0094786e0f6eb9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / createagents-0.3.0-py3-none-any.whl

Download URL createagents-0.3.0-py3-none-any.whl
Size 120.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f5e71cbbec84fcede849f7578c23a7f3319c91f22f01c5c2dc88587c5546fdb
BLAKE2b-256 checksum
How to use checksums
b39bfa11c52a277296ef514c222dc6091373822c60a78a5048caddc8b74ed98a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page