Skip to main content

NARADA AI Logo.

Computer Use for Agentic Process Automation!

Sign Up Documentation Twitter Follow LinkedIn Follow

The official Narada Python SDK that helps you launch browsers and run tasks with Narada UI agents.

Installation

pip install narada

Quick Start

Important: The first time Narada opens the automated browser, you will need to manually install the Narada Enterprise extension and log in to your Narada account.

After installation and login, create a Narada API Key (see this link for instructions) and set the following environment variable:

export NARADA_API_KEY=<YOUR KEY>

That's it. Now you can run the following code to create a browser environment and ask an agent to download a file for you from arxiv:

import asyncio

from narada import Agent, AgentKind, BrowserEnvironment


async def main() -> None:
    # Create the browser environment. It initializes lazily on the first action.
    env = BrowserEnvironment()
    agent = Agent(environment=env)
    mini_agent = Agent(environment=env, kind=AgentKind.OPERATOR_MINI)

    try:
        # Run a task in this browser environment.
        response = await agent.run(
            prompt='Search for "LLM Compiler" on Google and open the first arXiv paper on the results page, then open the PDF. Then download the PDF of the paper.',
            # Optionally generate a GIF of the agent's actions.
            generate_gif=True,
        )

        print("Response:", response.model_dump_json(indent=2))

        # Use the product's lower-cost tier when appropriate.
        mini_response = await mini_agent.run(prompt="Summarize the completed task.")
        print("Mini response:", mini_response.model_dump_json(indent=2))
    finally:
        await env.close()


if __name__ == "__main__":
    asyncio.run(main())

AgentKind.OPERATOR_MINI and AgentKind.CORE_AGENT_MINI select the lower-cost Mini variants of their respective product agents. Named Agent Studio workflows continue to use their persisted Agent steps.

This would then result in the following trajectory:

File Download Example

You can use the SDK to launch browsers and run automated tasks using natural language instructions. For more examples and code samples, please explore the examples/ folder in this repository.

Operator Memory

Give a repeatable Operator or Operator Mini step a stable key. Use it on standalone browser dispatches. Inherited execution traces and the critic argument cannot be combined with Memory.

result = await agent.run(
    "Open the booking details and read the current rates.",
    operator_memory_key="7c29b6b5-e094-4bd4-8d3a-376b01851d00",
)
if result.operator_memory and not result.operator_memory.usage_is_final:
    print("Usage may still change", result.request_id)

Keep one key per logical step. Eligible members of the same Narada organization can reuse and update the policy with their own successfully completed runs. DEV and PROD each have their own policies. Use a UUID or another unique key and keep customer data out of the key. An organization administrator can clear the policy with DELETE /remote-dispatch/operator-memory/{memory_key}. A future run can learn it again.

Opting in retains an execution trace. The organization's retention settings apply. Shared policies hold observation hints, so each run uses its own inputs. An initial navigation can be followed by a learned browser step. The policy does not save its URL. If the run has no verified control, Memory skips review. A review may add a fixed charge and metered model usage. Exact reuse skips review. Review uses the time left in run(). If the outcome is pending or unknown, the successful Operator result is still available and usage may still change. The usage flag concerns charges from that Memory attempt and does not change ordinary Operator metering. Use GET /remote-dispatch/responses/{requestId} to check again without starting another review. An interrupted finalization may remain pending, and repeating the finalize request does not resume it.

Text selectors

Use text_content with agent.agentic_selector(...) in both CPython and Pyodide. No tag or search mode is required:

await agent.agentic_selector(
    action={"type": "click"},
    selectors={"text_content": "Save"},
    fallback_operator_query="Click Save",
)

Text alone matches the innermost element containing it. For <button><span>Save</span></button>, it targets the span. Add a tag to target the containing button instead:

await agent.agentic_selector(
    action={"type": "click"},
    selectors={"tag_name": "button", "text_content": "Save"},
    fallback_operator_query="Click the Save button",
)

role, class_name, and other attribute constraints can also combine with text. ID, test ID, DOM path, and XPath keep their independent fallback priority; omit them when text must determine the target. A missing or ambiguous match invokes the configured Operator fallback.

agent.wait_for_element(...) accepts the same selector combinations. Pass Python variables as ordinary string values, such as {"text_content": worker_id}. Explicit empty or whitespace-only text_content raises ValueError before sending a browser action, including when other fields are present. Omit the field when you intend to match without a text constraint.

Migration note

This version introduces a non-backward-compatible, agent-centered API:

  • Create an execution target with an environment, such as BrowserEnvironment, CloudBrowserEnvironment, RemoteBrowserEnvironment, or LambdaEnvironment.
  • Create an Agent(environment=env, kind=...) and call await agent.run(prompt=...).
  • Browser actions such as go_to_url, agentic_selector, and sheet operations are now methods on Agent.
  • Environments keep lifecycle/bookkeeping APIs such as start(), close(), browser_window_id, and cloud_browser_session_id.

Features

  • Natural Language Control: Send instructions in plain English to control browser actions
  • Parallel Execution: Run multiple browser tasks simultaneously across different windows
  • Error Handling: Built-in timeout handling and retry mechanisms
  • Action Recording: Generate GIFs of agent actions for debugging and documentation
  • Async Support: Full async/await support for efficient operations

Key Capabilities

  • Web Search & Navigation: Automatically search, click links, and navigate websites
  • Data Extraction: Extract information from web pages using AI understanding
  • Form Interaction: Fill out forms and interact with web elements
  • File Operations: Download files and handle web-based documents
  • Vector Stores: Discover managed Agent Studio stores or attach an Amazon Bedrock Knowledge Base
  • Multi-window Management: Coordinate tasks across multiple browser instances

Vector Stores

Attach a managed Agent Studio vector store to an agent run without copying its provider-side ID:

Managed vector-store paths are canonical and owner-qualified, using the format /owner@email.com/path/to/store.

env = BrowserEnvironment()
store = await env.vector_stores.get(
    path="/owner@example.com/Knowledge/Product documentation"
)
response = await Agent(environment=env, kind=AgentKind.PRODUCTIVITY).run(
    "Answer from the attached knowledge base and cite source filenames.",
    vector_stores=[store],
)

See the managed and external examples in examples/04_extending_the_agent/.

Guardrails overrides

Pass URL configuration for one agent invocation, including its nested GUI workflows and critic:

from narada import Guardrails

response = await agent.run(
    "Run the workflow",
    guardrails=Guardrails(
        url_allowlist=["https://example.com/*"],
        url_blocklist=["https://example.com/private/*"],
    ),
)

Both desktop and Pyodide SDKs expose the same API. Omit guardrails or pass None to use each GUI workflow's saved settings. Built-in agents and workflows without saved settings default to empty lists. A supplied model replaces both lists: Guardrails() explicitly clears them for the current invocation, and supplying only an allowlist clears the blocklist. Overrides never update the saved workflow. Saved Python workflows do not support overrides; direct deterministic actions are unchanged.

For browser-agent runs, the Narada Enterprise Chrome extension applies the lists to document navigations in the workflow's Chrome window. A regular Chrome Web Store installation is supported.

Logging

The SDK logs through standard logging loggers named after its modules, such as narada.environment, all under the narada logger. It installs no handlers and leaves levels and propagation alone, so Narada records go wherever your application's logging configuration sends them. Without any configuration, Python prints warnings and errors to stderr.

To print Narada logs as [narada.<module>.<function>:<line>] <message>, call enable_logging:

import logging

import narada

narada.enable_logging(logging.DEBUG)

If your application configures logging itself, Narada records propagate to its handlers. Pass narada.LOG_FORMAT to your formatter to use the same format there:

logging.basicConfig(level=logging.INFO, format=narada.LOG_FORMAT)
logging.getLogger("narada").setLevel(logging.DEBUG)

Use one approach or the other: enable_logging adds its own handler, so combining it with root handlers prints each Narada record twice.

Time profiling

At DEBUG level, the SDK logs how long each high-level step took, such as launching Chrome, connecting over CDP, waiting for the Narada extension, submitting an agent request, and waiting for its result:

[narada.environment._launch_browser_once:1515] Time profile: action=start phase=launch_chrome outcome=ok elapsed_ms=412
[narada.environment._initialize_launched_browser:1585] Time profile: action=start phase=connect_cdp attempt=1 outcome=ok elapsed_ms=96
[narada.environment._ensure_initialized:697] Time profile: action=start phase=total environment=BrowserEnvironment outcome=ok elapsed_ms=6184
[narada.environment._dispatch_request:1035] Time profile: action=agent_run phase=wait_for_completion request_id=... outcome=ok elapsed_ms=41230

action is the SDK operation (start, agent_run, extension_action, or close), phase is the step within it, and outcome is ok or the name of the exception that ended the step. Each record also carries these values as a narada_time_profile dictionary attribute for structured log handlers.

License

This project is licensed under the Apache 2.0 License.

Support

For questions, issues, or support, please contact: support@narada.ai

Citation

We appreciate it if you could cite Narada if you found it useful for your project.

@software{narada_ai2025,
  author = {Narada AI},
  title = {Narada AI: Agentic Process Automation for Enterprise},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/NaradaAI/narada-python-sdk}
}
Made with ❤️ in Berkeley, CA.

Metadata

Release files for narada 0.2.26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for narada 0.2.26
File Size Uploaded Provenance Actions
narada-0.2.26.tar.gz 75.4 kB Without provenance Details for narada-0.2.26.tar.gz

Built distribution (wheel)

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

Total release size: 122.9 kB

Release files / narada-0.2.26.tar.gz

Download URL narada-0.2.26.tar.gz
Size 75.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a9676f0c9a5fe94a3507fb84f46b330715ffc2de39f15534b936e5769fc489cb
BLAKE2b-256 checksum
How to use checksums
3ebf2faf3b1d48fd39b5cf6c46219bc939d591e6569ef5926eb142624497ea1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / narada-0.2.26-py3-none-any.whl

Download URL narada-0.2.26-py3-none-any.whl
Size 47.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4a8dfc708bd09ff81f60458faacc6fa64029e922cc13348111f8f800eec6478
BLAKE2b-256 checksum
How to use checksums
433c42d969140d68833dc01fb800fb6963ff387fa82309406c270e215f203d78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for narada 0.2.26

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.

Release history Release notifications | RSS feed

This release

0.2.26 This release

2 release files No provenance

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