Skip to main content

PromptForge

Генератор system-промтов для LLM-агентов с экспортом в JSON для API

PyPI version Python versions Tests License Downloads GitHub

English | Русский


PromptForge — инструмент для создания, валидации и экспорта system-промтов LLM-агентов в готовые JSON-payload для API (OpenAI, Anthropic, универсальный формат).

Ключевые возможности

  • 🎯 Интерактивный мастер — пошаговое создание конфигурации агента
  • 🔒 Детерминированный рендер — одинаковый конфиг → одинаковый sha256 и версия промта
  • ✅ Валидация конфигурации до генерации
  • 🔧 Подстановка переменных {{key}} в тексте промта
  • 📦 Три формата экспорта: OpenAI, Anthropic, универсальный raw
  • 💬 Few-shot примеры — inline в system-промт или отдельными сообщениями
  • 🛡️ Атомарная запись файлов
  • 🎓 Интеграция с Django через management command

Установка

pip install promptforge

# С дополнительными зависимостями
pip install promptforge[yaml]       # поддержка YAML-конфигов
pip install promptforge[tokens]     # точная оценка токенов через tiktoken
pip install promptforge[all]        # все опциональные зависимости

Быстрый старт

# Создать конфигурацию агента (интерактивный мастер)
promptforge init -o agent.config.json

# Проверить конфигурацию
promptforge validate -c agent.config.json

# Посмотреть сгенерированный system-промт
promptforge preview -c agent.config.json

# Собрать JSON-payload для OpenAI
promptforge build -c agent.config.json -f openai -o build/agent.json

# Собрать JSON-payload для Anthropic
promptforge build -c agent.config.json -f anthropic -o build/agent.claude.json

Использование в коде

from promptforge import AgentConfig, PromptBuilder, export
from openai import OpenAI

# Загрузить конфигурацию
config = AgentConfig.from_file("agent.config.json")

# Собрать промт с подстановкой переменных
built = PromptBuilder(config, variables={"django_version": "5.1"}).build()

# Экспортировать в формат OpenAI
payload = export(built, "openai")

# Использовать с API
response = OpenAI().chat.completions.create(**payload)
print(response.choices[0].message.content)

Цитирование

Если вы используете PromptForge в научной работе или проекте, будем признательны за ссылку:

@software{promptforge2026,
  author = {Your Name},
  title = {PromptForge: System Prompt Generator for LLM Agents},
  year = {2026},
  publisher = {PyPI},
  url = {https://pypi.org/project/promptforge/},
  version = {1.0.0}
}

Лицензия

Проект распространяется под лицензией MIT.

Copyright: Copyright (c) 2026 Alex Jurow (mandalay-rp)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Metadata

Release files for promptforge-llm 1.0.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 promptforge-llm 1.0.0
File Size Uploaded Provenance Actions
promptforge_llm-1.0.0.tar.gz 19.7 kB Without provenance Details for promptforge_llm-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for promptforge-llm 1.0.0
File Interpreter ABI Platform Actions
promptforge_llm-1.0.0-py3-none-any.whl Python 3 none any Details for promptforge_llm-1.0.0-py3-none-any.whl

Total release size: 43.7 kB

Release files / promptforge_llm-1.0.0.tar.gz

Download URL promptforge_llm-1.0.0.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e2775927cda9436dcc4ad69c3a4b00e1dcd9c6250d5bdaad7a6afaac50e53561
BLAKE2b-256 checksum
How to use checksums
4188bfb82cf4a1d424edcd47ea47a37a93aa5aae6f59fe0b48f55e85f510b261
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / promptforge_llm-1.0.0-py3-none-any.whl

Download URL promptforge_llm-1.0.0-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
605a327ae9616aa36e6f874471b6dd1c9a1694f298288fe7abee50a0f4a9e919
BLAKE2b-256 checksum
How to use checksums
5f97d74c46ad0b157e3c106c8baa402e1efd2eb951e620f3bbb33ac561b45b57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for promptforge-llm 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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