직접 모델 연결 (Registry 외)
언제 사용하나
섹션 제목: “언제 사용하나”- 로컬 Ollama로 빠르게 실험할 때
- Registry 없이 OpenAI/Anthropic API를 직접 호출해야 할 때
- 학습용 / 단발성 프로토타입
운영 환경이라면 Registry 방식으로 옮기는 것을 권장합니다.
템플릿
섹션 제목: “템플릿”uv run llamon agent my-agent --template agent-local --yes # Ollamauv run llamon agent my-agent --template agent-openai --yes # OpenAIuv run llamon agent my-agent --template agent-anthropic --yes # Anthropic| 템플릿 | provider | 기본 모델 | 필수 환경변수 |
|---|---|---|---|
agent-local | ollama | qwen3 | OLLAMA_BASE_URL |
agent-openai | openai | gpt-4o-mini | OPENAI_API_KEY |
agent-anthropic | anthropic | claude-3-5-sonnet-latest | ANTHROPIC_API_KEY |
app/config.py
섹션 제목: “app/config.py”세 템플릿 모두 구조는 같습니다. model, provider, system_prompt만 바꾸면 됩니다.
from llamon_agent.agent import Agentfrom app.tools import TOOLS
AGENT = Agent( model="qwen3", provider="ollama", # base_url="http://<host>:11434", system_prompt="당신은 간결하고 정확하게 답변하는 한국어 비서입니다.", tools=TOOLS,)프롬프트 바인딩(system_prompt_bindings), MCP 연결, 도구 등록 패턴은 Registry 기반 에이전트 구성과 동일합니다.
.env
섹션 제목: “.env”# OllamaOLLAMA_BASE_URL=http://localhost:11434
# OpenAI / Anthropic은 각각 OPENAI_API_KEY / ANTHROPIC_API_KEY 필요
HOST=0.0.0.0PORT=8000LOG_LEVEL=WARNING전체 환경변수는 환경 설정 → 환경 변수 참조.
빠른 시작 (Ollama 한정)
섹션 제목: “빠른 시작 (Ollama 한정)”agent-local은 생성부터 실행 확인까지 한 번에 할 수 있습니다.
uv run llamon agent my-agent --template agent-local --yes --quickstart관련 문서
섹션 제목: “관련 문서”- 기본 경로: Registry 기반 에이전트 구성
- 메모리 추가: 멀티턴 메모리
- 실행/점검: 로컬 실행/점검 + 폐쇄망 준비