AdaptIQ โ Adaptive Optimization Framework for AI Agents โ Optimize behaviors, reduce resource usage, and accelerate learning with low-cognitive reinforcement tuning.
AdaptIQ uses reinforcement learning to automatically optimize your AI agents. Point it at your agent's logs, and it learns which actions work best in different situations, reducing costs by 30% while improving performance.
Key Benefits: Lower costs, better performance, data-driven optimization
Current Support: CrewAI (only supported framework) + OpenAI (more coming soon)
- ๐ค Why AdaptiQ?
- โก Quick Start
- โจ Features
- ๐ง How It Works (RL + Q-table)
- ๐๏ธ Architecture
- ๐ Reporting Mode
- ๐ Leaderboard (agents)
- ๐ฏ Bench my agent
- ๐ผ๏ธ AdaptIQ Image Generation Benchmark
- ๐ฎ What's Next
- โ๏ธ Upgrade Path โ AdaptiQ FinOps Cloud
- ๐บ๏ธ Roadmap
- ๐ค Community & Contributing
- ๐ License
AdaptIQ addresses the critical challenge of optimizing AI agent performance through intelligent, data-driven approaches. Our framework transforms the traditionally manual and error-prone process of agent tuning into a systematic, reinforcement learning-powered optimization workflow that learns from execution patterns and continuously improves agent behavior while reducing costs and resource consumption.
Pain point | Traditional workaround | AdaptiQ advantage |
---|---|---|
Prompt/agent errors discovered after expensive runs | Manual review, trialโandโerror | Detects & fixes issues before execution |
GPU/LLM cost spikes | Spreadsheet audits | Predicts โฌ & COโ inline |
No common prompt style | Word/PDF guidelines | Enforced by lint rules, autofixable |
Dev โ FinOps gap | Slack + eโmails | Same CLI / dashboard for both teams |
Before installing AdaptIQ, ensure you have:
- Python 3.12+ - Required for AdaptIQ framework
- CrewAI framework - Set up and configured for your agents (only supported framework)
- OpenAI API key - For LLM provider access
- Windows OS - Linux and Mac support not tested yet
First, install UV package manager:
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
โ ๏ธ Note: Linux and Mac support is not tested yet. We recommend using Windows for now.
Then activate your virtual environment and install AdaptIQ:
uv pip install adaptiq
For development mode:
uv pip install -e .
Initialize a new project:
adaptiq init --name name_project --template framework_template --path ./my_project
๐ Note: Only CrewAI is supported as the framework template currently.
This will initialize a project with adaptiq_config.yml
that you should configure.
Validate your configuration:
adaptiq validate --config_path adaptiq_yml_path --template framework_template
AdaptIQ will run the optimization process automatically once the agent is in execution.
๐ Important: AdaptIQ currently supports only CrewAI as the agentic framework, OpenAI as the provider, and GPT-4.1 and GPT-4.1-mini as the LLMs for the workflow. Other models and frameworks have not been tested yet.
Category | Free | Cloud (SaaS) |
---|---|---|
๐ง YAML validation | โ | โ |
๐ Prompt & agent lint rules | โ | โ |
๐ฐ Preโrun cost | โ | โ |
๐ค RLโpowered optimisation suggestions | โ | โ |
๐ญ Automatic optimisation at scale | โ | โ |
๐ GPUโspot arbitrage, ESG ledger | โ | โ |
๐ Multiโtenant FinOps dashboard | โ | โ |
ADAPTIQ is a framework designed for the iterative improvement of AI agent performance through offline Reinforcement Learning (RL). Its primary goal is to systematically enhance an agent's guiding Configuration, focusing mainly on its Task Description (Prompt), by learning from the agent's past execution behaviors and incorporating user validation. It provides a structured, data-driven alternative to purely manual prompt engineering.
Adaptiq's mission is to optimize agent behavior by refining its core instructions (prompts/task descriptions). It achieves this by analyzing what an agent intended to do (from its prompt), what it actually did (from execution logs), and how effective those actions were (via a multi-faceted reward system). It is especially suited for agents using frameworks like CrewAI, LangChain, etc., where direct, real-time RL control is often impractical.
Represents the agent's situation at a specific step, defined by features like:
- Current_SubTask: The immediate objective
- Last_Action_Taken: The previous validated ARIC strategic action
- Last_Outcome: The validated result of the previous action
- Key_Context: Accumulated relevant information (validated flags/data)
States are transformed into consistent, hashable representations for Q-table storage, potentially using generalization techniques.
A selection from a predefined menu of discrete, strategic actions (e.g., Use_Tool_X, Action_Write_Content). Adaptiq maps observed log events to these predefined actions.
The core knowledge base: Q(state_representation, action) โ value
. It stores the learned long-term value of taking an action in a specific state, refined through the Adaptiq loop.
Calculated offline during/after trace reconciliation. It incorporates:
- Plan Adherence: How well the actual execution matched the intended plan from prompt parsing
- Execution Success (R_execution/internal): Based on tool outcomes, task progress, constraint adherence, and output quality from the logs
- External Feedback (R_external - Optional): Real-world impact metrics (e.g., email open rates, conversions). To be implemented soon (now as external feedback only human feedback of user's evaluation of the agent after adaptiq optimization)
Adaptiq employs a multi-stage approach:
-
Prompt Parsing: An LLM-powered module analyzes the agent's task description to extract the intended sequence of sub-tasks and actions
-
Hypothetical State Generation: Uses the prompt parser's output to define idealized states and actions for heuristic Q-table initialization
-
Log Parsing: Module parses raw execution logs to identify actual agent thoughts, tool calls, and outcomes
-
Reconciliation: A central facilitates the alignment of the intended plan with actual execution. It allows the user to:
- Validate/correct inferred states and actions
- Confirm/override calculated rewards
- Refine the understanding of the agent's behavior
This produces the mapping data.
Lightweight Qโtable examples:
State | Action | Qโvalue |
---|---|---|
('InformationRetrieval_Company', 'None', 'None', 'company info') |
FileReadTool | 0.6 |
('InformationRetrieval_Lead', 'FileReadTool', 'Success_DataFound', 'company info lead name') |
LeadNameTool | 0.7 |
('ActionExecution_SendEmail', 'Write_Email_Body', 'Success_ActionCompleted', 'email sent lead') |
SendEmailTool | 0.7 |
('ResultFinalization', 'SendEmailTool', 'Success_ActionCompleted', 'email content final answer') |
Formulate_Final_Answer | 0.8 |
AdaptIQ offers flexible reporting options:
- Save optimization reports locally as Markdown
- Detailed performance metrics and recommendations
- Offline analysis capabilities
- Send comprehensive reports to your email
- URL-based report sharing
- Real-time optimization insights (multiple)
๐ Privacy Note: When you provide your email in the YAML config, you acknowledge that we can process your data according to our privacy policy.
A comprehensive evaluation system to benchmark your agents based on specific KPIs (Health Learning Index HLI). Agents working on the same tasks can anonymously compare their performance, fostering continuous improvement and healthy competition in the AI agent community. This system helps maintain agent quality in production environments through continuous monitoring and benchmarking.
๐ Build better AI agents. Use AdaptiQ and see your Agent Learning Health Index
โ๏ธ | Benefit | Description |
---|---|---|
๐ Social proof | Public badge increases repo trust | |
๐ฐ FinOps insight | Cost โฌ/k-token & COโ/tkn surfaced instantly | |
๐ Security gate | Evaluator flags jailbreaks & PII leaks before prod | |
โป๏ธ Continuous learning | LHI tracks the agent's health across versions |
The AdaptIQ Image Generation Benchmark is a comprehensive evaluation suite designed to measure and optimize image generation agents using reinforcement learning. This benchmark demonstrates AdaptIQ's effectiveness in reducing costs while maintaining quality across creative AI tasks.
Given target synthetic images, agents must reproduce them with maximum fidelity at minimum cost. Our benchmark uses a paired design comparing baseline CrewAI + GPT-4.1 agents against AdaptIQ-optimized versions using the same technology stack enhanced with runtime RL optimization.
Metric | Baseline | AdaptIQ | Improvement | p-value |
---|---|---|---|---|
Latency (s) | 13.94 | 11.85 | -15.0% | < 0.001 |
Cost (USD/img) | 0.0099 | 0.0086 | -13.6% | < 0.001 |
Tokens (count) | 8347 | 7459 | -10.6% | 0.366 (ns) |
Quality (CLIP) | 91.18 | 91.01 | -0.17 | target โฅ 0 |
Efficiency Score | 658.87 | 895.44 | +35.9% | - |
- Models: OpenAI GPT-4.1 + FLUX-1.1-pro (image generation)
- Quality Metric: CLIP ViT-B/32 similarity scoring
- Test Images: Curated dataset from Pinterest (research use)
- RL Architecture: Q-learning with state-action optimization
- Cost Reduction: 13.6% savings per image generation
- Speed Improvement: 15% faster execution with 2.09s average reduction
- Stability: 2.8ร lower token usage variance for predictable performance
- Quality Preservation: Near-parity quality with minimal CLIP score difference
Check out our benchmark repository: https://github.com/adaptiq-ai/adaptiq-benchmark
๐ Note: Additional benchmarks for RAG systems, coding agents, knowledge graphs, and other optimization capabilities will be added as new features are implemented.
- ๐ Support for More Models and Providers: Expanding compatibility beyond OpenAI to include other LLM providers and models
- ๐ Context Engineering Optimization: Advanced prompt and context management through Q-learning
- ๐ Prompt Optimization Workflow: Implementing external rewards data type and tool tracking and evaluation
- ๐ Q-Table Strategy for RAG Systems: Learn which effective chunks reduce cost and increase speed
- ๐ป Coding Agent Enhancement: Enhancing coding capabilities by using Q-learning for code generation patterns, debugging workflows, and repository context management
- ๐ง Memory Layer Integration: Q-table learns optimal context retention patterns - storing frequently accessed information states and reducing redundant retrievals through intelligent caching strategies
- ๐ Knowledge Graph Integration: Dynamic relationship mapping between entities and concepts for contextually-aware agent decisions
- ๐ External Context Integration APIs: Seamless integration with CRM, databases, and third-party tools for enriched contextual understanding
- ๐ก๏ธ Governance & Constraints:
- ๐ง Guardrails: Q-learning enforced safety boundaries and compliance rules
- ๐ Access Control: Context-aware permission management
- ๐ Policy Enforcement: Automated adherence to organizational guidelines and industry standards
- ๐ฑ Q-Table for Edge Devices: Optimizing AI models performance to work better on resource-constrained devices
- ๐ Additional Benchmarks: Expanding evaluation coverage with new benchmark suites for text generation, code generation, data analysis, and multi-modal tasks
Need handsโfree optimisation across hundreds of projects? ๐ข
AdaptiQ FinOps Cloud adds:
- ๐ค Autoโtuning RL in production
- ๐ GPUโspot arbitrage
- ๐ฑ ESG & carbon ledger
- ๐ฅ Roleโbased dashboards (Dev / FinOps / Cโsuite)
๐ 30โday free trial โ migrate in one CLI command.
Contact us for more information via email
Quarter | Milestone |
---|---|
Q3 2025 | ๐ Support for More Models and Providers & Cost optimization via LLM routing |
Q4 2025 | ๐ Context Engineering Optimization: Memory Layer, Knowledge Graphs, External API Integration |
2026 | ๐ฑ Edge SDK (quantised Qโtable <16 MB), ๐ก๏ธ Governance & Constraints framework, GPUโSpot optimiser |
Vote or propose features in discussions/
. ๐ณ๏ธ
We โค๏ธ PRs: bug fixes, lint rules, language support.
See CONTRIBUTING.md
.
- ๐ฌ Discord: #adaptiq (roadmap call 1st Tuesday)
- ๐ฆ X/Twitter: @adaptiq_ai
AdaptIQ is currently in beta version. We welcome any issues, bug reports, or contributions to improve the framework! Your feedback helps us build a better tool for the AI agent community. ๐
Please feel free to:
- ๐ Report bugs via GitHub Issues
- ๐ก Suggest new features
- ๐ค Contribute code improvements
- ๐ Improve documentation
Together, we can make AdaptIQ the best optimization framework for AI agents! ๐
If you use AdaptIQ in your research, project, or commercial application, please cite us:
@software{adaptiq2025,
title={AdaptIQ: Adaptive Optimization Framework for AI Agents},
author={AdaptIQ AI Team},
year={2025},
url={https://github.com/adaptiq-ai/adaptiq},
note={Adaptive Optimization Framework for AI Agents with Reinforcement Learning}
}
AdaptIQ AI Team. "AdaptIQ: Adaptive Optimization Framework for AI Agents." GitHub, 2025, https://github.com/adaptiq-ai/adaptiq.
If you publish research using AdaptIQ, we'd love to hear about it! Please:
- ๐ง Email us at research@getadaptiq.io
- ๐ฆ Tag us on Twitter @adaptiq_ai
- ๐ฌ Share in our Discord #research channel
- Code: Apache 2.0 License ๐
- RL weights & FinOps Cloud components: proprietary
ยฉ 2025 AdaptiQ AI. All trademarks belong to their respective owners.