Portfolio/CognitiveFlow
CognitiveFlow preview
In Progress2025

CognitiveFlow

PythonLangChainQdrantOpenAIFastAPIRedis

Overview

CognitiveFlow is an AI agent routing and orchestration framework built for production reliability. It implements the ReAct pattern with structured tool definitions, vector-backed long-term memory, configurable max-iteration guards, and real-time tracing. Designed for multi-agent workflows where individual agents specialise and hand off tasks through a central router.

Highlights

  • Multi-agent routing with specialised sub-agents per domain
  • Qdrant vector store for semantic long-term memory across sessions
  • OpenTelemetry tracing for full thought/action/observation audit logs
  • FastAPI wrapper enabling REST and WebSocket agent execution

Tech Stack

Python 3.12

Core runtime

LangChain

Agent and tool abstractions

Qdrant

Vector store for long-term memory

OpenAI API

LLM backbone (GPT-4o)

FastAPI

REST + WebSocket API layer

Redis

Short-term session memory cache

Challenges

  • →Preventing infinite loops in complex multi-step reasoning chains
  • →Efficient context window management when conversation history grows
  • →Building reliable tool call parsing that handles malformed LLM output gracefully

Outcomes

  • ✓Handles 80%+ of benchmark task completions without human intervention
  • ✓Average agent run cost under $0.04 on GPT-4o with caching
  • ✓Used internally for automated research and summarisation workflows
Back to Portfolio