Skip to main content

Pascal — autonomous AI employee runtime with 4-layer safety

Project description

Pascal — Autonomous AI Employee

An autonomous AI agent that works like a real employee: receives tasks, plans, executes, and reports back.

Getting Started

Install

pip install pascal-agent

Or with all optional features:

pip install "pascal-agent[all]"

Run

pascal

That's it. On first run, Pascal auto-detects your LLM provider or walks you through setup.

Manual setup (optional)

# Interactive setup
pascal setup

# Or set individually
pascal config set provider openai
pascal config set model gpt-5.4-mini
pascal config

Provider setup:

Provider Auth How
OpenAI API key export OPENAI_API_KEY=sk-...
Anthropic API key export ANTHROPIC_API_KEY=sk-ant-...
Codex ChatGPT Pro OAuth codex auth login (free with Pro subscription)

Usage

# Interactive mode (default)
pascal
> Summarize the files in this directory
> Read README.md and explain the architecture
> exit

# One-shot task
pascal "Write a Python script that downloads weather data"

# Set a mission (persistent context)
pascal --mission "You are a data analyst for the marketing team"

# Check current state
pascal --status

# Always-on daemon with Telegram
pascal --daemon

# Resume a paused task
pascal --resume task_abc123

Configuration

Config file (~/.pascal/pascal.toml)

[pascal]
model = "gpt-5.4-mini"
provider = "openai"           # openai | anthropic | codex
db_path = "~/.pascal/state.db"
max_effect = "E2"             # E0=read E1=analyze E2=write E3=push E4=merge E5=delete
max_tool_rounds = 10          # max tool calls per LLM turn

CLI config commands

pascal config                          # Show all settings
pascal config set model gpt-5.4-mini   # Set a value
pascal config get provider             # Get a value

Environment variables (override config file)

PASCAL_MODEL=gpt-5.4-mini
PASCAL_PROVIDER=openai
PASCAL_MAX_EFFECT=E2

API keys can be set as environment variables or saved to ~/.pascal/.env (auto-loaded).

Optional integrations

Telegram bot (~/.pascal/telegram.json):

{"bot_token": "123:ABC...", "owner_chat_id": 12345}

MCP tool servers (~/.pascal/mcp.json):

[{"name": "chrome", "command": "npx", "args": ["chrome-devtools-mcp@latest"]}]

Custom skills (~/.pascal/skills/my-skill.md):

---
name: my-skill
description: What this skill does
---
Instructions for Pascal when this skill is activated...

How It Works

pascal "Do something"
    |
    v
+---------------------------+
|  Desk compiles state      |  SQLite -> text prompt
|  LLM decides next action  |  22 action types via function calling
|  Execute through safety   |  Effect Ladder + Trust Scanner + Sandbox
|  Record to audit ledger   |  Hash-chained, append-only
|  Repeat                   |
+---------------------------+
    |
    v
Task complete / wait / escalate

22 actions: think, execute, plan, delegate, pick_task, create_task, create_subtask, complete_task, fail_task, pause_task, block_task, handle_notification, dismiss_notification, add_todo, complete_todo, memorize, add_rule, remove_rule, set_context, wait, escalate

3 LLM providers: OpenAI, Anthropic Claude, Codex (ChatGPT Pro)

4-layer safety: Effect Ladder (E0-E5) | Trust Scanner | Sandbox (Docker/Restricted) | TrustMap + Audit Ledger

Daemon Mode

Always-on operation with Telegram integration:

# Setup Telegram first
echo '{"bot_token": "YOUR_TOKEN", "owner_chat_id": YOUR_ID}' > ~/.pascal/telegram.json

# Start daemon
pascal --daemon

Features:

  • Telegram DM for tasks and approvals
  • Adaptive heartbeat (5min active, 30min idle)
  • Auto-restart on crash
  • STOP/PAUSE control (~/.pascal/STOP or ~/.pascal/PAUSE file)

Development

git clone https://gitlab.com/laum0621/pascal.git
cd pascal
pip install -e ".[dev]"

# Tests (245 pass)
pytest

# Lint (0 errors)
ruff check src/ tests/

# Type check (0 errors)
mypy src/pascal/

Project Structure

src/pascal/
  loop.py ........... Core tool-use loop (LoopRunner)
  actions.py ........ 22 action handlers (ActionContext)
  state.py .......... SQLite persistence (9 tables, FTS5)
  desk.py ........... State -> LLM prompt compiler
  tools.py .......... Built-in tools (file, desktop, UIA, clipboard)
  effect.py ......... Effect Ladder (E0-E5, hard regex rules)
  trust.py .......... Input scanner (injection, credentials, destructive)
  capability.py ..... Domain trust map (asymmetric learning)
  sandbox.py ........ Docker + Restricted sandbox
  receipts.py ....... Hash-chained audit ledger
  scheduler.py ...... Cron tick + self-evolution
  daemon.py ......... Always-on mode (Telegram + loop + scheduler)
  config.py ......... Config loader (CLI > env > TOML > defaults)
  schemas.py ........ Tool JSON schemas for LLM function calling
  prompt.py ......... System prompt
  types.py .......... Shared DTOs
  llm/ .............. OpenAI, Anthropic, Codex providers
  channels/ ......... Telegram adapter
  uia.py ............ Windows UI Automation

License

MIT

Project details


Download files

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

Source Distribution

pascal_agent-0.3.6.tar.gz (4.2 MB view details)

Uploaded Source

Built Distribution

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

pascal_agent-0.3.6-py3-none-any.whl (110.1 kB view details)

Uploaded Python 3

File details

Details for the file pascal_agent-0.3.6.tar.gz.

File metadata

  • Download URL: pascal_agent-0.3.6.tar.gz
  • Upload date:
  • Size: 4.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pascal_agent-0.3.6.tar.gz
Algorithm Hash digest
SHA256 a6164b1826b9cb89261a25a67a61c2bfa13bf85b5f2c6bcb0332f42b2116a446
MD5 ae8d4eb164754b0c0499be190e3e2666
BLAKE2b-256 4e2d4ecfea76f18f8433ba4a0ca1513aeb1647b8955ddd3cfea6d98e77b6d8c7

See more details on using hashes here.

File details

Details for the file pascal_agent-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: pascal_agent-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 110.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pascal_agent-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ddc5304d5bb68ef7760fba6164cf814342fe4ce570b35715f7835aba6d77c67d
MD5 d82566b7bd4c7f880d1dc389234d3298
BLAKE2b-256 3c043fee7dded8783430274127c5246531fe9ff7eebfd921f59d14d86b3eca2b

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