Agno (Phidata) integration

Agno prompt compression

Agno (formerly Phidata) provides a powerful agent framework with knowledge bases, tools, and memory. SuperCompress integrates with Agno to compress context before each agent run.

By Arjun Shah - Creator of SuperCompress - Updated 2026-07-03

Integration

from agno.agent import Agent
from supercompress import Compressor

comp = Compressor()

agent = Agent(
    name="CompressedAgent",
    instructions="You are a helpful assistant.",
    show_tool_calls=True,
)

def run_compressed(agent, message):
    # Compress the context against the user message
    context = "\n".join(agent.memory.messages)
    result = comp.compress(context, message)
    agent.memory.messages = [result.compressed_text]
    return agent.run(message)

Frequently asked questions

Does it work with Agno's knowledge base?

Yes. Compress retrieved knowledge base content before passing it to the agent.

Can I use it with Agno's tool calls?

Yes. The compressor preserves tool descriptions and function schemas.

Try it yourself

Paste your long prompt into the playground, ask a question, and see what SuperCompress keeps and removes. Free, no signup needed.

Open the Playground Embed the badge