Releases: MaitreyaM/Clap-Agents
Releases · MaitreyaM/Clap-Agents
ADDED STREAMABLE HTTP SUPPORT FOR MCP AND BACKWARD compatibleSSE/STDIO SUPPORT
Now the MCPClientManager supports streamable HTTP FOR CLAP AGENTS !!
ALSO ADDED
- backward compatibility for sse
- STDIO for those who prefer local testing
Below is an example on how to use the new MCP client:
import asyncio
import os
from dotenv import load_dotenv
from pydantic import HttpUrl
from clap import ReactAgent
from clap import MCPClientManager, ServerConfig, TransportType
from clap import tool
from clap import GroqService
# @tool
# def multiply(a: int, b: int) -> int:
# """Subtracts integer b from integer a."""
# print(f"[Local Tool] Multiplying: {a} * {b}")
# return a * b
async def main():
load_dotenv()
groq_llm_service = GroqService()
server_configs = {
"adder_server": ServerConfig(
transport=TransportType.SSE,
url=HttpUrl("http://localhost:8000") # Base URL, client adds /sse
),
"subtract_server": ServerConfig(
transport=TransportType.STDIO,
command="python",
args=["/Users/maitreyamishra/PROJECTS/Cognitive-Layer/simple2_mcp.py", "/Users/maitreyamishra/PROJECTS/Cognitive-Layer"]),
"multiply_server": ServerConfig(
transport=TransportType.STREAMABLE_HTTP,
url=HttpUrl("http://localhost:8001/mcp")),
}
manager = MCPClientManager(server_configs)
agent = ReactAgent(
llm_service=groq_llm_service,
model="llama3-70b-8192",
mcp_manager=manager,
mcp_server_names=["adder_server","subtract_server","multiply_server"],
)
user_query = "Calculate ((15 + 7) - 5) * 2"
response = await agent.run(user_msg=user_query)
print(response)
await manager.disconnect_all()
asyncio.run(main())
RAG functionalities and Ollama Compatibility
Release version 0.2.1
[0.2.1] – 2025-05-17
Fixed
- Import errors
- Corrected type signatures in
QdrantStore.create.
Changed
- Improved error handling in
clap.tools.email_tools. - Refined docstrings across the vector store implementations.
[0.2.0] - 2025-05-16
Added
- RAG (Retrieval Augmented Generation) capabilities for
AgentandToolAgent. VectorStoreInterfacefor abstracting vector database interactions.ChromaStoreimplementation for ChromaDB.QdrantStoreimplementation for Qdrant (local mode, supporting custom EFs and fastembed wrapper).EmbeddingFunctionInterfaceand concrete implementations:SentenceTransformerEmbeddingsOllamaEmbeddingsFastEmbedEmbeddings
Ollama CompatibilityNow run Ollama models locally (both embedding and chat).- PDF and CSV loading utilities in
rag_utils. - Argument type coercion in
Tool.run()for robustness.
Changed
ToolAgentandAgentnow requirellm_serviceandmodelto be explicitly passed during initialization.- Refined prompts for
ReactAgentfor better tool usage and RAG. - Improved error handling and logging in various components.
Fixed
- Resolved various import errors and
NameErrorissues in examples and core files. - Fixed argument type mismatches for LLM tool calls.