---
title: "Convenience function for quick prompt building" component_type: script version: "1.0.0" audience: contributor status: stable summary: "LLM Abstractions Module" keywords: ['abstractions', 'generation', 'llm'] tokens: ~500 created: 2025-12-22 updated: 2025-12-22 script_name: "llm_abstractions.py" language: python executable: true usage: "python3 scripts/llm_abstractions.py [options]" python_version: "3.10+" dependencies: [] modifies_files: false network_access: false requires_auth: false
LLM Abstractions Module
CODITECT Framework - Common abstractions for LLM interactions including framework knowledge retrieval and system prompt building.
Author: CODITECT Framework Version: 1.0.0
File: llm_abstractions.py
Classes
FrameworkKnowledge
Container for framework knowledge and context.
SystemPromptBuilder
Builder for constructing system prompts with framework context.
Functions
get_framework_knowledge(framework_path, include_components)
Retrieve framework knowledge from CODITECT configuration.
build_agent_prompt(agent_name, description, capabilities, include_framework)
Build a standard agent system prompt.
add_section(title, content)
Add a titled section to the prompt.
add_framework_context(framework_path)
Add CODITECT framework context to the prompt.
add_role(role, responsibilities)
Add role definition to the prompt.
add_constraints(constraints)
Add constraints/rules to the prompt.
add_examples(examples)
Add examples to the prompt.
build()
Build the final system prompt.
framework_knowledge()
Get the loaded framework knowledge if available.