Skip to main content

Agentics is a Python framework that provides structured, scalable, and semantically grounded agentic computation.

Project description

Agentics

Transduction is all you need

Agentics is a Python framework that provides structured, scalable, and semantically grounded agentic computation. It enables developers to build AI-powered pipelines where all operations are based on typed data transformations, combining the power of Pydantic models and LLMs with the flexibility of asynchronous execution.

Getting started

Learn how to install Agentic, set up your environment, and run your first logical transduction. Getting Started

Authors

Agentics is an implementation of Logical Transduction Algebra, described in

  • Alfio Gliozzo, Naweed Khan, Christodoulos Constantinides, Nandana Mihindukulasooriya, Nahuel Defosse, Junkyu Lee. Transduction is All You Need for Structured Data Workflows. August 2025, arXiv:2508.15610

We welcome new AG entusiasts to extend this framework with new applications and extension to the language.

🚀 Key Features

Typed Agentic Computation: Define workflows over structured types using standard Pydantic schemas.

Logical Transduction (<<): Transform data between types using LLMs with few-shot examples, tools, and memory.

Async Mapping and Reduction: Apply async mapping (amap) and aggregation (areduce) functions over datasets.

Batch Execution & Retry: Automatically handles batch-based asynchronous execution with graceful fallback.

Domain Customization

  • Prompt Templates Customize prompting behavior and add ad-hoc instructions
  • Memory Augmentation: Use retrieval-augmented memory to inform transduction.

Built-in Support for Tools: Integrate LangChain tools or custom functions.

Tutorial

Notebook Description
LLMs Basics
Agentic Basics Step by step guide illustrating how to make a new AG, access and print its content, import and export it to files
Transduction Demonstrate the use of logical transduction (<<) in Agentics
Amap Reduce Try out MapReduce in Agentics to scale out
MCP Tools

🚀 Documentation

👉 Getting Started: Learn how to install Agentic, set up your environment, and run your first logical transduction.

🧠 Agentics: Explore how Agentics wraps pydantic models into transduction-ready agents.

🔁 Transduction: Discover how the << operator implements logical transduction between types and how to control its behavior.

🛠️ Tools: Learn how to integrate external tools (e.g., LangChain, CrewAI) to provide access to external data necessary for logical transduction.

📘 Example Usage

from agentics import AG
from pydantic import BaseModel

class Answer(BaseModel):
    answer: str
    justification: str
    confidence: float

# Instantiate an Agentics object with a target type
qa_agent = AG(atype=Answer)

# Perform transduction from text prompts
qa_agent = await (qa_agent << [
    "Who is the president of the US?",
    "When is the end of the world predicted?",
    "This is a report from the US embassy"
])

# Access structured answers
for result in qa_agent.states:
    print(result.answer, result.confidence)

🧠 Conceptual Overview

Agentics models workflows as transformations between typed states. Each instance of Agentics includes:

atype: A Pydantic model representing the schema.

states: A list of objects of that type.

Optional llm, tools, prompt_template, memory.

Operations:

amap(func): Applies an async function over each state.

areduce(func): Reduces a list of states into a single value.

<<: Performs logical transduction from source to target Agentics.

🔧 Advanced Usage

Customizing Prompts

agent.prompt_template = """ You are an assistant that extracts key information. Please respond using the format {answer}, {justification}, {confidence}. """

📚 Documentation

Full documentation and examples are available at:

🧪 Tests

Run all tests using:

uv run pytest

Examples

Run all scripts in example folder using uv

uv run python examples/hello_world.py

$ 📄 License

Apache 2.0

👥 Authors

Developed by Alfio Gliozzo and contributors.

Contributions welcome!

Core team Alfio Gliozzo, Junkyu Lee, Naweed Aghmad, Nahuel Defosse, Christodoulos Constantinides, Mustafa Eyceoz and contributors.

Contributing

Your commit messages should include the line:

Signed-off-by: Author Name <authoremail@example.com>

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

agentics_py-0.2.0a2.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

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

agentics_py-0.2.0a2-py3-none-any.whl (48.2 kB view details)

Uploaded Python 3

File details

Details for the file agentics_py-0.2.0a2.tar.gz.

File metadata

  • Download URL: agentics_py-0.2.0a2.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentics_py-0.2.0a2.tar.gz
Algorithm Hash digest
SHA256 f5aca923efaef9c228037dcb27dddbfee0ad0098c13be08103dd2d5b910520bf
MD5 c5ebe3852660b0aef790141e13f93d25
BLAKE2b-256 24fb6913066bca20e8e58fdb5a3a8fd13aaece08b42115a225db02f990ea0e7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentics_py-0.2.0a2.tar.gz:

Publisher: pypi.yaml on IBM/Agentics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentics_py-0.2.0a2-py3-none-any.whl.

File metadata

  • Download URL: agentics_py-0.2.0a2-py3-none-any.whl
  • Upload date:
  • Size: 48.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentics_py-0.2.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 92d4dce81617330a27732fbba238b09132fd94d7d376ef61e63fa05f788a190a
MD5 64feaf4c3ca5328190d76a7a7bf9d150
BLAKE2b-256 565bf7125a421e7c084d1144d28fdee615cb7ca89e9a570d2f667eca32196c99

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentics_py-0.2.0a2-py3-none-any.whl:

Publisher: pypi.yaml on IBM/Agentics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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