Parsimony Agents finds data through Parsimony connectors, analyzes it by writing and executing Python, and returns the work as reusable artifacts. The producing notebooks and source lineage are persisted with each dataset, chart, and report so the result can be inspected, reused, or refreshed.
Quickstart
pip install parsimony-agents parsimony-fred
export ANTHROPIC_API_KEY="..."
export FRED_API_KEY="..."
import asyncio
import os
from parsimony_fred import CONNECTORS as FRED
from parsimony_agents import Agent
async def main() -> None:
agent = Agent(
model="anthropic/claude-sonnet-5",
connectors=FRED.bind(api_key=os.environ["FRED_API_KEY"]),
)
result = await agent.ask("Show me how US unemployment has changed since 2020")
print(result.text)
print(list(result.datasets.keys())) # published dataset logical IDs
print(list(result.charts.keys())) # published chart logical IDs
assert result.ok
asyncio.run(main())
Agent.ask() returns an AgentResult containing the datasets, charts and reports, the event log, and the context required for a follow-up turn.
Follow-up turns
Pass the previous result's context back in to continue the conversation — the agent keeps the full transcript, so it can resolve references like "that chart" or "the same period":
follow_up = await agent.ask("Now do the same for the Eurozone.", ctx=result.context)
print(follow_up.text)
See Multi-turn conversations for streaming, suspension, and resume.
How it works
The agent works in the same sequence as an analyst:
- It searches and fetches data through a consistent connector interface.
- It writes Python in a stateful execution environment and observes the result.
- It publishes useful outputs rather than leaving them inside the conversation.
Published artifacts use open formats:
- datasets are Parquet;
- charts are Vega-Lite;
- reports are Quarto Markdown;
- notebooks are plain Python.
Each artifact has a stable identity, a content-addressed snapshot, and links to the code and data that produced it. Refresh walks that lineage and appends a snapshot only when the resulting bytes change.
For different integration levels:
Agent.ask()collects a run into one structured result;Agent.run()streams typed events for applications and custom interfaces;Agent.resume()continues a run that paused to ask the user a question.
Adding data sources
Connector packages expose immutable CONNECTORS collections. Bind credentials, compose the sources you need, and pass the collection to the agent:
from parsimony_fred import CONNECTORS as FRED
from parsimony_sdmx import CONNECTORS as SDMX
from parsimony_agents import Agent
connectors = FRED.bind(api_key="...") + SDMX
agent = Agent(model="anthropic/claude-sonnet-5", connectors=connectors)
See parsimony-connectors for available financial and economic data sources, or use parsimony to define connectors for internal data.
Code execution
A standalone Agent runs Python in-process by default. This is convenient for local scripts, but it is not a security boundary.
Hosts can pass create_executor(cwd=...) as code_executor= to select bubblewrap isolation on supported Linux systems. The factory falls back to in-process execution with a warning when that boundary is unavailable. Check executor.capability_tier before running untrusted code.
See Code execution and the Security policy.
Documentation
The complete documentation is published at docs.parsimony.dev.
Development
uv sync --all-extras
uv run pytest
uv run ruff check .
uv run mypy parsimony_agents/
See CONTRIBUTING.md.
License
Apache-2.0. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parsimony_agents-0.0.2.tar.gz.
File metadata
- Download URL: parsimony_agents-0.0.2.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9772f35150bf931cd55b5cd2f7bcf7a852f791a31bad7e6ef88dea443bd12a27
|
|
| MD5 |
cb084dbe2b5eed2b20e87f1e12feffed
|
|
| BLAKE2b-256 |
8ac6bc9efe86a1f5e5e66ab1ac78028423378a0e1d9ebfdbd056599ba6957102
|
Provenance
The following attestation bundles were made for parsimony_agents-0.0.2.tar.gz:
Publisher:
publish.yml on ockham-sh/parsimony-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_agents-0.0.2.tar.gz -
Subject digest:
9772f35150bf931cd55b5cd2f7bcf7a852f791a31bad7e6ef88dea443bd12a27 - Sigstore transparency entry: 2408635275
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony-agents@ed5645cbd59cdd00e8fe465328cdfbb36e350803 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ed5645cbd59cdd00e8fe465328cdfbb36e350803 -
Trigger Event:
release
-
Statement type:
File details
Details for the file parsimony_agents-0.0.2-py3-none-any.whl.
File metadata
- Download URL: parsimony_agents-0.0.2-py3-none-any.whl
- Upload date:
- Size: 255.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d813b231ecfe864c3998351a4eb6b69df43c6d8954319b10f6806140ed182d1
|
|
| MD5 |
9be40b4bdc26a7bea8694c7ff9cb7bb4
|
|
| BLAKE2b-256 |
b12b8c467dad8cbb4e44c9e89cb63814e0a9e5baacf192046220beb151ebf768
|
Provenance
The following attestation bundles were made for parsimony_agents-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on ockham-sh/parsimony-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_agents-0.0.2-py3-none-any.whl -
Subject digest:
3d813b231ecfe864c3998351a4eb6b69df43c6d8954319b10f6806140ed182d1 - Sigstore transparency entry: 2408635298
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony-agents@ed5645cbd59cdd00e8fe465328cdfbb36e350803 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ed5645cbd59cdd00e8fe465328cdfbb36e350803 -
Trigger Event:
release
-
Statement type: