Skip to main content

simple_agents_framework

A markdown file in, a callable agent out. One Python file over the Claude Agent SDK.

import simple_agents_framework as saf

agent = saf.create_agent_from_markdown("doc_reader.md", API_KEY)
agent.ask("which markdown files are here?")   # -> str
agent.ask_html("...")                         # same, streamed as HTML in Jupyter

Agent files

Frontmatter configures, body is the system prompt. Every key is optional:

key effect
name agent name (defaults to the filename)
model e.g. claude-sonnet-5
tools comma-separated allowlist, e.g. Read, Grep, Glob
permission_mode defaults to bypassPermissions — headless agents can't answer prompts

Anything else passes through as a ClaudeAgentOptions kwarg: create_agent_from_markdown(path, key, cwd="/repo", max_turns=5).

API

  • ask(prompt) -> str — blocks, works inside Jupyter too.
  • ask_html(prompt) -> str — same run, streamed into the cell: blue sent, green agent, slate thinking, amber tool call, cyan tool result, red error. The agent's text fills in token by token; tool calls and results appear whole.
  • ask_async(prompt, on_event=None)on_event(kind, title, body, replace) per update. replace=True means "same block, more text": redraw the last thing you drew instead of appending. Build your own renderer on this.

Follow-up asks resume the previous session, so context carries over.

Files

  • simple_agents_framework.py — the whole thing. python simple_agents_framework.py runs its self-check.
  • doc_reader.md — example agent: reads the markdown in a project and answers questions about it.
  • demo.ipynb — end-to-end walkthrough with streamed output.

Gotcha

The SDK spawns whatever claude is first on PATH. Some tools install a wrapper there that never returns headlessly — if ask() hangs, pass cli_path=Path.home() / ".local/bin/claude".

Download files

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

Source Distribution

simple_agents_framework-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

simple_agents_framework-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file simple_agents_framework-0.1.0.tar.gz.

File metadata

  • Download URL: simple_agents_framework-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for simple_agents_framework-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d6284f87476632c8ec3192c30666b934f8f0385d80226ca02da09300e508599
MD5 be6a21ebee81dec2c24c0892b5f35829
BLAKE2b-256 1639a5d00584909b3f3b2f67337182b4df66dfafd942639e2ca56903c9c284f7

See more details on using hashes here.

File details

Details for the file simple_agents_framework-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_agents_framework-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38735fb37d8b217a5543d1bb6978fab4a18bc74f1992d5999b554520c161b1d7
MD5 a79ca5c5bf2bc3b7fc7cc546e2414de3
BLAKE2b-256 672f38e0a9fed2c648c3a4f3216586515c771f977c9988bb160095d4f44c8f25

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page