← all repositories
dot-agent/nextpy

A framework for software that edits its own source

Nextpy wraps LLMs, prompt compilers, and a forked UI stack so Python applications can generate and fix their own code.

2.3k stars Python AgentsLLMOps · Eval
nextpy
Not currently ranked — collecting fresh signals.
star history

What it does

Nextpy is a Python framework for building self-modifying applications. It sits atop a grab-bag of existing libraries—Reflex, DSPy, Guidance, LangChain, FastAPI, and others—to offer structured LLM outputs, prompt pre-compilation, and a generative UI layer. The idea is that your application can write, test, and repair its own code while staying inside guardrails you define.

The interesting bit

The prompt engine tries to shift work to compile time and reuse KV caches across turns, which—if you are running open-source models—can turn expensive output tokens into cheaper prompt batches. It also claims to detect syntax errors and hallucinated API calls in LLM-generated code, then auto-generate repair prompts.

Key highlights

  • Prompt pre-compilation and KV-cache session state for open-source models, plus speculative sampling (marked WIP).
  • Automatic syntax-error detection and correction for generated code, including invalid Nextpy method calls.
  • Agents exportable as .agent or .🤖 files; optional sandboxed execution via “Agentbox.”
  • Generative UI module built on a forked Reflex/Reacton/Solara stack.
  • Claims 4–10× faster page loads than Streamlit, citing a 99/100 PageSpeed score.

Caveats

  • Several headline optimizations—KV-cache reuse, token batching, speculative sampling—are explicitly limited to open-source models.
  • The project describes itself as “just for friends,” and speculative sampling is marked work-in-progress.
  • Much of the stack is borrowed or forked; the value is in the wiring, not novel infrastructure.

Verdict

Worth a weekend spin if you are experimenting with agentic code generation and want a pre-integrated Python stack. If you need a stable, mature framework, check back after it graduates from the friend zone.

Frequently asked

What is dot-agent/nextpy?
Nextpy wraps LLMs, prompt compilers, and a forked UI stack so Python applications can generate and fix their own code.
Is nextpy open source?
Yes — dot-agent/nextpy is open source, released under the Apache-2.0 license.
What language is nextpy written in?
dot-agent/nextpy is primarily written in Python.
How popular is nextpy?
dot-agent/nextpy has 2.3k stars on GitHub.
Where can I find nextpy?
dot-agent/nextpy is on GitHub at https://github.com/dot-agent/nextpy.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.