A general-purpose AI agent designed to complete a wide variety of natural language tasks as efficiently as possible using Fireworks AI models. The agent reads incoming tasks and classifies each one into one of eight required categories i.e. factual knowledge, mathematical reasoning, sentiment classification, text summarization, named entity recognition, code debugging, logical/deductive reasoning, and code generation using a rule based classifier built on carefully tested keyword and pattern detection, stress-tested against dozens of adversarial prompt variants to ensure it generalizes beyond the original examples. Based on the detected category, the agent dynamically selects the most appropriate model from the harness-provided ALLOWED_MODELS list at runtime. A general-purpose reasoning/cheaper model handles most task types, while a code-specialized/pricier model is reserved for programming-related categories. Per-category token limits were empirically calibrated by directly measuring real completion lengths against the Fireworks API, rather than estimated, after early testing revealed that reasoning-heavy tasks could silently truncate under too-low limits. The full pipeline runs inside a lightweight, linux/amd64-compatible Docker container that reads tasks from /input/tasks.json and writes results to /output/results.json, with all credentials and model permissions injected securely via environment variables at runtime.
Category tags: