CrewAI integration
CrewAI prompt compression
CrewAI orchestrates multiple AI agents that collaborate on tasks. Each agent call accumulates context, making CrewAI crews particularly expensive. SuperCompress compresses agent context before every LLM call.
The CrewAI token problem
A CrewAI crew with 3 agents making 5 calls each per task, with 2,000 tokens per call, burns 30,000 tokens per task. At 100 tasks/day, that is 3M tokens — ~$7.50/day on GPT-4o. Compression cuts this to ~$2.60/day.
Integration with CrewAI
from crewai import Agent, Task, Crew
from supercompress import Compressor
comp = Compressor()
class CompressedAgent(Agent):
def execute_task(self, task, context=None, tools=None):
if context:
result = comp.compress(context, task.description)
context = result.compressed_text
return super().execute_task(task, context, tools)
Frequently asked questions
Does compression affect agent collaboration?
No. Only irrelevant context is removed. The compressed context retains all information needed for agent cooperation.
Can I use it with CrewAI's hierarchical process?
Yes. Compression works at the individual agent level, regardless of the CrewAI process type.
Try it yourself
Paste your long prompt into the playground, ask a question, and see what SuperCompress keeps and removes. Free, no signup needed.