CAL (Creevo Agent Library)
CAL is a Python library for building agentic AI applications with LLM abstraction, tool management, and conversation memory.
Installation
pip install creevo-agent-library
With MCP support:
pip install "creevo-agent-library[mcp]"
Quick Start
import os
from CAL import Agent, GeminiLLM, StopTool, FullCompressionMemory
# Initialize LLM (uses GEMINI_API_KEY env var when api_key is None)
llm = GeminiLLM(model="gemini-2.5-flash", api_key=None, max_tokens=4096)
# Initialize memory with a summarizer LLM (required for compression)
summarizer_llm = GeminiLLM(model="gemini-2.0-flash", api_key=None, max_tokens=2048)
memory = FullCompressionMemory(summarizer_llm=summarizer_llm, max_tokens=50000)
# Create agent
agent = Agent(
llm=llm,
system_prompt="You are a helpful assistant.",
max_calls=10,
max_tokens=4096,
memory=memory,
agent_name="my-agent",
tools=[StopTool()]
)
# Run agent
result = agent.run("Hello, how can you help me?")
print(result.content)
Architecture
CAL provides:
- Agent: Agentic loop implementation with tool execution
- LLM: Abstract base class with Gemini and Anthropic implementations
- Memory: Conversation memory management with compression support
- Tool: Tool system with
@tooldecorator for easy tool creation - Message: Message and content block types for conversation handling
- Logger: OpenTelemetry and Maxim AI logging support
Components
Agent
The Agent class implements the agentic loop:
- LLM generates response (may include tool calls)
- Parse tool uses from response
- Execute tools in parallel
- Add tool results to memory
- Repeat until completion or max iterations
LLM Providers
GeminiLLM: Google Gemini API integrationAnthropicVertexLLM: Anthropic Claude via Vertex AI (stub)
Memory
FullCompressionMemory: LLM-based compression that keeps initial prompt, summarizes middle turns using an LLM, and keeps recent messages. Requires asummarizer_llmfor compression.
Tools
CAL provides three ways to give an agent tools:
@tool decorator — wrap an async function as a tool:
from CAL import tool
@tool
async def my_tool(param1: str, param2: int):
"""Tool description"""
return {
"content": [{"type": "text", "text": f"Result: {param1}, {param2}"}],
"metadata": {}
}
@subagent decorator — delegate to a specialized sub-agent (see src/CAL/subagent.py).
MCP servers — connect to any Model Context Protocol server
and use its tools as regular CAL tools (install with pip install "creevo-agent-library[mcp]"):
from CAL.mcp import connect_mcp_server, disconnect_mcp_tools
# Returns a list of MCPTool instances — same interface as @tool and @subagent
mcp_tools = await connect_mcp_server(command="npx", args=["-y", "@upstash/context7-mcp"])
agent = Agent(
llm=GeminiLLM(model="gemini-3-flash-preview", api_key="...", max_tokens=4096),
system_prompt="You are a helpful assistant.",
max_calls=10,
max_tokens=4096,
memory=FullCompressionMemory(
summarizer_llm=GeminiLLM(model="gemini-3-flash-preview", api_key="...", max_tokens=2048),
max_tokens=50000,
),
agent_name="mcp-agent",
tools=[StopTool(), *mcp_tools], # mix with any other CAL tools
)
result = await agent.run_async("What does React useEffect do?")
await disconnect_mcp_tools(mcp_tools)
See examples/mcp_context7_agent.ipynb for a full walkthrough.
Documentation
For detailed API documentation, see the wiki.
License
MIT License
Metadata
Release files for creevo-agent-library 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| creevo_agent_library-0.1.0.tar.gz | 58.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| creevo_agent_library-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.3 kB
Release files / creevo_agent_library-0.1.0.tar.gz
| Download URL | creevo_agent_library-0.1.0.tar.gz |
|---|---|
| Size | 58.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ccb5fb7fa929f64a02afed01d1ca04b4c334d113e58b9fdfbb4e7bf9d1001f2
|
|
BLAKE2b-256 checksum How to use checksums |
9e5ee57e6c764d2daf7ba96431df2fa149af27c143c9ccae2b09c0e38d27b055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 28, 2026.
Transparency logRelease files / creevo_agent_library-0.1.0-py3-none-any.whl
| Download URL | creevo_agent_library-0.1.0-py3-none-any.whl |
|---|---|
| Size | 42.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e813c361686b6748a4251c7b1e1a033a07581667d66d6ddb88ce0b11ea9e4e5
|
|
BLAKE2b-256 checksum How to use checksums |
944292edf8094391aa7ec452944b5a732975fd62d96e3974fa02b7e7e532ad69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 28, 2026.
Transparency logSecurity for creevo-agent-library 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for creevo_agent_library-0.1.0.tar.gz
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 Feb 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.