Skip to content

Releases: MaitreyaM/Clap-Agents

ADDED STREAMABLE HTTP SUPPORT FOR MCP AND BACKWARD compatibleSSE/STDIO SUPPORT

26 Aug 16:33

Choose a tag to compare

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

17 May 17:38

Choose a tag to compare

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 Agent and ToolAgent.
  • VectorStoreInterface for abstracting vector database interactions.
  • ChromaStore implementation for ChromaDB.
  • QdrantStore implementation for Qdrant (local mode, supporting custom EFs and fastembed wrapper).
  • EmbeddingFunctionInterface and concrete implementations:
    • SentenceTransformerEmbeddings
    • OllamaEmbeddings
    • FastEmbedEmbeddings
  • Ollama Compatibility Now 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

  • ToolAgent and Agent now require llm_service and model to be explicitly passed during initialization.
  • Refined prompts for ReactAgent for better tool usage and RAG.
  • Improved error handling and logging in various components.

Fixed

  • Resolved various import errors and NameError issues in examples and core files.
  • Fixed argument type mismatches for LLM tool calls.