Skip to main content

rqark-core

The engine of the RQArk Ecology System

A stateless agent engine for Python. Ships a basic agent toolkit, a set of base prompts, and a unified streaming interface for agent events.

Why rqark-core

The openai package gives you a client. This adds the loop on top of it — same protocol, same streaming, nothing replaced.

  • Cleaner event flow — @core.on_xx, in the spirit of flask / fastapi
  • Live prompts — the latest prompt content is injected on every turn

Installation

Requires Python 3.14+.

uv add rqark-core
# or
pip install rqark-core

Quick Start

import asyncio
from rqark_core.core import AgentCore
from rqark_core.types.provider import Provider
from rqark_core.types.event import AgentPayload
from rqark_core.types.chat import Chunk, Message, UserMessage
from rqark_core.tools import WebFetch, WebSearch
from rqark_core.prompts import DateTimePrompt

provider = Provider(model_name='gpt-5', api_base='https://api.openai.com/v1', priority=0, api_key='sk-...')

core = AgentCore()


@core.on_chunk()
async def print_chunk(event: AgentPayload[Chunk]):
    print(event.payload)


@core.on_message()
async def print_message(event: AgentPayload[Message]):
    print(event.payload)


prompts = [DateTimePrompt()]
tools = [WebSearch(), WebFetch()]


async def main():
    messages = [UserMessage('What news in Hong Kong?')]
    history, error = await core.chat(provider, messages, prompts=prompts, tools=tools)
    if error:
        print('failed:', error)


asyncio.run(main())

Events

  • on_chunk
  • on_message
  • on_plan

Prompts

Dynamic injection

Prompt content is rebuilt on every turn — DateTimePrompt calls now(), for example. If no AGENTS.md is found, AgentsMdPrompt hides its content to save context; GitProjectPrompt behaves the same way.

General

  • DateTimePrompt
  • PlatformPrompt
  • WorkspacePrompt
  • AgentsMdPrompt
  • GitProjectPrompt

Roleplay

  • RolePrompt
  • CharacterPrompt

Other

  • AntiSycophancyPrompt
  • SubAgentPrompt

Tools

Files

  • ReadFile
  • WriteFile
  • EditFile
  • ListDir
  • Grep
  • WebSearch
  • WebFetch

Git

  • GitHub
  • GitLab
  • Gitea

Other

  • Exec
  • PlanUpdate
  • SubAgent

Metadata

Release files for rqark-core 0.5.2

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

Source distribution (sdist)

Source distribution for rqark-core 0.5.2
File Size Uploaded Provenance Actions
rqark_core-0.5.2.tar.gz 130.7 kB Without provenance Details for rqark_core-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rqark-core 0.5.2
File Interpreter ABI Platform Actions
rqark_core-0.5.2-py3-none-any.whl Python 3 none any Details for rqark_core-0.5.2-py3-none-any.whl

Total release size: 186.5 kB

Release files / rqark_core-0.5.2.tar.gz

Download URL rqark_core-0.5.2.tar.gz
Size 130.7 kB
Tags Source
SHA-256 checksum
How to use checksums
887dcc781ad04975781603a482b28127e9bb2fb9460c1e1ea6c1bf7ec0e8d4b1
BLAKE2b-256 checksum
How to use checksums
a5983bf59f461949549e0dc0b4e480b65a6dfc1ab59e0964028e2a068b1dcb0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rqark_core-0.5.2-py3-none-any.whl

Download URL rqark_core-0.5.2-py3-none-any.whl
Size 55.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3afc0f9d15456855e51504dfa361e0cf3be28c351c4db795a5d2968dcad86ffe
BLAKE2b-256 checksum
How to use checksums
3924581573be5fc2a4d61a58f11a2e80c1ef5049588fbe607e9276aa5e616cbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for rqark-core 0.5.2

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