Skip to main content

InstantNeo

InstantNeo Logo

PyPI version Python Versions License

Build instant agents to compose intelligent systems

"I know kung fu." - Neo

What is InstantNeo?

InstantNeo is a Python library that lets you create LLM-based agents quickly and concisely, designed as components for intelligent systems. It offers a clean, direct interface for granular control over agent behavior, abstracting away provider complexity. Like Neo in The Matrix downloading skills instantly, InstantNeo lets you build agents with instant capabilities, simple to start and powerful when composed. Unlike rigid or overly-elaborated frameworks, InstantNeo draws from Marvin Minsky's 'Society of Mind' to deliver modular building blocks, letting you craft multi-agent systems your way.

Features

  • Unified Provider Interface: Switch seamlessly between models providers with consistent syntax. The library handles different API requirements behind the scenes.
  • Quick and powerful Tool Management: Define agent capabilities using simple Python decorators that transform functions into tools with metadata, descriptions, and parameter validation. Add, remove, and list tools dynamically as your agent's needs evolve.
  • Flexible Execution Modes: Control exactly how tools are executed with three modes: wait for results, fire tools in the background, or just extract arguments without execution for planning purposes.
  • Text and Image Support: Process both text and images through a single consistent API. Send images alongside prompts to vision-capable models and control the level of image analysis detail as needed.
  • Customizable Agent Settings: Modify agent behavior on-the-fly by overriding temperature, max tokens, role setup, and other parameters for specific interactions without recreating the entire agent.

Installation

pip install instantneo

That's it. Works with OpenAI, Anthropic, Groq, Gemini, and Vertex AI out of the box.

Quickstart

Wake Neo Up

from instantneo import InstantNeo

neo = InstantNeo(
    provider="openai",
    api_key="your-api-key",
    model="gpt-4o",
    role_setup="You are Neo, the chosen one. Ready to learn anything."
)

print(neo.run("What's the Matrix?"))

Teach Him Kung Fu

from instantneo import InstantNeo, tool

@tool(description="Execute a kung fu move", parameters={"move": "e.g., dragon punch", "intensity": "1-10"})
def kung_fu(move: str, intensity: int = 5) -> str:
    return f"Hit {move} at intensity {intensity}. I know kung fu!"

neo = InstantNeo(
    provider="anthropic",
    api_key="your-api-key",
    model="claude-3-7-sonnet-20250219",
    role_setup="You are Neo, martial arts downloaded.",
    skills=[kung_fu]
)

print(neo.run("Three agents ahead. What move?"))

Use Vertex AI

from instantneo import InstantNeo

neo = InstantNeo(
    provider="vertexai",
    model="gemini-2.5-flash",
    role_setup="You are Neo, the chosen one.",
    location="us-central1",
    service_account_file="path/to/service-account.json"
)

print(neo.run("I need an exit."))

v2 — Event-sourced Orchestration (InstantLoop)

InstantNeo v2 introduces an event-sourced stack on top of single-agent runs:

  • History: append-only immutable log of entries (Entry has id, author, type, content, refs).
  • Monitor: standalone rule engine that reacts to History changes (add_rule(when, do)).
  • InstantLoop: multi-turn orchestrator that composes agent + history + monitor + bridge.
  • RunLog (opt-in via debug=True): forensic per-run log persisted to disk separately from the lean History.
from instantneo import InstantNeo, InstantLoop, tool

@tool(description="Finalize when done",
      parameters={"summary": {"description": "Resumen", "type": "str"}})
def finalize(summary: str) -> dict:
    return {"summary": summary, "done": True}

agent = InstantNeo(
    provider="openai", model="gpt-5-mini", api_key="sk-...",
    role_setup="Be a helpful assistant. Call finalize when done.",
    tools=[finalize],
)
loop = InstantLoop(agent=agent, name="my_loop",
                    stop_tool="finalize", debug=True)
result = loop.run("Explain photosynthesis briefly, then finalize.")
print(result.terminated_reason)  # "stop_signal"
print(result.stop_reason)         # "agent called finalize"
print(result.log.turns)            # list of TurnLog (with messages_sent, usage, etc.)

Full design in docs/design/:

  • loop-design.md — InstantLoop
  • history-design.md — History layer
  • monitor-design.md — Monitor rule engine
  • runinfo-to-entries.md — bridge from RunInfo to Entrys
  • log-design.md — RunLog (Capa 1 generic + Capa 2 Loop-specific)

The legacy instantneo.experimental.instant_loop is deprecated in v2 and emits a DeprecationWarning. Use from instantneo import InstantLoop instead.

API Reference

  • InstantNeo Class: Set provider, api_key, model, role_setup, plus tools and tuning params (temperature, max_tokens, etc.).
  • run() Method: Feed it a prompt, pick an execution_mode (WAIT_RESPONSE, EXECUTION_ONLY, GET_ARGS), override settings as needed.

Details in the docs.

Architecture and Philosophy

InstantNeo leans on Minsky's "Society of Mind": small, specialized agents you connect to make something bigger. Each agent's a tool—give it a role, add skills, and weave them together. The smarts come from your coordination, not ours.

Documentation

Full scoop at /docs, including tutorials on multi-agent setups and advanced skills.

Contributing

Fork, branch, commit, push, PR. Update tests and docs if you're adding something.

License

MIT License—check LICENSE.

"I'm trying to free your mind, Neo. But I can only show you the door. You're the one that has to walk through it." - Morpheus

Metadata

Release files for instantneo 0.3.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 instantneo 0.3.0
File Size Uploaded Provenance
instantneo-0.3.0.tar.gz 129.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for instantneo 0.3.0
File Interpreter ABI Platform
instantneo-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 287.9 kB

Release files / instantneo-0.3.0.tar.gz

Download URL instantneo-0.3.0.tar.gz
Size 129.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7de77b625918a24e1b8e49114080d491e17024a9d184406672d3368d14283f78
BLAKE2b-256 checksum
How to use checksums
e0dcb04f17b8b0852d16c51ebc8961c7355935723fe7bb48df67c0654dfe9feb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / instantneo-0.3.0-py3-none-any.whl

Download URL instantneo-0.3.0-py3-none-any.whl
Size 158.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1a2723570b3b69b70d52a276d29420f869340c8402547e3fbed98161f437775
BLAKE2b-256 checksum
How to use checksums
61923272a051225b0ba2730824379d16fdc68a8026ac580b4193347a5e8cf2e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for instantneo 0.3.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