Back to Work

Django AI Agent

A multi-agent AI platform built with Django and LangGraph that coordinates stateful agents for document management and movie discovery workflows. Features secure CRUD operations with RBAC and ReBAC authorization using Permit.io, multiple LLM providers, and persistent conversation state.

DjangoLangGraphLangChainPermit.ioOpenAIGemini

Problem Statement

Building AI-powered applications that need fine-grained access control is challenging. Traditional RBAC systems don't account for the dynamic nature of AI agent interactions and tool-based function calling.

Architecture Overview

Django serves as the application framework with LangGraph orchestrating multi-agent workflows. Permit.io handles both RBAC and ReBAC authorization, ensuring agents can only access resources they're authorized for. Multiple LLM providers (OpenAI, Gemini) are integrated with tool-based function calling for flexible agent capabilities.

Technical Challenges Solved

  • Implementing fine-grained RBAC and ReBAC authorization that works seamlessly with AI agent tool calls
  • Managing persistent conversation state across multiple agent interactions
  • Coordinating stateful agents across document management and discovery workflows
  • Integrating multiple LLM providers with a unified tool-calling interface

Key Learnings

  • ReBAC provides more flexible authorization than pure RBAC for complex agent workflows
  • Persistent conversation memory is essential for maintaining context in multi-turn agent interactions
  • Django's ORM and admin interface accelerate backend development for AI applications
  • Tool-based function calling enables agents to perform complex, structured operations safely