Skip to main content

django-agentkore

A Django extension for scaffolding and managing LLM-based agents in your Django projects.

Features

  • Django management command for agent scaffolding (startagent)
  • Base agent classes and utilities
  • Agent auto-discovery in Django projects
  • Easily integrate AI agents into your Django applications

Installation

pip install agentkore

Using uv

You can also install using uv, a fast Python package installer and resolver:

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create and activate a virtual environment
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install agentkore
uv pip install agentkore

Setting up in your Django project

  1. Add agentkore to your INSTALLED_APPS in your Django settings:
INSTALLED_APPS = [
    # ... other apps
    'agentkore',
]
  1. Run the startagent command to create a new agent:
python manage.py startagent myagent

This will create the following structure:

agents/
  myagent/
    __init__.py
    agent.py
    prompt_templates/
      base.txt
    tests/
      __init__.py
      test_myagent.py

Using your agent

from agents.myagent import MyagentAgent

# Create an instance of your agent
agent = MyagentAgent()

# Process a user prompt
response = agent.run("What's the weather like today?")

Auto-discovering agents

The AgentRegistry class can automatically discover all agents in your project:

from agentkore.kore import discover_agents

# Discover all agents in the 'agents' directory
agents = discover_agents()

# Get a list of all available agent names
agent_names = list(agents.keys())

Creating Custom Agents

Extend the BaseAgent class to implement your own AI agents:

from agentkore.kore import BaseAgent
import openai

class WeatherAgent(BaseAgent):
    def run(self, prompt, context=None):
        # Use OpenAI to process weather queries
        response = openai.ChatCompletion.create(
            model="gpt-4",
            messages=[
                {"role": "system", "content": "You are a weather assistant."},
                {"role": "user", "content": prompt}
            ]
        )
        return response.choices[0].message.content

Release files for django-agentkore 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-agentkore 0.1.0
File Size Uploaded
django_agentkore-0.1.0.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-agentkore 0.1.0
File Interpreter ABI Platform
django_agentkore-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / django_agentkore-0.1.0.tar.gz

Download URL django_agentkore-0.1.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9d44a9597520c4bc04e68f5c193e1a363eef4444303764dc1afb867e923bfadd
BLAKE2b-256 checksum
How to use checksums
7203e297bd956c87901caa8be5fa26b46ff68dd4c07f5219c021c5ff7c98cfbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / django_agentkore-0.1.0-py3-none-any.whl

Download URL django_agentkore-0.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd1d09cc56209c5434a3806388fe1ed7af0879c138e7f6d3ed94504b46f3da82
BLAKE2b-256 checksum
How to use checksums
a5a33a34249d5ac7b5762c6267ff6b8c17306b2e2de33d23b116c173521f548b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page