Register and share your invite link to earn from video plays and referrals.

Search results for FastAPI
FastAPI community
One keyword maps to one global community path.
Create community
People
Not Found
Tweets including FastAPI
🚀 An ebook that takes FastAPI from your first endpoint all the way to production-scale AI systems — going deep on LLM/RAG serving, with interview questions at the end of every chapter. Title: FastAPI for AI Engineers: From First Endpoint to Production-Scale AI Systems URL: 🚀 Overview A practical guide (First Edition, 2026, by AI Engineering Insider) for AI engineers serving ML models and LLM/RAG systems in production with Python. It spans 10 chapters and 100 interview questions, woven with real-incident case studies and cost-model sidebars. ❓ Challenges Solved ・Building a model is one skill; serving it safely as a scalable production API is another ・LLM/RAG serving has its own hard parts — streaming, guardrails, cost control The book reframes FastAPI as "the de facto serving layer for AI and ML systems." 💡 Structure & Tech Covered ・Foundations: ASGI/WSGI, Uvicorn, OpenAPI, and Pydantic v2 schema separation and validation ・Implementation: idempotency, meaningful status codes, pagination, and the Router→Service→Repository clean architecture ・DB/Security: SQLAlchemy/SQLModel/Alembic, N+1, pool sizing, JWT, BOLA defense, OWASP API Top 10 ・Async: "never block the event loop," def vs async def, and httpx retries/circuit breakers 🎯 The Core (Ch.9: AI/RAG/LLM) ・Load model weights once in lifespan; offload CPU inference to a thread ・An LLM gateway centralizing auth, prompts, guardrails, and cost metering, with SSE token streaming ・Build RAG with embeddings + a vector DB (start with pgvector); validate output with Pydantic, then retry on failure ・Enforce max_tokens as a "spending limit" via the type system 📊 Highlights ・Practice-first, learning from real incidents (Netflix, Stripe, GitLab, Optus, Air Canada) ・Ch.10 covers Gunicorn+Uvicorn, K8s liveness/readiness, the three pillars of observability (p99 vs p50), and SLO-based alerting #FastAPI# #AIEngineering#
Show more
Coding agent thingies extending what you can research and build combined with giving them FastAPI Cloud to deploy feels like such a superpower. First print("hello world") vibes ✨ I just replaced 50 GitHub personal access tokens with 3 apps, while making everything more secure.
Show more
Python projects now support routing rules. ▲ ~/ 𝚟𝚌 𝚛𝚘𝚞𝚝𝚎𝚜 𝚊𝚍𝚍 --𝚊𝚒 "𝚛𝚎𝚠𝚛𝚒𝚝𝚎 /𝚘𝚕𝚍 𝚝𝚘 /𝚗𝚎𝚠" Rewrite paths and set response headers for any Python app, including FastAPI, Django, and Flask.
Show more
Me in 2012 instead of learning: DSA System Design AI / ML Generative AI LLMs AI Agents RAG Vector Databases Embeddings Fine-tuning Prompt Engineering MCP AI Coding Agents Python Java C C++ Go Rust JavaScript TypeScript HTML CSS React Next.js Vue Angular Node.js Express.js NestJS Spring Boot Django FastAPI REST APIs GraphQL WebSockets SQL PostgreSQL MySQL MongoDB Redis Elasticsearch Kafka RabbitMQ Docker Kubernetes Terraform AWS Azure GCP Linux Git GitHub CI/CD DevOps Microservices Serverless Cloud Cybersecurity Data Engineering Data Science MLOps Data Analytics Blockchain Web3 Smart Contracts Solidity Edge Computing Distributed Systems Observability Prometheus Grafana OpenTelemetry Supabase Firebase Vercel Cloudflare PostgreSQL + pgvector LangChain LlamaIndex PyTorch TensorFlow Hugging Face Ollama OpenAI APIs Claude APIs Gemini APIs Model Context Protocol AI Infrastructure GPU Computing CUDA
Show more
# Practical and Useful Patterns with ADK Deploy an agent without writing a single Dockerfile or K8s manifest? ☁️ With `adk deploy cloud_run`, your agent goes live on container serverless in one command. Add Dev UI too for seamless development and operations! ## 📌 Title Cloud Run — One-Command Container Serverless Deployment ## 🔗 URL ## 🧩 Overview ADK's Cloud Run deployment uses the `adk deploy cloud_run` command to deploy agents to a serverless environment without manual Dockerfile or manifest creation. Use `--with_ui` to bundle the Dev UI, `--session_service_uri=agentengine://` to integrate with managed sessions, and get an auto-scaling web backend ready to go. ## 🛠 How to Use Basic deployment command: ```bash adk deploy cloud_run \ --project=$GOOGLE_CLOUD_PROJECT \ --region=$GOOGLE_CLOUD_LOCATION \ $AGENT_PATH ``` Key options: - `--with_ui`: Deploy the ADK development interface alongside the API server - `--session_service_uri`: URI of the session service (pass `agentengine://` for Agent Runtime's managed sessions) - `--service_name`: Customize the Cloud Run service name - `--port`: Specify container listening port (default: 8000) Alternatively, use `gcloud run deploy` with custom Dockerfiles to embed agents in existing FastAPI applications. ## 🏗 Practical Usage - **Sharing Prototypes**: Deploy with `--with_ui` to let your team try the agent via the Dev UI - **Existing Web App Integration**: Use `gcloud run deploy` to add agent capabilities to custom FastAPI apps - **Managed Sessions**: Use `--session_service_uri=agentengine://` for Agent Runtime session management, enabling stateful conversations - **Auto-scaling**: Traffic-based auto-scaling for stable web backend operations - **Auth Control**: Choose whether to allow unauthenticated access at deploy time. For private APIs, access via `gcloud auth print-identity-token` ## 💡 Use Cases - Quickly deploying agents with Dev UI as internal tools - Adding agent features to existing FastAPI/Flask applications - Running Slack bots or chat app backends in serverless mode - Building stateful chat services with Agent Runtime managed sessions ## ⚠️ Caveats - You'll be prompted about unauthenticated access during deployment — only choose 'y' for public APIs - Consider setting minimum instances for latency-sensitive workloads to mitigate cold starts - `--with_ui` is for development — configure proper authentication for production - Default port is 8000 — use `--port` to change if it conflicts with existing services ## ✨ No Dockerfile, no manifest. One command to ship a serverless agent to the world. Experience the simplicity of Cloud Run deployment! ⚡ #ADK# #AIAgent#
Show more
🤝 "LLMs for ambiguity, deterministic agents for hard policy"—a contract-compliance ADK sample that takes role separation seriously. Title: Contract Compliance Pipeline (GoogleCloudPlatform/generative-ai) URL: An auditable demo that uses Google ADK's A2A protocol to coordinate a Python (intake) agent and a Go (validation) agent. Three highlights worth your attention. 🧠 Separating LLM from deterministic work Instead of routing everything through an LLM, ambiguous extraction goes to the LLM/parser side while hard policy enforcement runs in a deterministic Go engine. Rules like "value ≤ $500k" or "term ≤ 5 years" get checked in a repeatable, identical-every-time way. 🔌 Cross-language A2A handoff ADK's RemoteA2aAgent discovers the Go service via its Agent Card (/.well-known/agent.json) and sends a JSON-RPC 2.0 SendMessage. A Python agent (FastAPI:8000) and a Go agent (net/http:8888) collaborate using only a standard protocol. 📜 Auditable policy and artifacts Policies (value cap, term limit, minimum insurance, required exit clause, no unlimited liability, etc.) are passed as custom_policies and swappable per audit. Results are visualized with an execution trace, and the system even auto-generates compliance certificates and parameter sheets. It reads like a template you could lift straight into real regulated/review-heavy systems. #AIAgents# #GoogleADK#
Show more
For an AI agent to answer "why did we make that decision?", you need connected memory — not flat chat logs 🕸️ This tool spins the whole thing up in one command. Title: Introducing Create Context Graph URL: 🕸️ Overview Create Context Graph is a Neo4j Labs CLI scaffolding tool that generates a full-stack AI agent app with graph-based memory in a single command. The generated app bundles a FastAPI backend, a Next.js frontend, an AI agent framework, and a Neo4j graph database. ❓ Challenges Solved AI agents are easy to build but still struggle with relationships and causality. ・Flat chat logs and vector stores can't answer structural questions like "why did we decide this?" or "what's blocking this work?" ・In short, agents lacked the sophisticated memory needed to capture relational context 💡 Methodology & How It Works ・It turns data into a "context graph" (a connected knowledge structure), organizing three memory types: chat history, vector content, and reasoning traces ・It uses the POLE+O entity model (Person, Organization, Location, Event, Object) layered with domain-specific types ・When agents decide, the reasoning chain is captured as DecisionTrace nodes with linked TraceStep components, creating queryable provenance ・It supports multiple frameworks (PydanticAI, LangGraph, Claude Agent SDK), 22 built-in domains, Linear/Claude Code/GitHub connectors, real-time reasoning-path visualization, and automatic secret redaction 🌍 Use Cases ・Developers querying issue dependencies and team workflows ・Personal development analytics from Claude Code session history ・Multi-tool correlation combining decisions, commits, and work items Making decision provenance queryable helps with agent explainability, debugging, and cross-team knowledge integration. #GraphRAG# #Neo4j#
Show more
# Practical and Useful Patterns for OpenAI Agent SDK 🌍 See what's happening inside your agents. Built-in tracing captures every LLM call, tool execution, handoff, and guardrail evaluation in your agent flow. Tracing is enabled by default. Visualize agent behavior in the Traces dashboard to accelerate debugging and quality improvement. 📌 Title: Tracing 🔗 URL: 🧩 Overview The OpenAI Agent SDK's built-in tracing automatically records every step of agent execution -- LLM calls, tool executions, handoffs, and guardrail evaluations. It's enabled by default and visualized in OpenAI's Traces dashboard. Group related runs with `with trace("name")`, ensure trace delivery in worker environments with `flush_traces()`, and control privacy with `RunConfig(trace_include_sensitive_data=False)` or environment variables. 🛠 How to Use Import `Agent`, `Runner`, and `trace` from `agents`. Create an `Agent` and run it with ` "What are the latest AI trends?")` -- tracing is automatically enabled by default, recording all LLM calls and tool executions. 🏗 Practical Usage Patterns **Grouping Related Runs with trace()** Bundle multiple agent runs into a single trace for a bird's-eye view of the entire workflow. Import `trace` from `agents` and wrap multiple ` calls inside a `with trace("Joke workflow"):` block. The joke generation, evaluation, and conditional improvement flow are grouped into a single trace for end-to-end visibility in the dashboard. **Reliable Trace Delivery with flush_traces()** In Celery/RQ/FastAPI background workers, flush traces before the process exits. Import `flush_traces` from `agents`. In Celery tasks, call `flush_traces()` after ` message))` to send traces. In FastAPI, call `flush_traces()` in the `@app.on_event("shutdown")` hook to guarantee trace delivery before process exit. **Privacy Controls for Sensitive Data** Control tracing in ZDR (Zero Data Retention) environments or when handling personal information. Pass `run_config=RunConfig(trace_include_sensitive_data=False)` to ` (the default is `True`) to omit LLM inputs/outputs and function call data from traces; the default can also be flipped with the `OPENAI_AGENTS_TRACE_INCLUDE_SENSITIVE_DATA` environment variable. To disable tracing entirely, set `OPENAI_AGENTS_DISABLE_TRACING=1` or pass `RunConfig(tracing_disabled=True)`. 💡 Use Cases 📊 Visualize LLM/tool/handoff/guardrail flows in the Traces dashboard with zero-config default tracing 🔗 Group multiple agent runs under with trace("Joke workflow") for end-to-end workflow visibility 🔄 Call flush_traces() in Celery/RQ/FastAPI workers to guarantee trace delivery before process exit 🔒 Protect medical/financial data privacy with trace_include_sensitive_data=False ⚠️ Caveats - Tracing is on by default, so sensitive data may inadvertently appear in traces. Review `trace_include_sensitive_data` settings for production environments. - `flush_traces()` is a blocking operation. Call it in shutdown hooks or task completion, not in the critical request path. - Trace data is sent to OpenAI. For compliance requirements, disable with `OPENAI_AGENTS_DISABLE_TRACING=1` or redirect with custom processors (see next section). ✨ Built-in tracing's greatest strength is "it just works with zero config." Start by checking the dashboard as-is, then add workflow grouping and privacy controls as needed! #OpenAIAgentSDK# #AIAgent#
Show more
Best model for your Hermes Agent • Near-frontier intelligence • Fraction of frontier price • Extremely fast • Completely private POST Authorization: Bearer Content-Type: application/json { "model": "kimi-k3-fast-api", "messages": [...] }
Show more