Spaces:
Sleeping
Sleeping
| title: Agentic Multiwriter | |
| emoji: π§ | |
| colorFrom: indigo | |
| colorTo: pink | |
| sdk: gradio | |
| sdk_version: 6.1.0 | |
| app_file: app.py | |
| pinned: false | |
| # Agentic Multiwriter | |
| A multi-agent **research & writing** system built with **LangGraph**, **LangChain**, and local/remote LLMs. | |
| Pipeline: | |
| 1. **Researcher** β web search on a topic | |
| 2. **Aggregator** β cleans & deduplicates snippets | |
| 3. **Writer** β drafts content based on research | |
| 4. **Critic** β improves clarity & completeness | |
| 5. **Formatter** β outputs a final, mode-specific format (blog / research_summary / linkedin_post) | |
| Supports: | |
| - Local LLM via **Ollama** (e.g. `llama3`) | |
| - Optional OpenAI models (if configured) | |
| - REST API with FastAPI | |
| - CLI entrypoint | |
| --- | |
| ## Quickstart | |
| ````bash | |
| # From repo root | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install -e . | |
| # Run CLI | |
| PYTHONPATH=src python -m agentic_multiwriter.cli.main \ | |
| --topic "Future of AI agents in healthcare" \ | |
| --mode blog | |
| # Run API | |
| PYTHONPATH=src uvicorn agentic_multiwriter.api.server:app --reload | |
| Example request: | |
| bash | |
| Copy code | |
| curl -X POST "http://127.0.0.1:8000/generate" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"topic": "Future of AI agents in healthcare", "mode": "blog"}' | |
| Configuration | |
| Environment variables: | |
| AMW_LLM_PROVIDER β "ollama" or "openai" (default: "ollama") | |
| AMW_LLM_MODEL β e.g. "llama3" (default) or "gpt-4o-mini" | |
| AMW_TEMPERATURE β float, default 0.4 | |
| OPENAI_API_KEY β required if using openai provider | |
| You can also see example configs in examples/sample_config_local.yaml and examples/sample_config_hybrid.yaml. | |
| Development | |
| Run tests: | |
| bash | |
| Copy code | |
| PYTHONPATH=src pytest -q | |
| License | |
| MIT (or whatever you prefer). | |
| bash | |
| Copy code | |
| --- | |
| ## `docker-compose.yml` | |
| ```yaml | |
| version: "3.9" | |
| services: | |
| api: | |
| build: . | |
| container_name: agentic-multiwriter-api | |
| environment: | |
| - AMW_LLM_PROVIDER=${AMW_LLM_PROVIDER:-ollama} | |
| - AMW_LLM_MODEL=${AMW_LLM_MODEL:-llama3} | |
| - AMW_TEMPERATURE=${AMW_TEMPERATURE:-0.4} | |
| - OPENAI_API_KEY=${OPENAI_API_KEY:-} | |
| ports: | |
| - "8000:8000" | |
| command: ["uvicorn", "agentic_multiwriter.api.server:app", "--host", "0.0.0.0", "--port", "8000"] | |
| working_dir: /app | |
| volumes: | |
| - ./src:/app/src | |
| - ./examples:/app/examples | |
| ```` |