Skip to main content

🚀 jupyter-omni-agent

로컬 Jupyter Notebook에 다양한 AI 서비스 API 키(OpenAI, Anthropic Claude, Google Gemini, OpenRouter, DeepSeek, Groq, Upstage Solar) 및 로컬 Ollama를 연결하여, 자연어 명령만으로 내 로컬 커널에서 파이썬 코드를 자동 작성·실행·자가수정(Self-Healing)해주는 올인원 AI 에이전트 라이브러리입니다.


✨ 핵심 기능

  1. 멀티 프로바이더 통합 지원 (Zero-SDK 경량 구조):
    • 상용 AI API: OpenAI (gpt-4o, o3-mini), Anthropic (claude-3-7-sonnet), Google Gemini (gemini-2.5-pro, gemini-2.5-flash), DeepSeek, Groq, Upstage Solar
    • OpenRouter 통합 키: openrouter 설정 하나로 수백 개의 최신 모델(anthropic/claude-3.7-sonnet, deepseek/deepseek-r1, meta-llama/llama-3.3-70b-instruct 등) 즉시 호출
    • 로컬 Ollama 완벽 지원: API 키 없이 http://localhost:11434의 로컬 LLM(qwen2.5-coder, llama3.3 등) 연결
  2. 내 로컬 Jupyter 커널 변수 자동 인식 & 직접 실행:
    • 현재 노트북 메모리에 떠 있는 pandas.DataFrame의 행/열/컬럼명과 numpy 배열, 변수들을 자동으로 스캔해 프롬프트 컨텍스트에 주입합니다.
    • AI가 생성한 파이썬 코드를 내 로컬 user_ns 네임스페이스에서 즉시 실행하여 새로운 변수나 차트를 바로 생성합니다.
  3. 자가 수정 (Self-Healing Execution Loop):
    • 실행 중 에러(Traceback)가 발생하면 AI가 자동으로 에러 로그를 읽고 수정된 코드를 재실행합니다.

📦 설치 방법

pip install jupyter-omni-agent

또는 로컬 소스에서 설치:

pip install -e .

💻 Jupyter Notebook 사용법 (%%ai 매직 명령어)

1. 익스텐션 로드 및 API 키 등록

%load_ext jupyter_omni_agent

# 원하는 서비스의 API 키 등록 (환경변수로 설정해도 자동 인식됩니다)
%ai_key openrouter sk-or-v1-xxxxxxxxxxxxxxxxxxxx
%ai_key openai sk-proj-xxxxxxxxxxxxxxxxxxxx
%ai_key gemini AIzaSyXXXXXXXXXXXXXXXXXXXX

2. 사용할 프로바이더 & 모델 선택

# OpenRouter 사용 시
%ai_config openrouter anthropic/claude-3.7-sonnet

# 로컬 Ollama 사용 시 (API 키 불필요)
%ai_config ollama qwen2.5-coder:7b

3. 셀에서 자연어로 로컬 파이썬 코드 생성 & 즉시 실행 (%%ai)

%%ai
현재 메모리에 있는 df 데이터프레임의 결측치를 평균값으로 채우고,
카테고리별 매출 합계를 구해서 파생변수 summary_df로 저장하고 출력해줘.

🐍 일반 Python 스크립트에서 사용하기

import pandas as pd
from jupyter_omni_agent import OmniNotebookAgent

df = pd.DataFrame({"product": ["A", "B", "C"], "sales": [120, 340, 260]})

agent = OmniNotebookAgent(
    provider="openrouter",
    model="anthropic/claude-3.7-sonnet",
    api_key="sk-or-v1-...",
    user_ns=locals(),
)

res = agent.run("df에서 sales가 200 이상인 행만 필터링해서 high_sales 변수에 저장하고 출력해줘")
print(res.stdout)

Metadata

Release files for jupyter-omni-agent 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 jupyter-omni-agent 0.1.0
File Size Uploaded Provenance Actions
jupyter_omni_agent-0.1.0.tar.gz 10.3 kB Without provenance Details for jupyter_omni_agent-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-omni-agent 0.1.0
File Interpreter ABI Platform Actions
jupyter_omni_agent-0.1.0-py3-none-any.whl Python 3 none any Details for jupyter_omni_agent-0.1.0-py3-none-any.whl

Total release size: 21.8 kB

Release files / jupyter_omni_agent-0.1.0.tar.gz

Download URL jupyter_omni_agent-0.1.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0e1cd35024fe6be65dea045326b834b0956948fb653b56a198e4a1ce3195663c
BLAKE2b-256 checksum
How to use checksums
18df02527f71f24f0c06de68df62cc422b232786c0b47eec6ed21557bdd22bb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

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

Download URL jupyter_omni_agent-0.1.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e2901aa77410bb304945165db2ff9a75ec6283f560437eb7d6c4c372e2b2e17
BLAKE2b-256 checksum
How to use checksums
d7b906c466001f5ce4188b43e1a78a056d21fb5c810b6da4fb707ccc794af0a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for jupyter-omni-agent 0.1.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.

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