Skip to content

Instantly share code, notes, and snippets.

@hypeitnow
Created August 16, 2025 21:52
Show Gist options
  • Select an option

  • Save hypeitnow/2aa85dc3da27ec4d3a9b464f20a8d89b to your computer and use it in GitHub Desktop.

Select an option

Save hypeitnow/2aa85dc3da27ec4d3a9b464f20a8d89b to your computer and use it in GitHub Desktop.
ACPS Integration Examples and Code Samples

ACPS Integration Examples

Real-world examples of ACPS integration across different scenarios.

Examples

  • basic-usage.py - Basic Python integration
  • multi-assistant.py - Using multiple AI assistants
  • web-integration.py - Web application integration
#!/usr/bin/env python3
"""Basic ACPS integration example."""
import asyncio
from pathlib import Path
# Mock ACPS classes for example
class ACPSContextLoader:
"""Load context for AI assistants."""
async def load_context(self, user_query: str, ai_assistant: str = "claude"):
"""Load appropriate context for the query."""
print(f"Loading context for {ai_assistant}: {user_query}")
context = {
"system_prompt": "You are a helpful AI assistant...",
"user_preferences": {"style": "detailed"},
"relevant_memories": [],
"external_knowledge": []
}
return context
async def main():
"""Example usage of ACPS."""
loader = ACPSContextLoader()
# Load context for Claude
context = await loader.load_context(
user_query="Help me write a Python function",
ai_assistant="claude"
)
print("Context loaded successfully!")
print(f"System prompt: {context['system_prompt'][:50]}...")
if __name__ == "__main__":
asyncio.run(main())
#!/usr/bin/env python3
"""Multi-assistant ACPS integration example."""
import asyncio
from enum import Enum
class AIAssistant(Enum):
CLAUDE = "claude"
COPILOT = "copilot"
WINDSURF = "windsurf"
class MultiAssistantACPS:
"""Manage context across multiple AI assistants."""
async def get_optimal_assistant(self, task_type: str) -> AIAssistant:
"""Choose the best assistant for the task."""
task_mapping = {
"coding": AIAssistant.COPILOT,
"explanation": AIAssistant.CLAUDE,
"project_analysis": AIAssistant.WINDSURF
}
return task_mapping.get(task_type, AIAssistant.CLAUDE)
async def process_with_context(self, query: str, task_type: str):
"""Process query with optimal assistant and context."""
assistant = await self.get_optimal_assistant(task_type)
print(f"Using {assistant.value} for {task_type}: {query}")
# Load assistant-specific context
context = await self.load_assistant_context(assistant, query)
return {
"assistant": assistant.value,
"context": context,
"query": query
}
async def load_assistant_context(self, assistant: AIAssistant, query: str):
"""Load context specific to the assistant."""
base_context = {"query": query}
if assistant == AIAssistant.CLAUDE:
base_context.update({
"style": "detailed_explanation",
"include_examples": True
})
elif assistant == AIAssistant.COPILOT:
base_context.update({
"style": "code_focused",
"include_patterns": True
})
elif assistant == AIAssistant.WINDSURF:
base_context.update({
"style": "project_aware",
"multi_file_context": True
})
return base_context
async def main():
"""Demo multi-assistant usage."""
acps = MultiAssistantACPS()
tasks = [
("Write a Python function", "coding"),
("Explain async/await", "explanation"),
("Analyze project structure", "project_analysis")
]
for query, task_type in tasks:
result = await acps.process_with_context(query, task_type)
print(f"Result: {result}\n")
if __name__ == "__main__":
asyncio.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment