TAgent is a Java study project built on Spring Boot and organised in a Domain-Driven Design layout. The README, written in Chinese, presents it as a learning platform for AI agents that strings together model calls, agent orchestration, MCP tools, retrieval-augmented generation, a memory system, observability, and cost tracking into one runnable example. The repository is described as a cleaned public version of an internal project, with logs, conversation history, private documents, backup SQL, browser state, and real keys removed; sensitive settings are read from environment variables. It offers two styles of agent. Auto Agent analyses an incoming task, plans the steps, calls tools, runs a quality check, and writes a summary. Flow Agent runs a fixed sequence of steps and supports parallel execution as a directed acyclic graph. A routing layer in front of them picks which style to use based on intent. For knowledge work, the project supports RAG with three retrieval modes: semantic search through Postgres with pgvector, keyword search through Elasticsearch using BM25, and a hybrid mode with a re-ranking step. The memory system covers short-term session memory, long-term memory, episodic memory, and a working-memory extension. External tools are plugged in through the Model Context Protocol over either SSE or stdio. There is also a security layer that handles approval for sensitive tools, PII masking, output review, idempotent request handling, and rate limiting. The codebase is split into a set of Maven modules following the DDD pattern: an api module for outward-facing DTOs, an app module with the Spring Boot entry point and MyBatis mappings, a domain module that holds the agent and routing logic, an infrastructure module for data access, a trigger module for HTTP controllers, and a types module for common types and scheduling primitives. Example MCP servers ship in their own modules. Running it requires MySQL, PostgreSQL with pgvector, Redis, Elasticsearch, Logstash, and a Jaeger OTLP endpoint, all at preset local ports. After mvn package, you start the jar from the app module on port 8099 and reach the chat page, an agent configuration page, and an observability page over HTTP, with the Auto Agent endpoint streaming responses over Server-Sent Events.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.