Skip to main content

A Natural Programming Language Agent,

Project description

🚀 Janito: Agent

Janito is an AI-powered assistant for the command line and web that interprets natural language instructions to edit code, manage files, and analyze projects using patterns and tools designed by experienced software engineers. It prioritizes transparency, interactive clarification, and precise, reviewable changes.


⚡ Quick Start

Run a one-off prompt:

python -m janito "Refactor the data processing module to improve readability."

Or start the interactive chat shell:

python -m janito

Launch the web UI:

python -m janito.web

✨ Key Features

  • 📝 Code Editing via Natural Language: Modify, create, or delete code files simply by describing the changes.
  • 📁 File & Directory Management: Navigate, create, move, or remove files and folders.
  • 🧠 Context-Aware: Understands your project structure for precise edits.
  • 💬 Interactive User Prompts: Asks for clarification when needed.
  • 🧩 Extensible Tooling: Built-in tools for file operations, shell commands, directory listing, Python file validation, text replacement, code execution, and more. Recent tools include:
    • find_files: Search for files matching a pattern in directories.
    • get_lines: Retrieve specific lines from files for efficient context.
    • py_compile_file: Validate Python files for syntax correctness.
    • replace_text_in_file: Replace exact text fragments in files.
    • search_files: Search for text patterns across files.
    • python_exec: Execute Python code and capture output.
    • And more, see janito/agent/tools/ for the full list.
  • 🌐 Web Interface (In Development): Upcoming simple web UI for streaming responses and tool progress.

📦 Installation

Requirements

  • Python 3.10+

...

Configuration & CLI Options

Below are the supported configuration parameters and CLI flags. Some options can be set via config files, CLI flags, or both. Use python -m janito --help for a full list, or python -m janito --help-config to see all config keys and their descriptions.

Key / Flag Description How to set Default
api_key API key for OpenAI-compatible service --set-api-key, config file None (required)
model Model name to use for this session --model (session only), --set-local-config model=..., or --set-global-config openai/gpt-4.1
base_url API base URL (OpenAI-compatible endpoint) --set-local-config base_url=... or --set-global-config https://openrouter.ai/api/v1
role Role description for the system prompt --role or config "software engineer"
system_prompt Override the entire system prompt as a raw string --system-prompt or config Default prompt
system_file Use a plain text file as the system prompt (takes precedence over system_prompt) --system-file (CLI only) None
temperature Sampling temperature (float, e.g., 0.0 - 2.0) --temperature or config 0.2
max_tokens Maximum tokens for model response --max-tokens or config 200000
max_rounds Maximum number of agent rounds per prompt/session --max-rounds or config 50
max_tools Maximum number of tool calls allowed within a chat session --max-tools or config None (unlimited)
no_tools Disable tool use (no tools passed to agent) -n, --no-tools (CLI only) False
trust Trust mode: suppresses run_bash_command output, only shows output file locations --trust (CLI only) False
template / template.* Template context dictionary for prompt rendering (nested or flat keys) Config only None

Other config-related CLI flags:

  • --set-local-config key=val Set a local config value
  • --set-global-config key=val Set a global config value
  • --run-config key=val Set a runtime (in-memory only) config value (can be repeated)
  • --show-config Show effective configuration and exit
  • --config-reset-local Remove the local config file
  • --config-reset-global Remove the global config file
  • --set-api-key KEY Set and save the API key globally
  • --help-config Show all configuration options and exit

Session & shell options:

  • --continue-session Continue from the last saved conversation
  • --web Launch the Janito web server instead of CLI

Verbose/debugging flags:

  • --verbose-http Enable verbose HTTP logging
  • --verbose-http-raw Enable raw HTTP wire-level logging
  • --verbose-response Pretty print the full response object
  • --verbose-tools Print tool call parameters and results
  • --show-system Show model, parameters, system prompt, and tool definitions, then exit
  • --version Show program's version number and exit

🧩 System Prompt & Role

Janito operates using a system prompt template that defines its behavior, communication style, and capabilities. By default, Janito assumes the role of a "software engineer"—this means its responses and actions are tailored to the expectations and best practices of professional software engineering.

  • Role: You can customize the agent's role (e.g., "data scientist", "DevOps engineer") using the --role flag or config. The default is software engineer.
  • System Prompt Template: The system prompt is rendered from a Jinja2 template (see janito/agent/templates/system_instructions.j2 (now located directly under the agent directory)). This template governs how the agent interprets instructions, interacts with files, and communicates with users.
  • Customization: Advanced users can override the system prompt with the --system-prompt flag (raw string), or point to a custom file using --system-file.

The default template ensures the agent:

  • Prioritizes safe, reviewable, and minimal changes
  • Asks for clarification when instructions are ambiguous
  • Provides concise plans before taking action
  • Documents any changes made

For more details or to customize the prompt, see the template file at janito/agent/templates/system_instructions.j2.


Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

janito-1.3.0.tar.gz (37.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

janito-1.3.0-py3-none-any.whl (47.7 kB view details)

Uploaded Python 3

File details

Details for the file janito-1.3.0.tar.gz.

File metadata

  • Download URL: janito-1.3.0.tar.gz
  • Upload date:
  • Size: 37.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for janito-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a0e0e1ede6a52b36163b32a95a8adb291a9c0fa4750c2cba4f9b5e44cd6f62fb
MD5 6182e3917f926fd84513399d61258553
BLAKE2b-256 29a39ad8337d3b4b013caba74cf2bc9dc9f652f5b5d36eaa7fa928b150770bc1

See more details on using hashes here.

File details

Details for the file janito-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: janito-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 47.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for janito-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c3fd0bdf1b6c6fdc527de51aeb03036f749c1a94fb5149725861b8a662a6dd3
MD5 07a8c6bd183ff327db5a1aab1ab957ea
BLAKE2b-256 cd7012c9b017800e76e60afda201cf26bd82bb4fa9272ce692dc682620073260

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page