Promptic
Description
90% of what you need for LLM app development. Nothing you don't.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
promptic
[](https://pypi.org/project/promptic) [](https://opensource.org/licenses/Apache-2.0) [](https://github.com/knowsuchagency/promptic/actions/workflows/tests.yml)
90% of what you need for LLM app development. Nothing you don't.
Promptic aims to be the "[requests](https://requests.readthedocs.io/en/latest/)" of LLM development -- the most productive and pythonic way to build LLM applications. It leverages [LiteLLM][litellm], so you're never locked in to an LLM provider and can switch to the latest and greatest with a single line of code. Promptic gets out of your way so you can focus entirely on building features.
"Perfection is attained, not when there is nothing more to add, but when there is nothing more to take away."
At a glance
- 🎯 Type-safe structured outputs with Pydantic
- 🤖 Easy-to-build agents with function calling
- 🔄 Streaming support for real-time responses
- 📚 Automatic prompt caching for supported models
- 💾 Built-in conversation memory
Installation
pip install promptic
Usage
Basics
Functions decorated with `@llm` use its docstring as a prompt template. When the function is called, promptic combines the docstring with the function's arguments to generate the prompt and returns the LLM's response.
# examples/basic.py
from promptic import llm
@llm
def translate(text, language="Chinese"):
"""Translate '{text}' to {language}"""
print(translate("Hello world!"))
# 您好,世界!
print(translate("Hello world!", language="Spanish"))
# ¡Hola, mundo!
@llm(
model="claude-3-haiku-20240307",
system="You are a customer service analyst. Provide clear sentiment analysis with key points.",
)
def analyze_sentiment(text):
"""Analyze the sentiment of this customer feedba
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI