Skip to main content

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 render (state.py + desk.py)
    ->
Prompt + tool schemas (prompt.py + schemas.py)
    ->
LLM picks one action or tool call
    ->
actions.py dispatches built-ins or named MCP tools
    ->
governance.py + effect.py + trust.py gate execution
    ->
tools.py / sandbox.py / mcp.py execute
    ->
state.py + receipts.py persist outcome
    ->
compaction.py trims prompt pressure when needed
    |
    v
Task complete / wait / escalate

Plans are declarative: plan stores a tree on the active task, and each plan call executes one pending leaf before returning the next frontier.

Delegation is mode-aware: one-shot CLI runs delegate inline, while daemon/REPL modes spawn a background child task and use check_delegate to collect the result.

Built-in actions cover shell, editor, computer, UIA, code, task management, planning, delegation, reply, and memory/rule updates. Connected MCP tools can also be exposed directly by name.

Safety is layered:

  • effect.py classifies side effects and applies compute_threshold()
  • governance.py blocks stagnation and repeated bad loops
  • trust.py scans for injection, credentials, and destructive patterns
  • sandbox.py and workspace-bounded tools constrain execution
  • receipts.py writes an append-only JSONL 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
python -m pytest tests/ --ignore=tests/test_uia_integration.py -q

# Lint
python -m ruff check src/ tests/

# Type check
python -m mypy src/pascal/

Project Structure

src/pascal/
  loop.py ........... Main orchestration loop
  actions.py ........ Action dispatch, plan execution, delegate lifecycle
  state.py .......... SQLite state, checkpoints, plans, memories
  desk.py ........... State -> prompt compiler
  tools.py .......... Built-in editor/computer/uia/channel tools
  mcp.py ............ MCP connections, discovery, and tool calls
  governance.py ..... Stagnation and repetition checks
  effect.py ......... Effect classification + compute_threshold()
  compaction.py ..... Token budgeting and session summaries
  sandbox.py ........ Shell/code isolation
  receipts.py ....... Append-only JSONL ledger
  scheduler.py ...... Bounded periodic checks and webhooks
  daemon.py ......... Always-on Telegram runtime
  config.py ......... Config loader and LLM factory
  schemas.py ........ Tool schemas, including named MCP tools
  prompt.py ......... Base system prompt + PASCAL.md loading
  types.py .......... Shared DTOs and plan tree types
  llm/ .............. OpenAI, Anthropic, Codex providers
  channels/ ......... Telegram adapter
  uia.py ............ Windows UI Automation

License

MIT

Metadata

Release files for pascal-agent 1.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 pascal-agent 1.3.0
File Size Uploaded
pascal_agent-1.3.0.tar.gz 170.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pascal-agent 1.3.0
File Interpreter ABI Platform
pascal_agent-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 296.0 kB

Release files / pascal_agent-1.3.0.tar.gz

Download URL pascal_agent-1.3.0.tar.gz
Size 170.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2bbedadfcbb9115409dd304adc459358d71c422e1e17d9b8df4e0449d893eda6
BLAKE2b-256 checksum
How to use checksums
729a2b657ce4113b613294ed4cbe62aa11f447fff9344712ac8f7ef50e1fa049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / pascal_agent-1.3.0-py3-none-any.whl

Download URL pascal_agent-1.3.0-py3-none-any.whl
Size 125.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c19403f23a283041fce33e6418ca09d32ce829eafc5fa35be39b8f8da35c7434
BLAKE2b-256 checksum
How to use checksums
999c313243e727e0a6d0425775b66746f16b5dd9c4e1592aa384e70b4b3e525a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

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