CircuitManus: A Python-Based General Agent Platform 85

小编 ·

CircuitManus: A Python-Based General Agent Platform

CircuitManus is a Python-based platform primarily designed for circuit design but extensible to other domains. It combines LLMs with multiple tools to automate complex tasks. Following a classic perceive–plan–act–observe–respond loop, it offers robust error handling and self-correction. A FastAPI WebSocket server and a modern web UI enable real-time frontend-backend interaction, with optimizations for Windows.

CircuitManus: A Python-Based General Agent Platform

What is CircuitManus?

CircuitManus is a platform developed in Python, primarily used for circuit design, but it can also be extended to other domains. It combines large language models with a variety of tools to help automate complex tasks. The platform is based on a classic model that includes perception, planning, action, observation, and response stages, and also features solid fault tolerance and self-correction capabilities. In addition, it comes equipped with a FastAPI WebSocket server and a modern web interface, ensuring real-time interaction between the backend and frontend, and has been optimized for the Windows environment.

CircuitManus: A Python-Based General Agent Platform.webp

Core Features of CircuitManus

  • General Agent Architecture: Follows the classic agent loop model of Perception -> Planning -> Action -> Observation -> Response Generation, with strong fault tolerance and self-correction capabilities, empowering and automating various complex tasks by integrating large language models (LLMs) and an extensible tool set.

  • Circuit Design Tool Set: The first batch of tool sets focuses on the circuit design domain, including 11 tools such as adding components, connecting components, describing circuits, and clearing circuits, which can perform circuit design-related operations through natural language instructions.

  • Real-Time Interactive Web Interface: Integrates a FastAPI WebSocket server and a modern Web UI, providing a complete intelligent interaction experience, supporting real-time interaction, session management, dynamic status display, and more.

  • Intelligent Planning and Re-planning: Uses LLM to understand complex instructions and generate structured JSON plans. When a tool execution fails, it can automatically re-plan to improve task success rates.

  • Precise Tool Execution and Fault Tolerance: Supports dynamic tool registration, asynchronous tool execution, tool-level retries, and failure aborts, ensuring system stability and reliability.

  • State and Memory Management: Adopts a hierarchical memory system to manage short-term conversation history and long-term knowledge snippets, and can hold domain-specific state objects, such as circuit instances.

  • Engineering Practice Advantages: Adopts engineering practices such as a Pythonic asynchronous core, highly modular design, and detailed hierarchical logging to improve code maintainability and extensibility.

Technical Architecture of CircuitManus

  • Backend: Based on Python 3.8+, uses FastAPI to build a WebSocket server, integrates Zhipu ai's glm-z1-flash model for LLM interaction, and uses asyncio for asynchronous processing.

  • Frontend: Built with HTML5, CSS3, and vanilla JavaScript to deliver a modern Web UI with real-time interaction and dynamic status display.

  • Tool Set: Tools are separated by functional domain, making it easy to extend tools for new domains. Currently, it includes two major categories of tools: circuit operations and web search.

  • Memory Management: A hierarchical memory system that manages conversation history and domain-specific state, supporting domain-agnostic core orchestration logic.

Deployment Steps for CircuitManus

1. Clone the Repository

git clone https://github.com/singularguy/CircuitManus
cd IDT_AGENT_NATIVE

2. Create and Activate a Virtual Environment

python -m venv venv
.\venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure the API Key

Add your Zhipu AI API key to the .env file:

ZHIPUAI_API_KEY="YOUR_ZHIPU_API_KEY"

Project Link

https://github.com/singularguy/CircuitManus