No description
Find a file
2026-01-18 04:31:07 -08:00
packages/client chore(deps): 🔧 Update 4 JSON dependency files 2026-01-17 11:24:38 -08:00
service chore(api): 🔧 Add LLM client configuration options and update API endpoints 2026-01-18 04:31:07 -08:00
.gitignore feat(cot-reasoning): initial implementation of CoT reasoning service 2026-01-12 09:17:59 -08:00
config.yaml chore(llm): 🔧 Update 5 Python files in LLM module 2026-01-17 18:30:29 -08:00
pyproject.toml chore(deps): ⬆️ upgrade from lilith-model-boss to model-boss>=3.0.0 2026-01-17 16:18:21 -08:00
README.md feat(cot-reasoning): initial implementation of CoT reasoning service 2026-01-12 09:17:59 -08:00
uv.lock chore(@ml/cot-reasoning): 🔧 add initial package structure 2026-01-13 03:37:01 -08:00

CoT Reasoning Service

Chain-of-Thought reasoning service with multi-stage pipeline orchestration.

Overview

This service provides configurable multi-stage reasoning pipelines for LLM-based analysis tasks. It abstracts the CoT pattern into a reusable service that can be consumed by other applications.

Architecture

cot-reasoning/
├── service/src/          # Python FastAPI service
│   ├── api/main.py       # FastAPI endpoints
│   ├── config.py         # Configuration (uses service-addresses)
│   ├── reasoning/        # CoT engine and stages
│   └── llm/              # LLM client adapter
├── packages/client/      # @lilith/cot-client TypeScript package
└── pyproject.toml        # Python package definition

Port

Port 8110 is allocated in lilith-platform/infrastructure/ports.yaml under ml.cot-reasoning.

The service uses lilith-service-addresses for runtime port resolution.

Installation

Python Service

pip install cot-reasoning

TypeScript Client

npm install @lilith/cot-client

Usage

Python Service

# Start the service
python -m service

TypeScript Client

import { CoTClient } from '@lilith/cot-client';

// Auto-discovers port from service-addresses
const client = await CoTClient.create();

const result = await client.reason({
  input: 'femboy, catgirl, lawyer',
  stages: ['cultural_analysis'],
});

console.log(result.result);
console.log(result.reasoning_trace);

API Endpoints

POST /reason

Execute reasoning pipeline on input.

{
  "input": "text to analyze",
  "stages": ["stage1", "stage2"],
  "context": {}
}

GET /stages

List available reasoning stages.

GET /health

Health check endpoint.

Dependencies

  • lilith-ml-service-base - FastAPI scaffolding
  • lilith-ollama-provider - LLM client
  • lilith-pipeline-framework - Pipeline orchestration
  • lilith-service-addresses - Port resolution

License

MIT