Skip to main content

AIWriter is an AI Agent for writers.

Project description

Agentic AI Writer

Get started

# create a context.txt file with a list of URLs inside the `context` folder, set ANTHROPIC_API_KEY
# running agent loop
UV_ENV_FILE=../.env uv run ../agent_loop.py "write an article on software engineering management extracting the absolute best insights from this text. be concise. you are a senior cracked software engineer whose reputation is widely admired online"

# running just one module
UV_ENV_FILE=/path/to/.env uv run /path/to/writer.py "summarize all the context and list bullet points with your best insights"

API

Environment Variables

Required:

  • ANTHROPIC_API_KEY or another model provider API Key if default AIWRITER_MODEL is changed

Optional:

  • AIWRITER_MODEL determines the model to be used
  • AIWRITER_CONTEXT_FILE filename for input context urls file to be used in the first prompt
  • AIWRITER_CONTEXT_FULL_FILE filename for output markdown context from parsing context urls
  • AIWRITER_CONTEXT_DIR directory where input and output context files
  • AIWRITER_CRITERIA filename for criteria file with comma-separated list of criteria to use when scoring
  • AIWRITER_DRAFTS_DIR directory for agent outputs

cli/non-agent use only:

  • AIWRITER_ESSAY_FILE filename for outputs from ranker and writer functions
  • AIWRITER_SCORES filename for output scores file

Modules

# AI Writer Agent
aiwriter agent "<prompt>"
aiwriter writer "<prompt>"
aiwriter ranker "<essay>"
aiwriter context_builder "<prompt>"

How it works

Data Model

  • Input
    • URLs
    • Prompt (i.e. topic)
    • Criteria
  • Output
    • Content (i.e. scored drafts)

Data Flow

flowchart TD
    A([URLs]) --> B(Content Builder)
    AA([Topic]) --> B(Content Builder)
    B --> C([Prompt])
    C --> D(Writer)
    D --> E([Draft])
    E --> F(Ranker)
    F --> FF([Scored Draft])
    H([Criteria]) --> F
    FF --> G{Agent Loop}
    I([Past Runs]) --> G
    G --> B

    style B fill:#fd0795,color:black,font-weight:bold
    style D fill:#00b5d7,color:black,font-weight:bold
    style F fill:#ff9000,color:black,font-weight:bold
    style G fill:#ffb901,color:black,font-weight:bold

Modules

  • Content Builder
    • prompt builder
    • url parser
      • html-to-markdown
      • audio-to-text (podcasts) <- out-of-scope
      • youtube-to-text <- out-of-scope
  • Writer
  • Ranker
  • Agent Loop

AI Writer tasks #todo

  • html-to-markdown url parser
  • prompt builder
  • writer
  • ranker
  • agent loop

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

aiwriter-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

aiwriter-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aiwriter-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.5

File hashes

Hashes for aiwriter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dc425d7658e9d121534948cc3e754a5232d879dc6d4912a37563ba5579d02005
MD5 91ecfada33712999b5dc92e97a340189
BLAKE2b-256 b493ad51b29c61d6dc8b2b20d9ec65b55a889bbba98a06afb12b1378c988c34f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiwriter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.5

File hashes

Hashes for aiwriter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 714fca1f646825f50daf315128b92e0d977b24e72b9617faddd8834321e652cf
MD5 04129efcc74c082166be037fa13a8840
BLAKE2b-256 c3a141dc8045e576f75074881687c14e0f099f19ed390488b107db74bfbd910a

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